VLC  3.0.0-git
Typedefs | Functions
Chained demultiplexer

Demultiplexers wrapped by another demultiplexer. More...

Collaboration diagram for Chained demultiplexer:


typedef struct vlc_demux_chained_t vlc_demux_chained_t


vlc_demux_chained_tvlc_demux_chained_New (vlc_object_t *parent, const char *name, es_out_t *out)
 Creates a chained demuxer. More...
void vlc_demux_chained_Delete (vlc_demux_chained_t *)
 Destroys a chained demuxer. More...
void vlc_demux_chained_Send (vlc_demux_chained_t *, block_t *block)
 Sends data to a chained demuxer. More...
int vlc_demux_chained_ControlVa (vlc_demux_chained_t *, int query, va_list args)
 Controls a chained demuxer. More...
static int vlc_demux_chained_Control (vlc_demux_chained_t *dc, int query,...)

Detailed Description

Demultiplexers wrapped by another demultiplexer.

Typedef Documentation

◆ vlc_demux_chained_t

Function Documentation

◆ vlc_demux_chained_Control()

static int vlc_demux_chained_Control ( vlc_demux_chained_t dc,
int  query,

◆ vlc_demux_chained_ControlVa()

int vlc_demux_chained_ControlVa ( vlc_demux_chained_t ,
int  query,
va_list  args 

Controls a chained demuxer.

This performs a demux (i.e. DEMUX_...) control request on a chained demux.

In most cases, vlc_demux_chained_Control() should be used instead.
As per vlc_demux_chained_New(), most demux controls are not, and cannot be, supported; VLC_EGENERIC is returned.
querydemux control (see demux_query_e)
argsvariable arguments (depending on the query)

< Unspecified error

< No error

References DEMUX_GET_LENGTH, DEMUX_GET_POSITION, DEMUX_GET_TIME, vlc_demux_chained_t::length, vlc_demux_chained_t::lock, vlc_demux_chained_t::position, vlc_demux_chained_t::stats, vlc_demux_chained_t::time, VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.

Referenced by vlc_demux_chained_Control().

◆ vlc_demux_chained_Delete()

void vlc_demux_chained_Delete ( vlc_demux_chained_t )

Destroys a chained demuxer.

Sends an end-of-stream to the chained demuxer, and releases all underlying allocated resources.

References vlc_demux_chained_t::fifo, vlc_demux_chained_t::lock, vlc_demux_chained_t::thread, vlc_join(), vlc_mutex_destroy(), and vlc_stream_fifo_Close().

◆ vlc_demux_chained_New()

vlc_demux_chained_t* vlc_demux_chained_New ( vlc_object_t parent,
const char *  name,
es_out_t out 

Creates a chained demuxer.

This creates a thread running a demuxer whose input stream is generated directly by the caller. This typically handles some sort of stream within a stream, e.g. MPEG-TS within something else.

There are a number of limitations to this approach. The chained demuxer is run asynchronously in a separate thread. Most demuxer controls are synchronous and therefore unavailable in this case. Also the input stream is a simple FIFO, so the chained demuxer cannot perform seeks. Lastly, most errors cannot be detected.
parentparent VLC object
namechained demux module name (e.g. "ts")
outelementary stream output for the chained demux
a non-NULL pointer on success, NULL on failure.

References vlc_demux_chained_t::fifo, vlc_demux_chained_t::length, vlc_demux_chained_t::lock, vlc_demux_chained_t::name, vlc_demux_chained_t::out, vlc_demux_chained_t::position, vlc_demux_chained_t::stats, vlc_demux_chained_t::thread, vlc_demux_chained_t::time, unlikely, vlc_clone(), vlc_demux_chained_Thread(), vlc_mutex_destroy(), vlc_mutex_init(), vlc_stream_Delete(), vlc_stream_fifo_Close(), vlc_stream_fifo_New(), and VLC_THREAD_PRIORITY_INPUT.

◆ vlc_demux_chained_Send()

void vlc_demux_chained_Send ( vlc_demux_chained_t ,
block_t block 

Sends data to a chained demuxer.

This queues data for a chained demuxer to consume.

blockdata block to queue

References vlc_demux_chained_t::fifo, and vlc_stream_fifo_Queue().