libdvbv5  1.4.0
Library to work with Digital TV streams
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 
32 #ifndef _DVB_DEMUX_H
33 #define _DVB_DEMUX_H
34 
35 #include <linux/dvb/dmx.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
52 int dvb_dmx_open(int adapter, int demux);
53 
62 void dvb_dmx_close(int dmx_fd);
63 
72 void dvb_dmx_stop(int dmx_fd);
73 
94 int dvb_set_pesfilter(int dmxfd, int pid, dmx_pes_type_t type,
95  dmx_output_t output, int buffersize);
96 
121 int dvb_set_section_filter(int dmxfd, int pid, unsigned filtsize,
122  unsigned char *filter,
123  unsigned char *mask,
124  unsigned char *mode,
125  unsigned int flags);
126 
140 int dvb_get_pmt_pid(int dmxfd, int sid);
141 
142 #ifdef __cplusplus
143 }
144 #endif
145 
146 #endif
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_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.
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_get_pmt_pid(int dmxfd, int sid)
read the contents of the MPEG-TS PAT table, seeking for an specific service ID