source: svn/trunk/newcon3bcm2_21bu/toolchain/mipsel-linux-uclibc/include/linux/dvb/dmx.h

Last change on this file was 2, checked in by jglee, 11 years ago

first commit

  • Property svn:executable set to *
File size: 4.1 KB
Line 
1/*
2 * dmx.h
3 *
4 * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
5 *                  & Ralph  Metzler <ralph@convergence.de>
6 *                    for convergence integrated media GmbH
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation; either version 2.1
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 *
22 */
23
24#ifndef _DVBDMX_H_
25#define _DVBDMX_H_
26
27#include <asm/types.h>
28#include <time.h>
29
30
31#define DMX_FILTER_SIZE 16
32
33typedef enum
34{
35        DMX_OUT_DECODER, /* Streaming directly to decoder. */
36        DMX_OUT_TAP,     /* Output going to a memory buffer */
37                         /* (to be retrieved via the read command).*/
38        DMX_OUT_TS_TAP   /* Output multiplexed into a new TS  */
39                         /* (to be retrieved by reading from the */
40                         /* logical DVR device).                 */
41} dmx_output_t;
42
43
44typedef enum
45{
46        DMX_IN_FRONTEND, /* Input from a front-end device.  */
47        DMX_IN_DVR       /* Input from the logical DVR device.  */
48} dmx_input_t;
49
50
51typedef enum
52{
53        DMX_PES_AUDIO0,
54        DMX_PES_VIDEO0,
55        DMX_PES_TELETEXT0,
56        DMX_PES_SUBTITLE0,
57        DMX_PES_PCR0,
58
59        DMX_PES_AUDIO1,
60        DMX_PES_VIDEO1,
61        DMX_PES_TELETEXT1,
62        DMX_PES_SUBTITLE1,
63        DMX_PES_PCR1,
64
65        DMX_PES_AUDIO2,
66        DMX_PES_VIDEO2,
67        DMX_PES_TELETEXT2,
68        DMX_PES_SUBTITLE2,
69        DMX_PES_PCR2,
70
71        DMX_PES_AUDIO3,
72        DMX_PES_VIDEO3,
73        DMX_PES_TELETEXT3,
74        DMX_PES_SUBTITLE3,
75        DMX_PES_PCR3,
76
77        DMX_PES_OTHER
78} dmx_pes_type_t;
79
80#define DMX_PES_AUDIO    DMX_PES_AUDIO0
81#define DMX_PES_VIDEO    DMX_PES_VIDEO0
82#define DMX_PES_TELETEXT DMX_PES_TELETEXT0
83#define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
84#define DMX_PES_PCR      DMX_PES_PCR0
85
86
87typedef enum
88{
89        DMX_SCRAMBLING_EV,
90        DMX_FRONTEND_EV
91} dmx_event_t;
92
93
94typedef enum
95{
96        DMX_SCRAMBLING_OFF,
97        DMX_SCRAMBLING_ON
98} dmx_scrambling_status_t;
99
100
101typedef struct dmx_filter
102{
103        __u8  filter[DMX_FILTER_SIZE];
104        __u8  mask[DMX_FILTER_SIZE];
105        __u8  mode[DMX_FILTER_SIZE];
106} dmx_filter_t;
107
108
109struct dmx_sct_filter_params
110{
111        __u16          pid;
112        dmx_filter_t   filter;
113        __u32          timeout;
114        __u32          flags;
115#define DMX_CHECK_CRC       1
116#define DMX_ONESHOT         2
117#define DMX_IMMEDIATE_START 4
118#define DMX_KERNEL_CLIENT   0x8000
119};
120
121
122struct dmx_pes_filter_params
123{
124        __u16          pid;
125        dmx_input_t    input;
126        dmx_output_t   output;
127        dmx_pes_type_t pes_type;
128        __u32          flags;
129};
130
131
132struct dmx_event
133{
134        dmx_event_t         event;
135        time_t              timeStamp;
136        union
137        {
138                dmx_scrambling_status_t scrambling;
139        } u;
140};
141
142typedef struct dmx_caps {
143        __u32 caps;
144        int num_decoders;
145} dmx_caps_t;
146
147typedef enum {
148        DMX_SOURCE_FRONT0 = 0,
149        DMX_SOURCE_FRONT1,
150        DMX_SOURCE_FRONT2,
151        DMX_SOURCE_FRONT3,
152        DMX_SOURCE_DVR0   = 16,
153        DMX_SOURCE_DVR1,
154        DMX_SOURCE_DVR2,
155        DMX_SOURCE_DVR3
156} dmx_source_t;
157
158struct dmx_stc {
159        unsigned int num;       /* input : which STC? 0..N */
160        unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
161        __u64 stc;              /* output: stc in 'base'*90 kHz units */
162};
163
164
165#define DMX_START                _IO('o', 41)
166#define DMX_STOP                 _IO('o', 42)
167#define DMX_SET_FILTER           _IOW('o', 43, struct dmx_sct_filter_params)
168#define DMX_SET_PES_FILTER       _IOW('o', 44, struct dmx_pes_filter_params)
169#define DMX_SET_BUFFER_SIZE      _IO('o', 45)
170#define DMX_GET_EVENT            _IOR('o', 46, struct dmx_event)
171#define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
172#define DMX_GET_CAPS             _IOR('o', 48, dmx_caps_t)
173#define DMX_SET_SOURCE           _IOW('o', 49, dmx_source_t)
174#define DMX_GET_STC              _IOWR('o', 50, struct dmx_stc)
175
176#endif /*_DVBDMX_H_*/
Note: See TracBrowser for help on using the repository browser.