VLC 4.0.0-dev
Loading...
Searching...
No Matches

Demultiplexers wrapped by another demultiplexer. More...

Collaboration diagram for Chained demultiplexer:

Typedefs

typedef struct vlc_demux_chained_t vlc_demux_chained_t
 

Functions

vlc_demux_chained_tvlc_demux_chained_New (vlc_object_t *parent, const char *name, es_out_t *out)
 Creates a chained demuxer.
 
void vlc_demux_chained_Delete (vlc_demux_chained_t *)
 Destroys a chained demuxer.
 
void vlc_demux_chained_Send (vlc_demux_chained_t *demux, block_t *block)
 Sends data to a chained demuxer.
 
int vlc_demux_chained_ControlVa (vlc_demux_chained_t *demux, int query, va_list args)
 Controls a chained demuxer.
 
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,
  ... 
)
inlinestatic

◆ vlc_demux_chained_ControlVa()

int vlc_demux_chained_ControlVa ( vlc_demux_chained_t demux,
int  query,
va_list  args 
)

Controls a chained demuxer.

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

Note
In most cases, vlc_demux_chained_Control() should be used instead.
Warning
As per vlc_demux_chained_New(), most demux controls are not, and cannot be, supported; VLC_EGENERIC is returned.
Parameters
demuxthe chained demuxer instance to send the request to
querydemux control (see demux_query_e)
argsvariable arguments (depending on the query)

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 dc)

Destroys a chained demuxer.

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

References vlc_demux_chained_t::thread, vlc_join(), vlc_stream_fifo_Close(), and vlc_demux_chained_t::writer.

Referenced by vlc_rtp_es_mux_destroy().

◆ 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.

Note
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.
Parameters
parentparent VLC object
namechained demux module name (e.g. "ts")
outelementary stream output for the chained demux
Returns
a non-NULL pointer on success, NULL on failure.

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

Referenced by vlc_rtp_mux_request().

◆ vlc_demux_chained_Send()

void vlc_demux_chained_Send ( vlc_demux_chained_t demux,
block_t block 
)

Sends data to a chained demuxer.

This queues data for a chained demuxer to consume.

Parameters
demuxthe chained demuxer instance to send the block to
blockdata block to queue

References vlc_stream_fifo_Queue(), and vlc_demux_chained_t::writer.

Referenced by vlc_rtp_es_mux_send().