• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
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>
23 #define DMX_FILTER_SIZE 16
24 enum dmx_output {
25   DMX_OUT_DECODER,
26   DMX_OUT_TAP,
27   DMX_OUT_TS_TAP,
28   DMX_OUT_TSDEMUX_TAP
29 };
30 enum dmx_input {
31   DMX_IN_FRONTEND,
32   DMX_IN_DVR
33 };
34 enum dmx_ts_pes {
35   DMX_PES_AUDIO0,
36   DMX_PES_VIDEO0,
37   DMX_PES_TELETEXT0,
38   DMX_PES_SUBTITLE0,
39   DMX_PES_PCR0,
40   DMX_PES_AUDIO1,
41   DMX_PES_VIDEO1,
42   DMX_PES_TELETEXT1,
43   DMX_PES_SUBTITLE1,
44   DMX_PES_PCR1,
45   DMX_PES_AUDIO2,
46   DMX_PES_VIDEO2,
47   DMX_PES_TELETEXT2,
48   DMX_PES_SUBTITLE2,
49   DMX_PES_PCR2,
50   DMX_PES_AUDIO3,
51   DMX_PES_VIDEO3,
52   DMX_PES_TELETEXT3,
53   DMX_PES_SUBTITLE3,
54   DMX_PES_PCR3,
55   DMX_PES_OTHER
56 };
57 #define DMX_PES_AUDIO DMX_PES_AUDIO0
58 #define DMX_PES_VIDEO DMX_PES_VIDEO0
59 #define DMX_PES_TELETEXT DMX_PES_TELETEXT0
60 #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
61 #define DMX_PES_PCR DMX_PES_PCR0
62 struct dmx_filter {
63   __u8 filter[DMX_FILTER_SIZE];
64   __u8 mask[DMX_FILTER_SIZE];
65   __u8 mode[DMX_FILTER_SIZE];
66 };
67 struct dmx_sct_filter_params {
68   __u16 pid;
69   struct dmx_filter filter;
70   __u32 timeout;
71   __u32 flags;
72 #define DMX_CHECK_CRC 1
73 #define DMX_ONESHOT 2
74 #define DMX_IMMEDIATE_START 4
75 };
76 struct dmx_pes_filter_params {
77   __u16 pid;
78   enum dmx_input input;
79   enum dmx_output output;
80   enum dmx_ts_pes pes_type;
81   __u32 flags;
82 };
83 struct dmx_stc {
84   unsigned int num;
85   unsigned int base;
86   __u64 stc;
87 };
88 enum dmx_buffer_flags {
89   DMX_BUFFER_FLAG_HAD_CRC32_DISCARD = 1 << 0,
90   DMX_BUFFER_FLAG_TEI = 1 << 1,
91   DMX_BUFFER_PKT_COUNTER_MISMATCH = 1 << 2,
92   DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED = 1 << 3,
93   DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR = 1 << 4,
94 };
95 struct dmx_buffer {
96   __u32 index;
97   __u32 bytesused;
98   __u32 offset;
99   __u32 length;
100   __u32 flags;
101   __u32 count;
102 };
103 struct dmx_requestbuffers {
104   __u32 count;
105   __u32 size;
106 };
107 struct dmx_exportbuffer {
108   __u32 index;
109   __u32 flags;
110   __s32 fd;
111 };
112 #define DMX_START _IO('o', 41)
113 #define DMX_STOP _IO('o', 42)
114 #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params)
115 #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params)
116 #define DMX_SET_BUFFER_SIZE _IO('o', 45)
117 #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5])
118 #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc)
119 #define DMX_ADD_PID _IOW('o', 51, __u16)
120 #define DMX_REMOVE_PID _IOW('o', 52, __u16)
121 typedef enum dmx_output dmx_output_t;
122 typedef enum dmx_input dmx_input_t;
123 typedef enum dmx_ts_pes dmx_pes_type_t;
124 typedef struct dmx_filter dmx_filter_t;
125 #define DMX_REQBUFS _IOWR('o', 60, struct dmx_requestbuffers)
126 #define DMX_QUERYBUF _IOWR('o', 61, struct dmx_buffer)
127 #define DMX_EXPBUF _IOWR('o', 62, struct dmx_exportbuffer)
128 #define DMX_QBUF _IOWR('o', 63, struct dmx_buffer)
129 #define DMX_DQBUF _IOWR('o', 64, struct dmx_buffer)
130 #endif
131