blob: d4ea26e1a050de1306cfc7ee0305ec492eddd526 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_DVBDMX_H_
20#define _UAPI_DVBDMX_H_
21#include <linux/types.h>
22#include <time.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define DMX_FILTER_SIZE 16
Christopher Ferris05d08e92016-02-04 13:16:38 -080024enum dmx_output {
Tao Baod7db5942015-01-28 10:07:51 -080025 DMX_OUT_DECODER,
26 DMX_OUT_TAP,
Tao Baod7db5942015-01-28 10:07:51 -080027 DMX_OUT_TS_TAP,
28 DMX_OUT_TSDEMUX_TAP
Christopher Ferris05d08e92016-02-04 13:16:38 -080029};
Christopher Ferris1308ad32017-11-14 17:32:13 -080030enum dmx_input {
Tao Baod7db5942015-01-28 10:07:51 -080031 DMX_IN_FRONTEND,
32 DMX_IN_DVR
Christopher Ferris1308ad32017-11-14 17:32:13 -080033};
34enum dmx_ts_pes {
Tao Baod7db5942015-01-28 10:07:51 -080035 DMX_PES_AUDIO0,
36 DMX_PES_VIDEO0,
37 DMX_PES_TELETEXT0,
Christopher Ferris05d08e92016-02-04 13:16:38 -080038 DMX_PES_SUBTITLE0,
Tao Baod7db5942015-01-28 10:07:51 -080039 DMX_PES_PCR0,
40 DMX_PES_AUDIO1,
41 DMX_PES_VIDEO1,
Christopher Ferris05d08e92016-02-04 13:16:38 -080042 DMX_PES_TELETEXT1,
Tao Baod7db5942015-01-28 10:07:51 -080043 DMX_PES_SUBTITLE1,
44 DMX_PES_PCR1,
45 DMX_PES_AUDIO2,
Christopher Ferris05d08e92016-02-04 13:16:38 -080046 DMX_PES_VIDEO2,
Tao Baod7db5942015-01-28 10:07:51 -080047 DMX_PES_TELETEXT2,
48 DMX_PES_SUBTITLE2,
49 DMX_PES_PCR2,
Christopher Ferris05d08e92016-02-04 13:16:38 -080050 DMX_PES_AUDIO3,
Tao Baod7db5942015-01-28 10:07:51 -080051 DMX_PES_VIDEO3,
52 DMX_PES_TELETEXT3,
53 DMX_PES_SUBTITLE3,
Christopher Ferris05d08e92016-02-04 13:16:38 -080054 DMX_PES_PCR3,
Tao Baod7db5942015-01-28 10:07:51 -080055 DMX_PES_OTHER
Christopher Ferris1308ad32017-11-14 17:32:13 -080056};
Ben Cheng655a7c02013-10-16 16:09:24 -070057#define DMX_PES_AUDIO DMX_PES_AUDIO0
Christopher Ferris05d08e92016-02-04 13:16:38 -080058#define DMX_PES_VIDEO DMX_PES_VIDEO0
Tao Baod7db5942015-01-28 10:07:51 -080059#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
61#define DMX_PES_PCR DMX_PES_PCR0
Christopher Ferris1308ad32017-11-14 17:32:13 -080062struct dmx_filter {
Tao Baod7db5942015-01-28 10:07:51 -080063 __u8 filter[DMX_FILTER_SIZE];
64 __u8 mask[DMX_FILTER_SIZE];
65 __u8 mode[DMX_FILTER_SIZE];
Christopher Ferris1308ad32017-11-14 17:32:13 -080066};
Tao Baod7db5942015-01-28 10:07:51 -080067struct dmx_sct_filter_params {
68 __u16 pid;
Christopher Ferris1308ad32017-11-14 17:32:13 -080069 struct dmx_filter filter;
Christopher Ferris05d08e92016-02-04 13:16:38 -080070 __u32 timeout;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define DMX_CHECK_CRC 1
73#define DMX_ONESHOT 2
Christopher Ferris05d08e92016-02-04 13:16:38 -080074#define DMX_IMMEDIATE_START 4
Ben Cheng655a7c02013-10-16 16:09:24 -070075};
Tao Baod7db5942015-01-28 10:07:51 -080076struct dmx_pes_filter_params {
Christopher Ferris05d08e92016-02-04 13:16:38 -080077 __u16 pid;
Christopher Ferris1308ad32017-11-14 17:32:13 -080078 enum dmx_input input;
79 enum dmx_output output;
80 enum dmx_ts_pes pes_type;
Christopher Ferris05d08e92016-02-04 13:16:38 -080081 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070082};
Christopher Ferris05d08e92016-02-04 13:16:38 -080083struct dmx_stc {
Tao Baod7db5942015-01-28 10:07:51 -080084 unsigned int num;
85 unsigned int base;
86 __u64 stc;
Christopher Ferris05d08e92016-02-04 13:16:38 -080087};
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define DMX_START _IO('o', 41)
89#define DMX_STOP _IO('o', 42)
Ben Cheng655a7c02013-10-16 16:09:24 -070090#define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
Christopher Ferris05d08e92016-02-04 13:16:38 -080091#define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
Ben Cheng655a7c02013-10-16 16:09:24 -070092#define DMX_SET_BUFFER_SIZE _IO('o', 45)
93#define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
95#define DMX_ADD_PID _IOW('o', 51, __u16)
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define DMX_REMOVE_PID _IOW('o', 52, __u16)
Christopher Ferris1308ad32017-11-14 17:32:13 -080097typedef enum dmx_output dmx_output_t;
98typedef enum dmx_input dmx_input_t;
99typedef enum dmx_ts_pes dmx_pes_type_t;
100typedef struct dmx_filter dmx_filter_t;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800101#endif