Dr Andrew Scott G7VAV

My photo
 
June 2025
Mo Tu We Th Fr Sa Su
26 27 28 29 30 31 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 1 2 3 4 5 6


dmx.h
001: /*
002:  * dmx.h
003:  *
004:  * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de>
005:  *                  & Ralph  Metzler <ralph@convergence.de>
006:  *                    for convergence integrated media GmbH
007:  *
008:  * This program is free software; you can redistribute it and/or
009:  * modify it under the terms of the GNU Lesser General Public License
010:  * as published by the Free Software Foundation; either version 2.1
011:  * of the License, or (at your option) any later version.
012:  *
013:  * This program is distributed in the hope that it will be useful,
014:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
015:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016:  * GNU General Public License for more details.
017:  *
018:  * You should have received a copy of the GNU Lesser General Public License
019:  * along with this program; if not, write to the Free Software
020:  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
021:  *
022:  */
023: 
024: #ifndef _DVBDMX_H_
025: #define _DVBDMX_H_
026: 
027: #include <linux/types.h>
028: #include <time.h>
029: 
030: 
031: #define DMX_FILTER_SIZE 16
032: 
033: typedef enum
034: {
035:         DMX_OUT_DECODER, /* Streaming directly to decoder. */
036:         DMX_OUT_TAP,     /* Output going to a memory buffer */
037:                          /* (to be retrieved via the read command).*/
038:         DMX_OUT_TS_TAP,  /* Output multiplexed into a new TS  */
039:                          /* (to be retrieved by reading from the */
040:                          /* logical DVR device).                 */
041:         DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */
042: } dmx_output_t;
043: 
044: 
045: typedef enum
046: {
047:         DMX_IN_FRONTEND, /* Input from a front-end device.  */
048:         DMX_IN_DVR       /* Input from the logical DVR device.  */
049: } dmx_input_t;
050: 
051: 
052: typedef enum
053: {
054:         DMX_PES_AUDIO0,
055:         DMX_PES_VIDEO0,
056:         DMX_PES_TELETEXT0,
057:         DMX_PES_SUBTITLE0,
058:         DMX_PES_PCR0,
059: 
060:         DMX_PES_AUDIO1,
061:         DMX_PES_VIDEO1,
062:         DMX_PES_TELETEXT1,
063:         DMX_PES_SUBTITLE1,
064:         DMX_PES_PCR1,
065: 
066:         DMX_PES_AUDIO2,
067:         DMX_PES_VIDEO2,
068:         DMX_PES_TELETEXT2,
069:         DMX_PES_SUBTITLE2,
070:         DMX_PES_PCR2,
071: 
072:         DMX_PES_AUDIO3,
073:         DMX_PES_VIDEO3,
074:         DMX_PES_TELETEXT3,
075:         DMX_PES_SUBTITLE3,
076:         DMX_PES_PCR3,
077: 
078:         DMX_PES_OTHER
079: } dmx_pes_type_t;
080: 
081: #define DMX_PES_AUDIO    DMX_PES_AUDIO0
082: #define DMX_PES_VIDEO    DMX_PES_VIDEO0
083: #define DMX_PES_TELETEXT DMX_PES_TELETEXT0
084: #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0
085: #define DMX_PES_PCR      DMX_PES_PCR0
086: 
087: 
088: typedef struct dmx_filter
089: {
090:         __u8  filter[DMX_FILTER_SIZE];
091:         __u8  mask[DMX_FILTER_SIZE];
092:         __u8  mode[DMX_FILTER_SIZE];
093: } dmx_filter_t;
094: 
095: 
096: struct dmx_sct_filter_params
097: {
098:         __u16          pid;
099:         dmx_filter_t   filter;
100:         __u32          timeout;
101:         __u32          flags;
102: #define DMX_CHECK_CRC       1
103: #define DMX_ONESHOT         2
104: #define DMX_IMMEDIATE_START 4
105: #define DMX_KERNEL_CLIENT   0x8000
106: };
107: 
108: 
109: struct dmx_pes_filter_params
110: {
111:         __u16          pid;
112:         dmx_input_t    input;
113:         dmx_output_t   output;
114:         dmx_pes_type_t pes_type;
115:         __u32          flags;
116: };
117: 
118: typedef struct dmx_caps {
119:         __u32 caps;
120:         int num_decoders;
121: } dmx_caps_t;
122: 
123: typedef enum {
124:         DMX_SOURCE_FRONT0 = 0,
125:         DMX_SOURCE_FRONT1,
126:         DMX_SOURCE_FRONT2,
127:         DMX_SOURCE_FRONT3,
128:         DMX_SOURCE_DVR0   = 16,
129:         DMX_SOURCE_DVR1,
130:         DMX_SOURCE_DVR2,
131:         DMX_SOURCE_DVR3
132: } dmx_source_t;
133: 
134: struct dmx_stc {
135:         unsigned int num;       /* input : which STC? 0..N */
136:         unsigned int base;      /* output: divisor for stc to get 90 kHz clock */
137:         __u64 stc;              /* output: stc in 'base'*90 kHz units */
138: };
139: 
140: 
141: #define DMX_START                _IO('o', 41)
142: #define DMX_STOP                 _IO('o', 42)
143: #define DMX_SET_FILTER           _IOW('o', 43, struct dmx_sct_filter_params)
144: #define DMX_SET_PES_FILTER       _IOW('o', 44, struct dmx_pes_filter_params)
145: #define DMX_SET_BUFFER_SIZE      _IO('o', 45)
146: #define DMX_GET_PES_PIDS         _IOR('o', 47, __u16[5])
147: #define DMX_GET_CAPS             _IOR('o', 48, dmx_caps_t)
148: #define DMX_SET_SOURCE           _IOW('o', 49, dmx_source_t)
149: #define DMX_GET_STC              _IOWR('o', 50, struct dmx_stc)
150: #define DMX_ADD_PID              _IOW('o', 51, __u16)
151: #define DMX_REMOVE_PID           _IOW('o', 52, __u16)
152: 
153: #endif /*_DVBDMX_H_*/
154: 


for client (none)
© Andrew Scott 2006 - 2025,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/