aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/media/uapi/dvb/dmx_types.rst
blob: 80dd659860d7c549d1f2a3b67034b68ed45dded0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
.. -*- coding: utf-8; mode: rst -*-

.. _dmx_types:

****************
Demux Data Types
****************

Output for the demux
====================

.. c:type:: dmx_output

.. tabularcolumns:: |p{5.0cm}|p{12.5cm}|

.. flat-table:: enum dmx_output
    :header-rows:  1
    :stub-columns: 0


    -  .. row 1

       -  ID

       -  Description

    -  .. row 2

       -  .. _DMX-OUT-DECODER:

	  DMX_OUT_DECODER

       -  Streaming directly to decoder.

    -  .. row 3

       -  .. _DMX-OUT-TAP:

	  DMX_OUT_TAP

       -  Output going to a memory buffer (to be retrieved via the read
	  command). Delivers the stream output to the demux device on which
	  the ioctl is called.

    -  .. row 4

       -  .. _DMX-OUT-TS-TAP:

	  DMX_OUT_TS_TAP

       -  Output multiplexed into a new TS (to be retrieved by reading from
	  the logical DVR device). Routes output to the logical DVR device
	  ``/dev/dvb/adapter?/dvr?``, which delivers a TS multiplexed from
	  all filters for which ``DMX_OUT_TS_TAP`` was specified.

    -  .. row 5

       -  .. _DMX-OUT-TSDEMUX-TAP:

	  DMX_OUT_TSDEMUX_TAP

       -  Like :ref:`DMX_OUT_TS_TAP <DMX-OUT-TS-TAP>` but retrieved
	  from the DMX device.


dmx_input_t
===========

.. c:type:: dmx_input

.. code-block:: c

    typedef enum
    {
	DMX_IN_FRONTEND, /* Input from a front-end device.  */
	DMX_IN_DVR       /* Input from the logical DVR device.  */
    } dmx_input_t;


dmx_pes_type_t
==============

.. c:type:: dmx_pes_type


.. code-block:: c

    typedef enum
    {
	DMX_PES_AUDIO0,
	DMX_PES_VIDEO0,
	DMX_PES_TELETEXT0,
	DMX_PES_SUBTITLE0,
	DMX_PES_PCR0,

	DMX_PES_AUDIO1,
	DMX_PES_VIDEO1,
	DMX_PES_TELETEXT1,
	DMX_PES_SUBTITLE1,
	DMX_PES_PCR1,

	DMX_PES_AUDIO2,
	DMX_PES_VIDEO2,
	DMX_PES_TELETEXT2,
	DMX_PES_SUBTITLE2,
	DMX_PES_PCR2,

	DMX_PES_AUDIO3,
	DMX_PES_VIDEO3,
	DMX_PES_TELETEXT3,
	DMX_PES_SUBTITLE3,
	DMX_PES_PCR3,

	DMX_PES_OTHER
    } dmx_pes_type_t;


struct dmx_filter
=================

.. c:type:: dmx_filter

.. code-block:: c

     typedef struct dmx_filter
    {
	__u8  filter[DMX_FILTER_SIZE];
	__u8  mask[DMX_FILTER_SIZE];
	__u8  mode[DMX_FILTER_SIZE];
    } dmx_filter_t;


.. c:type:: dmx_sct_filter_params

struct dmx_sct_filter_params
============================


.. code-block:: c

    struct dmx_sct_filter_params
    {
	__u16          pid;
	dmx_filter_t   filter;
	__u32          timeout;
	__u32          flags;
    #define DMX_CHECK_CRC       1
    #define DMX_ONESHOT         2
    #define DMX_IMMEDIATE_START 4
    #define DMX_KERNEL_CLIENT   0x8000
    };


struct dmx_pes_filter_params
============================

.. c:type:: dmx_pes_filter_params

.. code-block:: c

    struct dmx_pes_filter_params
    {
	__u16          pid;
	dmx_input_t    input;
	dmx_output_t   output;
	dmx_pes_type_t pes_type;
	__u32          flags;
    };


struct dmx_event
================

.. c:type:: dmx_event

.. code-block:: c

     struct dmx_event
     {
	 dmx_event_t          event;
	 time_t               timeStamp;
	 union
	 {
	     dmx_scrambling_status_t scrambling;
	 } u;
     };


struct dmx_stc
==============

.. c:type:: dmx_stc

.. code-block:: c

    struct dmx_stc {
	unsigned int num;   /* input : which STC? 0..N */
	unsigned int base;  /* output: divisor for stc to get 90 kHz clock */
	__u64 stc;      /* output: stc in 'base'*90 kHz units */
    };


struct dmx_caps
===============

.. c:type:: dmx_caps

.. code-block:: c

     typedef struct dmx_caps {
	__u32 caps;
	int num_decoders;
    } dmx_caps_t;


enum dmx_source
===============

.. c:type:: dmx_source

.. code-block:: c

    typedef enum dmx_source {
	DMX_SOURCE_FRONT0 = 0,
	DMX_SOURCE_FRONT1,
	DMX_SOURCE_FRONT2,
	DMX_SOURCE_FRONT3,
	DMX_SOURCE_DVR0   = 16,
	DMX_SOURCE_DVR1,
	DMX_SOURCE_DVR2,
	DMX_SOURCE_DVR3
    } dmx_source_t;