VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
decoder.h File Reference
Include dependency graph for decoder.h:

Go to the source code of this file.

Macros

#define BLOCK_FLAG_CORE_FLUSH   (1 <<BLOCK_FLAG_CORE_PRIVATE_SHIFT)
#define BLOCK_FLAG_CORE_EOS   (1 <<(BLOCK_FLAG_CORE_PRIVATE_SHIFT + 1))

Functions

decoder_tinput_DecoderNew (input_thread_t *, es_format_t *, input_clock_t *, sout_instance_t *)
 Spawns a new decoder thread from the input thread.
void input_DecoderChangePause (decoder_t *, bool b_paused, mtime_t i_date)
 This function changes the pause state.
void input_DecoderChangeDelay (decoder_t *, mtime_t i_delay)
 This function changes the delay.
void input_DecoderStartBuffering (decoder_t *)
 This function starts the buffering mode.
void input_DecoderWaitBuffering (decoder_t *)
 This function waits for the decoder to have buffered sufficient data.
void input_DecoderStopBuffering (decoder_t *)
 This function stops the buffering mode.
bool input_DecoderIsEmpty (decoder_t *)
 This function returns true if the decoder fifo is empty and false otherwise.
int input_DecoderSetCcState (decoder_t *, bool b_decode, int i_channel)
 This function activates the request closed caption channel.
int input_DecoderGetCcState (decoder_t *, bool *pb_decode, int i_channel)
 This function returns an error if the requested channel does not exist and set pb_decode to the channel status(active or not) otherwise.
void input_DecoderIsCcPresent (decoder_t *, bool pb_present[4])
 This function set each pb_present entry to true if the corresponding channel exists or false otherwise.
void input_DecoderFrameNext (decoder_t *p_dec, mtime_t *pi_duration)
 This function force the display of the next picture and fills the stream time consumed.
bool input_DecoderHasFormatChanged (decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta)
 This function will return true if the ES format or meta data have changed since the last call.
size_t input_DecoderGetFifoSize (decoder_t *p_dec)
 This function returns the current size in bytes of the decoder fifo.
void input_DecoderGetObjects (decoder_t *, vout_thread_t **, audio_output_t **)
 This function returns the objects associated to a decoder.

Macro Definition Documentation

#define BLOCK_FLAG_CORE_EOS   (1 <<(BLOCK_FLAG_CORE_PRIVATE_SHIFT + 1))
#define BLOCK_FLAG_CORE_FLUSH   (1 <<BLOCK_FLAG_CORE_PRIVATE_SHIFT)

Function Documentation

void input_DecoderChangeDelay ( decoder_t ,
mtime_t  i_delay 
)
void input_DecoderChangePause ( decoder_t ,
bool  b_paused,
mtime_t  i_date 
)

This function changes the pause state.

The date parameter MUST hold the exact date at wich the change has been done for proper vout/aout pausing.

References decoder_owner_sys_t::b_paused, DecoderOutputChangePause(), decoder_owner_sys_t::i_date, decoder_owner_sys_t::i_ignore, likely, decoder_owner_sys_t::lock, decoder_t::p_owner, decoder_owner_sys_t::pause, vlc_cond_signal(), vlc_mutex_lock(), vlc_mutex_unlock(), and decoder_owner_sys_t::wait_request.

Referenced by EsOutDecodersChangePause().

void input_DecoderFrameNext ( decoder_t p_dec,
mtime_t pi_duration 
)
int input_DecoderGetCcState ( decoder_t ,
bool *  pb_decode,
int  i_channel 
)

This function returns an error if the requested channel does not exist and set pb_decode to the channel status(active or not) otherwise.

< Unspecified error

< Unspecified error

References decoder_owner_sys_t::cc, decoder_owner_sys_t::lock, decoder_t::p_owner, decoder_owner_sys_t::pb_present, decoder_owner_sys_t::pp_decoder, VLC_EGENERIC, vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by EsIsSelected().

size_t input_DecoderGetFifoSize ( decoder_t p_dec)

This function returns the current size in bytes of the decoder fifo.

References block_FifoSize(), decoder_owner_sys_t::p_fifo, and decoder_t::p_owner.

Referenced by EsOutIsExtraBufferingAllowed().

void input_DecoderGetObjects ( decoder_t ,
vout_thread_t **  ,
audio_output_t **   
)

This function returns the objects associated to a decoder.

They must be released using vlc_object_release().

References decoder_owner_sys_t::lock, decoder_owner_sys_t::p_aout, decoder_t::p_owner, decoder_owner_sys_t::p_vout, vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_hold.

Referenced by EsOutControlLocked().

bool input_DecoderHasFormatChanged ( decoder_t p_dec,
es_format_t p_fmt,
vlc_meta_t **  pp_meta 
)

This function will return true if the ES format or meta data have changed since the last call.

In which case, it will do a copy of the current es_format_t if p_fmt is not NULL and will do a copy of the current description if pp_meta is non NULL. The es_format_t MUST be freed by es_format_Clean and *pp_meta MUST be freed by vlc_meta_Delete. Otherwise it will return false and will not initialize p_fmt and *pp_meta.

References decoder_owner_sys_t::b_fmt_description, es_format_Copy(), decoder_owner_sys_t::fmt_description, decoder_owner_sys_t::lock, decoder_owner_sys_t::p_description, decoder_t::p_owner, vlc_meta_Merge(), vlc_meta_New(), vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by EsOutSend().

void input_DecoderIsCcPresent ( decoder_t ,
bool  pb_present[4] 
)

This function set each pb_present entry to true if the corresponding channel exists or false otherwise.

References decoder_owner_sys_t::cc, decoder_owner_sys_t::lock, decoder_t::p_owner, decoder_owner_sys_t::pb_present, vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by EsOutSend().

bool input_DecoderIsEmpty ( decoder_t )
decoder_t* input_DecoderNew ( input_thread_t p_input,
es_format_t fmt,
input_clock_t p_clock,
sout_instance_t p_sout 
)

Spawns a new decoder thread from the input thread.

Parameters
p_inputthe input thread
p_esthe es descriptor
Returns
the spawned decoder object

References decoder_New(), input_thread_t::p, input_thread_private_t::p_resource, and VLC_OBJECT.

Referenced by EsCreateDecoder(), and EsOutSetRecord().

int input_DecoderSetCcState ( decoder_t ,
bool  b_decode,
int  i_channel 
)
void input_DecoderStartBuffering ( decoder_t )
void input_DecoderStopBuffering ( decoder_t )
void input_DecoderWaitBuffering ( decoder_t )