libdvbv5  1.10.0
Library to work with Digital TV devices on Linux
dvb-demux.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-2014 - Mauro Carvalho Chehab
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation version 2
7  * of the License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * These routines were originally written as part of the dvb-apps, as:
15  * util functions for various ?zap implementations
16  *
17  * Copyright (C) 2001 Johannes Stezenbach (js@convergence.de)
18  * for convergence integrated media
19  *
20  * Originally licensed as GPLv2 or upper
21  */
22 
34 #ifndef _DVB_DEMUX_H
35 #define _DVB_DEMUX_H
36 
37 #include <linux/dvb/dmx.h>
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
54 int dvb_dmx_open(int adapter, int demux);
55 
64 void dvb_dmx_close(int dmx_fd);
65 
74 void dvb_dmx_stop(int dmx_fd);
75 
95 int dvb_set_pesfilter(int dmxfd, int pid, dmx_pes_type_t type,
96  dmx_output_t output, int buffersize);
97 
117 int dvb_set_section_filter(int dmxfd, int pid, unsigned filtsize,
118  unsigned char *filter,
119  unsigned char *mask,
120  unsigned char *mode,
121  unsigned int flags);
122 
136 int dvb_get_pmt_pid(int dmxfd, int sid);
137 
138 #ifdef __cplusplus
139 }
140 #endif
141 
142 #endif
void dvb_dmx_close(int dmx_fd)
Stops the DMX filter for the file descriptor and closes.
int dvb_dmx_open(int adapter, int demux)
Opens a DVB demux in read/write mode.
int dvb_set_section_filter(int dmxfd, int pid, unsigned filtsize, unsigned char *filter, unsigned char *mask, unsigned char *mode, unsigned int flags)
Sets a MPEG-TS section filter.
int dvb_set_pesfilter(int dmxfd, int pid, dmx_pes_type_t type, dmx_output_t output, int buffersize)
Start a filter for a MPEG-TS Packetized Elementary Stream (PES)
void dvb_dmx_stop(int dmx_fd)
Stops the DMX filter for a given file descriptor.
int dvb_get_pmt_pid(int dmxfd, int sid)
read the contents of the MPEG-TS PAT table, seeking for an specific service ID