3232
3333#define DMX_FILTER_SIZE 16
3434
35- enum dmx_output
36- {
37- DMX_OUT_DECODER , /* Streaming directly to decoder. */
38- DMX_OUT_TAP , /* Output going to a memory buffer */
39- /* (to be retrieved via the read command).*/
40- DMX_OUT_TS_TAP , /* Output multiplexed into a new TS */
41- /* (to be retrieved by reading from the */
42- /* logical DVR device). */
43- DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
35+ /**
36+ * enum dmx_output - Output for the demux.
37+ *
38+ * @DMX_OUT_DECODER:
39+ * Streaming directly to decoder.
40+ * @DMX_OUT_TAP:
41+ * Output going to a memory buffer (to be retrieved via the read command).
42+ * Delivers the stream output to the demux device on which the ioctl
43+ * is called.
44+ * @DMX_OUT_TS_TAP:
45+ * Output multiplexed into a new TS (to be retrieved by reading from the
46+ * logical DVR device). Routes output to the logical DVR device
47+ * ``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from all
48+ * filters for which @DMX_OUT_TS_TAP was specified.
49+ * @DMX_OUT_TSDEMUX_TAP:
50+ * Like @DMX_OUT_TS_TAP but retrieved from the DMX device.
51+ */
52+ enum dmx_output {
53+ DMX_OUT_DECODER ,
54+ DMX_OUT_TAP ,
55+ DMX_OUT_TS_TAP ,
56+ DMX_OUT_TSDEMUX_TAP
4457};
4558
46- enum dmx_input
47- {
48- DMX_IN_FRONTEND , /* Input from a front-end device. */
49- DMX_IN_DVR /* Input from the logical DVR device. */
59+
60+ /**
61+ * enum dmx_input - Input from the demux.
62+ *
63+ * @DMX_IN_FRONTEND: Input from a front-end device.
64+ * @DMX_IN_DVR: Input from the logical DVR device.
65+ */
66+ enum dmx_input {
67+ DMX_IN_FRONTEND ,
68+ DMX_IN_DVR
5069};
5170
71+ /**
72+ * enum dmx_ts_pes - type of the PES filter.
73+ *
74+ * @DMX_PES_AUDIO0: first audio PID. Also referred as @DMX_PES_AUDIO.
75+ * @DMX_PES_VIDEO0: first video PID. Also referred as @DMX_PES_VIDEO.
76+ * @DMX_PES_TELETEXT0: first teletext PID. Also referred as @DMX_PES_TELETEXT.
77+ * @DMX_PES_SUBTITLE0: first subtitle PID. Also referred as @DMX_PES_SUBTITLE.
78+ * @DMX_PES_PCR0: first Program Clock Reference PID.
79+ * Also referred as @DMX_PES_PCR.
80+ *
81+ * @DMX_PES_AUDIO1: second audio PID.
82+ * @DMX_PES_VIDEO1: second video PID.
83+ * @DMX_PES_TELETEXT1: second teletext PID.
84+ * @DMX_PES_SUBTITLE1: second subtitle PID.
85+ * @DMX_PES_PCR1: second Program Clock Reference PID.
86+ *
87+ * @DMX_PES_AUDIO2: third audio PID.
88+ * @DMX_PES_VIDEO2: third video PID.
89+ * @DMX_PES_TELETEXT2: third teletext PID.
90+ * @DMX_PES_SUBTITLE2: third subtitle PID.
91+ * @DMX_PES_PCR2: third Program Clock Reference PID.
92+ *
93+ * @DMX_PES_AUDIO3: fourth audio PID.
94+ * @DMX_PES_VIDEO3: fourth video PID.
95+ * @DMX_PES_TELETEXT3: fourth teletext PID.
96+ * @DMX_PES_SUBTITLE3: fourth subtitle PID.
97+ * @DMX_PES_PCR3: fourth Program Clock Reference PID.
98+ *
99+ * @DMX_PES_OTHER: any other PID.
100+ */
52101
53- enum dmx_ts_pes
54- {
102+ enum dmx_ts_pes {
55103 DMX_PES_AUDIO0 ,
56104 DMX_PES_VIDEO0 ,
57105 DMX_PES_TELETEXT0 ,
@@ -86,16 +134,42 @@ enum dmx_ts_pes
86134#define DMX_PES_PCR DMX_PES_PCR0
87135
88136
89- struct dmx_filter
90- {
137+
138+ /**
139+ * struct dmx_filter - Specifies a section header filter.
140+ *
141+ * @filter: bit array with bits to be matched at the section header.
142+ * @mask: bits that are valid at the filter bit array.
143+ * @mode: mode of match: if bit is zero, it will match if equal (positive
144+ * match); if bit is one, it will match if the bit is negated.
145+ *
146+ * Note: All arrays in this struct have a size of DMX_FILTER_SIZE (16 bytes).
147+ */
148+ struct dmx_filter {
91149 __u8 filter [DMX_FILTER_SIZE ];
92150 __u8 mask [DMX_FILTER_SIZE ];
93151 __u8 mode [DMX_FILTER_SIZE ];
94152};
95153
96-
97- struct dmx_sct_filter_params
98- {
154+ /**
155+ * struct dmx_sct_filter_params - Specifies a section filter.
156+ *
157+ * @pid: PID to be filtered.
158+ * @filter: section header filter, as defined by &struct dmx_filter.
159+ * @timeout: maximum time to filter, in milliseconds.
160+ * @flags: extra flags for the section filter.
161+ *
162+ * Carries the configuration for a MPEG-TS section filter.
163+ *
164+ * The @flags can be:
165+ *
166+ * - %DMX_CHECK_CRC - only deliver sections where the CRC check succeeded;
167+ * - %DMX_ONESHOT - disable the section filter after one section
168+ * has been delivered;
169+ * - %DMX_IMMEDIATE_START - Start filter immediately without requiring a
170+ * :ref:`DMX_START`.
171+ */
172+ struct dmx_sct_filter_params {
99173 __u16 pid ;
100174 struct dmx_filter filter ;
101175 __u32 timeout ;
@@ -105,7 +179,16 @@ struct dmx_sct_filter_params
105179#define DMX_IMMEDIATE_START 4
106180};
107181
108-
182+ /**
183+ * struct dmx_pes_filter_params - Specifies Packetized Elementary Stream (PES)
184+ * filter parameters.
185+ *
186+ * @pid: PID to be filtered.
187+ * @input: Demux input, as specified by &enum dmx_input.
188+ * @output: Demux output, as specified by &enum dmx_output.
189+ * @pes_type: Type of the pes filter, as specified by &enum dmx_pes_type.
190+ * @flags: Demux PES flags.
191+ */
109192struct dmx_pes_filter_params
110193{
111194 __u16 pid ;
@@ -115,11 +198,17 @@ struct dmx_pes_filter_params
115198 __u32 flags ;
116199};
117200
118-
201+ /**
202+ * struct dmx_stc - Stores System Time Counter (STC) information.
203+ *
204+ * @num: input data: number of the STC, from 0 to N.
205+ * @base: output: divisor for STC to get 90 kHz clock.
206+ * @stc: output: stc in @base * 90 kHz units.
207+ */
119208struct dmx_stc {
120- unsigned int num ; /* input : which STC? 0..N */
121- unsigned int base ; /* output: divisor for stc to get 90 kHz clock */
122- __u64 stc ; /* output: stc in 'base'*90 kHz units */
209+ unsigned int num ;
210+ unsigned int base ;
211+ __u64 stc ;
123212};
124213
125214#define DMX_START _IO('o', 41)
0 commit comments