libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
Files | Functions
Digital TV demux

Files

file  dvb-demux.h
 Provides interfaces to deal with DVB demux.
 

Functions

int dvb_dmx_open (int adapter, int demux)
 Opens a DVB demux in read/write mode. More...
 
void dvb_dmx_close (int dmx_fd)
 Stops the DMX filter for the file descriptor and closes. More...
 
void dvb_dmx_stop (int dmx_fd)
 Stops the DMX filter for a given file descriptor. More...
 
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) More...
 
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. More...
 
int dvb_get_pmt_pid (int dmxfd, int sid)
 read the contents of the MPEG-TS PAT table, seeking for an specific service ID More...
 

Detailed Description

Function Documentation

◆ dvb_dmx_close()

void dvb_dmx_close ( int  dmx_fd)

Stops the DMX filter for the file descriptor and closes.

Parameters
dmx_fdFile descriptor to close

This is a wrapper function to close().

Warning
Deprecated. Please use dvb_dev_close() instead.

◆ dvb_dmx_open()

int dvb_dmx_open ( int  adapter,
int  demux 
)

Opens a DVB demux in read/write mode.

Parameters
adapterDVB adapter number to open
demuxDVB demux number to open

This is a wrapper function to open(). File is always opened in blocking mode.

Returns
Returns a file descriptor on success, -1 otherwise.
Warning
Deprecated. Please use dvb_dev_open() instead.

◆ dvb_dmx_stop()

void dvb_dmx_stop ( int  dmx_fd)

Stops the DMX filter for a given file descriptor.

Parameters
dmx_fdFile descriptor to close

This is a wrapper function to DMX_STOP ioctl. See http://linuxtv.org/downloads/v4l-dvb-apis/dvb_demux.html for more details.

Warning
Deprecated. Please use dvb_dev_dmx_stop() instead.

◆ dvb_get_pmt_pid()

int dvb_get_pmt_pid ( int  dmxfd,
int  sid 
)

read the contents of the MPEG-TS PAT table, seeking for an specific service ID

Parameters
dmxfdFile descriptor for the demux device
sidSession ID to seeking
Warning
Deprecated. Please use dvb_get_pmt_pid() instead.
Returns
At return, it returns a negative value if error or the PID associated with the desired Session ID.
Warning
This function currently assumes that the PAT fits into one session.

◆ dvb_set_pesfilter()

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)

Parameters
dmxfdFile descriptor for the demux device
pidProgram ID to filter. Use 0x2000 to select all PIDs
typetype of the PID (DMX_PES_VIDEO, DMX_PES_AUDIO, DMX_PES_OTHER, etc).
outputWhere the data will be output (DMX_OUT_TS_TAP, DMX_OUT_DECODER, etc).
buffersizeSize of the buffer to be allocated to store the filtered data.

This is a wrapper function for DMX_SET_PES_FILTER ioctl. See http://linuxtv.org/downloads/v4l-dvb-apis/dvb_demux.html for more details.

Returns
Retuns zero on success, -1 otherwise.
Warning
Deprecated. Please use dvb_dev_dmx_set_pesfilter() instead.

◆ dvb_set_section_filter()

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.

Parameters
dmxfdFile descriptor for the demux device
pidProgram ID to filter. Use 0x2000 to select all PIDs
filtsizeSize of the filter (up to 18 btyes)
filterdata to filter. Can be NULL or should have filtsize length
maskfilter mask. Can be NULL or should have filtsize length
modemode mask. Can be NULL or should have filtsize length
flagsflags for set filter (DMX_CHECK_CRC,DMX_ONESHOT, DMX_IMMEDIATE_START).

This is a wrapper function for DMX_SET_FILTER ioctl. See http://linuxtv.org/downloads/v4l-dvb-apis/dvb_demux.html for more details.

Warning
Deprecated. Please use dvb_dev_dmx_set_pesfilter() instead.
Returns
Retuns zero on success, -1 otherwise.