1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Appendix&#160;H.&#160;DVB Demux Header File</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="dvbapi.html" title="Part&#160;II.&#160;LINUX DVB API"><link rel="prev" href="ca_h.html" title="Appendix&#160;G.&#160;DVB Conditional Access Header File"><link rel="next" href="frontend_h.html" title="Appendix&#160;I.&#160;DVB Frontend Header File"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Appendix&#160;H.&#160;DVB Demux Header File</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ca_h.html">Prev</a>&#160;</td><th width="60%" align="center">Part&#160;II.&#160;LINUX DVB API</th><td width="20%" align="right">&#160;<a accesskey="n" href="frontend_h.html">Next</a></td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><div><h2 class="title"><a name="dmx_h"></a>Appendix&#160;H.&#160;DVB Demux Header File</h2></div></div></div><pre class="programlisting">
2/*
3 * dmx.h
4 *
5 * Copyright (C) 2000 Marcus Metzler &lt;marcus@convergence.de&gt;
6 *                  &amp; Ralph  Metzler &lt;ralph@convergence.de&gt;
7 *                    for convergence integrated media GmbH
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public License
11 * as published by the Free Software Foundation; either version 2.1
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 *
23 */
24
25#ifndef _UAPI_DVBDMX_H_
26#define _UAPI_DVBDMX_H_
27
28#include &lt;linux/types.h&gt;
29#ifndef __KERNEL__
30#include &lt;time.h&gt;
31#endif
32
33
34#define DMX_FILTER_SIZE 16
35
36typedef enum
37{
38        DMX_OUT_DECODER, /* Streaming directly to decoder. */
39        DMX_OUT_TAP,     /* Output going to a memory buffer */
40                         /* (to be retrieved via the read command).*/
41        DMX_OUT_TS_TAP,  /* Output multiplexed into a new TS  */
42                         /* (to be retrieved by reading from the */
43                         /* logical DVR device).                 */
44        DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
45} <a class="link" href="dvb_demux.html#dmx-output-t" title="dmx_output_t">dmx_output_t</a>;
46
47
48typedef enum
49{
50        DMX_IN_FRONTEND, /* Input from a front-end device.  */
51        DMX_IN_DVR       /* Input from the logical DVR device.  */
52} <a class="link" href="dvb_demux.html#dmx-input-t" title="dmx_input_t">dmx_input_t</a>;
53
54
55typedef enum dmx_ts_pes
56{
57        DMX_PES_AUDIO0,
58        DMX_PES_VIDEO0,
59        DMX_PES_TELETEXT0,
60        DMX_PES_SUBTITLE0,
61        DMX_PES_PCR0,
62
63        DMX_PES_AUDIO1,
64        DMX_PES_VIDEO1,
65        DMX_PES_TELETEXT1,
66        DMX_PES_SUBTITLE1,
67        DMX_PES_PCR1,
68
69        DMX_PES_AUDIO2,
70        DMX_PES_VIDEO2,
71        DMX_PES_TELETEXT2,
72        DMX_PES_SUBTITLE2,
73        DMX_PES_PCR2,
74
75        DMX_PES_AUDIO3,
76        DMX_PES_VIDEO3,
77        DMX_PES_TELETEXT3,
78        DMX_PES_SUBTITLE3,
79        DMX_PES_PCR3,
80
81        DMX_PES_OTHER
82} <a class="link" href="dvb_demux.html#dmx-pes-type-t" title="dmx_pes_type_t">dmx_pes_type_t</a>;
83
84#define DMX_PES_AUDIO    DMX_PES_AUDIO0
85#define DMX_PES_VIDEO    DMX_PES_VIDEO0
86#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
87#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
88#define DMX_PES_PCR      DMX_PES_PCR0
89
90
91typedef struct dmx_filter
92{
93        __u8  filter[DMX_FILTER_SIZE];
94        __u8  mask[DMX_FILTER_SIZE];
95        __u8  mode[DMX_FILTER_SIZE];
96} <a class="link" href="dvb_demux.html#dmx-filter" title="struct dmx_filter">dmx_filter_t</a>;
97
98
99struct dmx_sct_filter_params
100{
101        __u16          pid;
102        dmx_filter_t   filter;
103        __u32          timeout;
104        __u32          flags;
105#define DMX_CHECK_CRC       1
106#define DMX_ONESHOT         2
107#define DMX_IMMEDIATE_START 4
108#define DMX_KERNEL_CLIENT   0x8000
109};
110
111
112struct dmx_pes_filter_params
113{
114        __u16          pid;
115        dmx_input_t    input;
116        dmx_output_t   output;
117        dmx_pes_type_t pes_type;
118        __u32          flags;
119};
120
121typedef struct <a class="link" href="dvb_demux.html#dmx-caps" title="struct dmx_caps">dmx_caps</a> {
122        __u32 caps;
123        int num_decoders;
124} <a class="link" href="dvb_demux.html#dmx-caps" title="struct dmx_caps">dmx_caps_t</a>;
125
126typedef enum {
127        DMX_SOURCE_FRONT0 = 0,
128        DMX_SOURCE_FRONT1,
129        DMX_SOURCE_FRONT2,
130        DMX_SOURCE_FRONT3,
131        DMX_SOURCE_DVR0   = 16,
132        DMX_SOURCE_DVR1,
133        DMX_SOURCE_DVR2,
134        DMX_SOURCE_DVR3
135} <a class="link" href="dvb_demux.html#dmx-source-t" title="enum dmx_source_t">dmx_source_t</a>;
136
137struct <a class="link" href="dvb_demux.html#dmx-stc" title="struct dmx_stc">dmx_stc</a> {
138        unsigned int num;       /* input : which STC? 0..N */
139        unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
140        __u64 stc;              /* output: stc in 'base'*90 kHz units */
141};
142
143
144#define <a class="link" href="dmx_fcalls.html#DMX_START" title="DMX_START">DMX_START</a>                _IO('o', 41)
145#define <a class="link" href="dmx_fcalls.html#DMX_STOP" title="DMX_STOP">DMX_STOP</a>                 _IO('o', 42)
146#define <a class="link" href="dmx_fcalls.html#DMX_SET_FILTER" title="DMX_SET_FILTER">DMX_SET_FILTER</a>           _IOW('o', 43, struct dmx_sct_filter_params)
147#define <a class="link" href="dmx_fcalls.html#DMX_SET_PES_FILTER" title="DMX_SET_PES_FILTER">DMX_SET_PES_FILTER</a>       _IOW('o', 44, struct dmx_pes_filter_params)
148#define <a class="link" href="dmx_fcalls.html#DMX_SET_BUFFER_SIZE" title="DMX_SET_BUFFER_SIZE">DMX_SET_BUFFER_SIZE</a>      _IO('o', 45)
149#define <a class="link" href="dmx_fcalls.html#DMX_GET_PES_PIDS" title="DMX_GET_PES_PIDS">DMX_GET_PES_PIDS</a>         _IOR('o', 47, __u16[5])
150#define <a class="link" href="dmx_fcalls.html#DMX_GET_CAPS" title="DMX_GET_CAPS">DMX_GET_CAPS</a>             _IOR('o', 48, dmx_caps_t)
151#define <a class="link" href="dmx_fcalls.html#DMX_SET_SOURCE" title="DMX_SET_SOURCE">DMX_SET_SOURCE</a>           _IOW('o', 49, dmx_source_t)
152#define <a class="link" href="dmx_fcalls.html#DMX_GET_STC" title="DMX_GET_STC">DMX_GET_STC</a>              _IOWR('o', 50, struct dmx_stc)
153#define <a class="link" href="dmx_fcalls.html#DMX_ADD_PID" title="DMX_ADD_PID">DMX_ADD_PID</a>              _IOW('o', 51, __u16)
154#define <a class="link" href="dmx_fcalls.html#DMX_REMOVE_PID" title="DMX_REMOVE_PID">DMX_REMOVE_PID</a>           _IOW('o', 52, __u16)
155
156#endif /* _UAPI_DVBDMX_H_ */
157</pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ca_h.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="dvbapi.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="frontend_h.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix&#160;G.&#160;DVB Conditional Access Header File&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Appendix&#160;I.&#160;DVB Frontend Header File</td></tr></table></div></body></html>
158