Merge branch 'for-linus-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/mason...
[sfrench/cifs-2.6.git] / Documentation / media / uapi / dvb / dmx_types.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _dmx_types:
4
5 ****************
6 Demux Data Types
7 ****************
8
9
10 .. _dmx-output-t:
11
12 Output for the demux
13 ====================
14
15
16 .. _dmx-output:
17
18 .. flat-table:: enum dmx_output
19     :header-rows:  1
20     :stub-columns: 0
21
22
23     -  .. row 1
24
25        -  ID
26
27        -  Description
28
29     -  .. row 2
30
31        -  .. _DMX-OUT-DECODER:
32
33           DMX_OUT_DECODER
34
35        -  Streaming directly to decoder.
36
37     -  .. row 3
38
39        -  .. _DMX-OUT-TAP:
40
41           DMX_OUT_TAP
42
43        -  Output going to a memory buffer (to be retrieved via the read
44           command). Delivers the stream output to the demux device on which
45           the ioctl is called.
46
47     -  .. row 4
48
49        -  .. _DMX-OUT-TS-TAP:
50
51           DMX_OUT_TS_TAP
52
53        -  Output multiplexed into a new TS (to be retrieved by reading from
54           the logical DVR device). Routes output to the logical DVR device
55           ``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
56           all filters for which ``DMX_OUT_TS_TAP`` was specified.
57
58     -  .. row 5
59
60        -  .. _DMX-OUT-TSDEMUX-TAP:
61
62           DMX_OUT_TSDEMUX_TAP
63
64        -  Like :ref:`DMX_OUT_TS_TAP <DMX-OUT-TS-TAP>` but retrieved
65           from the DMX device.
66
67
68
69 .. _dmx-input-t:
70
71 dmx_input_t
72 ===========
73
74
75 .. code-block:: c
76
77     typedef enum
78     {
79         DMX_IN_FRONTEND, /* Input from a front-end device.  */
80         DMX_IN_DVR       /* Input from the logical DVR device.  */
81     } dmx_input_t;
82
83
84 .. _dmx-pes-type-t:
85
86 dmx_pes_type_t
87 ==============
88
89
90 .. code-block:: c
91
92     typedef enum
93     {
94         DMX_PES_AUDIO0,
95         DMX_PES_VIDEO0,
96         DMX_PES_TELETEXT0,
97         DMX_PES_SUBTITLE0,
98         DMX_PES_PCR0,
99
100         DMX_PES_AUDIO1,
101         DMX_PES_VIDEO1,
102         DMX_PES_TELETEXT1,
103         DMX_PES_SUBTITLE1,
104         DMX_PES_PCR1,
105
106         DMX_PES_AUDIO2,
107         DMX_PES_VIDEO2,
108         DMX_PES_TELETEXT2,
109         DMX_PES_SUBTITLE2,
110         DMX_PES_PCR2,
111
112         DMX_PES_AUDIO3,
113         DMX_PES_VIDEO3,
114         DMX_PES_TELETEXT3,
115         DMX_PES_SUBTITLE3,
116         DMX_PES_PCR3,
117
118         DMX_PES_OTHER
119     } dmx_pes_type_t;
120
121
122 .. _dmx-filter:
123
124 struct dmx_filter
125 =================
126
127
128 .. code-block:: c
129
130      typedef struct dmx_filter
131     {
132         __u8  filter[DMX_FILTER_SIZE];
133         __u8  mask[DMX_FILTER_SIZE];
134         __u8  mode[DMX_FILTER_SIZE];
135     } dmx_filter_t;
136
137
138 .. _dmx-sct-filter-params:
139
140 struct dmx_sct_filter_params
141 ============================
142
143
144 .. code-block:: c
145
146     struct dmx_sct_filter_params
147     {
148         __u16          pid;
149         dmx_filter_t   filter;
150         __u32          timeout;
151         __u32          flags;
152     #define DMX_CHECK_CRC       1
153     #define DMX_ONESHOT         2
154     #define DMX_IMMEDIATE_START 4
155     #define DMX_KERNEL_CLIENT   0x8000
156     };
157
158
159 .. _dmx-pes-filter-params:
160
161 struct dmx_pes_filter_params
162 ============================
163
164
165 .. code-block:: c
166
167     struct dmx_pes_filter_params
168     {
169         __u16          pid;
170         dmx_input_t    input;
171         dmx_output_t   output;
172         dmx_pes_type_t pes_type;
173         __u32          flags;
174     };
175
176
177 .. _dmx-event:
178
179 struct dmx_event
180 ================
181
182
183 .. code-block:: c
184
185      struct dmx_event
186      {
187          dmx_event_t          event;
188          time_t               timeStamp;
189          union
190          {
191              dmx_scrambling_status_t scrambling;
192          } u;
193      };
194
195
196 .. _dmx-stc:
197
198 struct dmx_stc
199 ==============
200
201
202 .. code-block:: c
203
204     struct dmx_stc {
205         unsigned int num;   /* input : which STC? 0..N */
206         unsigned int base;  /* output: divisor for stc to get 90 kHz clock */
207         __u64 stc;      /* output: stc in 'base'*90 kHz units */
208     };
209
210
211 .. _dmx-caps:
212
213 struct dmx_caps
214 ===============
215
216
217 .. code-block:: c
218
219      typedef struct dmx_caps {
220         __u32 caps;
221         int num_decoders;
222     } dmx_caps_t;
223
224
225 .. _dmx-source-t:
226
227 enum dmx_source_t
228 =================
229
230
231 .. code-block:: c
232
233     typedef enum {
234         DMX_SOURCE_FRONT0 = 0,
235         DMX_SOURCE_FRONT1,
236         DMX_SOURCE_FRONT2,
237         DMX_SOURCE_FRONT3,
238         DMX_SOURCE_DVR0   = 16,
239         DMX_SOURCE_DVR1,
240         DMX_SOURCE_DVR2,
241         DMX_SOURCE_DVR3
242     } dmx_source_t;