VLC
4.0.0-dev
|
Go to the source code of this file.
Data Structures | |
struct | vlc_input_decoder_callbacks |
Functions | |
vlc_input_decoder_t * | vlc_input_decoder_New (vlc_object_t *parent, es_format_t *, vlc_clock_t *, input_resource_t *, sout_instance_t *, bool thumbnailing, const struct vlc_input_decoder_callbacks *cbs, void *userdata) |
Spawns a new decoder thread from the input thread. More... | |
void | vlc_input_decoder_ChangePause (vlc_input_decoder_t *, bool b_paused, vlc_tick_t i_date) |
This function changes the pause state. More... | |
void | vlc_input_decoder_ChangeRate (vlc_input_decoder_t *dec, float rate) |
Changes the decoder rate. More... | |
void | vlc_input_decoder_ChangeDelay (vlc_input_decoder_t *, vlc_tick_t i_delay) |
This function changes the delay. More... | |
void | vlc_input_decoder_StartWait (vlc_input_decoder_t *) |
This function makes the decoder start waiting for a valid data block from its fifo. More... | |
void | vlc_input_decoder_Wait (vlc_input_decoder_t *) |
This function waits for the decoder to actually receive data. More... | |
void | vlc_input_decoder_StopWait (vlc_input_decoder_t *) |
This function exits the waiting mode of the decoder. More... | |
bool | vlc_input_decoder_IsEmpty (vlc_input_decoder_t *) |
This function returns true if the decoder fifo is empty and false otherwise. More... | |
int | vlc_input_decoder_SetCcState (vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool b_decode) |
This function activates the request closed caption channel. More... | |
int | vlc_input_decoder_GetCcState (vlc_input_decoder_t *, vlc_fourcc_t, int i_channel, bool *pb_decode) |
This function returns an error if the requested channel does not exist and set pb_decode to the channel status(active or not) otherwise. More... | |
void | vlc_input_decoder_GetCcDesc (vlc_input_decoder_t *, decoder_cc_desc_t *) |
This function get cc channels descriptions. More... | |
void | vlc_input_decoder_FrameNext (vlc_input_decoder_t *p_dec, vlc_tick_t *pi_duration) |
This function force the display of the next picture and fills the stream time consumed. More... | |
bool | vlc_input_decoder_HasFormatChanged (vlc_input_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. More... | |
size_t | vlc_input_decoder_GetFifoSize (vlc_input_decoder_t *p_dec) |
This function returns the current size in bytes of the decoder fifo. More... | |
int | vlc_input_decoder_GetVbiPage (vlc_input_decoder_t *, bool *opaque) |
int | vlc_input_decoder_SetVbiPage (vlc_input_decoder_t *, unsigned page) |
int | vlc_input_decoder_SetVbiOpaque (vlc_input_decoder_t *, bool opaque) |
void | vlc_input_decoder_SetVoutMouseEvent (vlc_input_decoder_t *, vlc_mouse_event, void *) |
int | vlc_input_decoder_AddVoutOverlay (vlc_input_decoder_t *, subpicture_t *, size_t *) |
int | vlc_input_decoder_DelVoutOverlay (vlc_input_decoder_t *, size_t) |
int vlc_input_decoder_AddVoutOverlay | ( | vlc_input_decoder_t * | , |
subpicture_t * | , | ||
size_t * | |||
) |
References subpicture_t::b_ephemer, vlc_input_decoder_t::dec, decoder_t::fmt_in, es_format_t::i_cat, subpicture_t::i_channel, subpicture_t::i_order, subpicture_t::i_start, subpicture_t::i_stop, vlc_input_decoder_t::lock, vlc_input_decoder_t::p_vout, VIDEO_ES, VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, vlc_tick_now(), vout_PutSubpicture(), and vout_RegisterSubpictureChannel().
Referenced by EsOutVaControlLocked().
void vlc_input_decoder_ChangeDelay | ( | vlc_input_decoder_t * | , |
vlc_tick_t | i_delay | ||
) |
This function changes the delay.
References vlc_input_decoder_t::delay, vlc_input_decoder_t::p_fifo, vlc_fifo_Lock(), and vlc_fifo_Unlock().
Referenced by EsOutDecoderChangeDelay().
void vlc_input_decoder_ChangePause | ( | vlc_input_decoder_t * | , |
bool | b_paused, | ||
vlc_tick_t | i_date | ||
) |
This function changes the pause state.
The date parameter MUST hold the exact date at which the change has been done for proper vout/aout pausing.
References vlc_input_decoder_t::frames_countdown, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::pause_date, vlc_input_decoder_t::paused, vlc_fifo_Lock(), vlc_fifo_Signal(), and vlc_fifo_Unlock().
Referenced by EsOutDecodersChangePause().
void vlc_input_decoder_ChangeRate | ( | vlc_input_decoder_t * | dec, |
float | rate | ||
) |
Changes the decoder rate.
This function changes rate of the intended playback speed to nominal speed.
dec | decoder |
rate | playback rate (default is 1) |
References vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::request_rate, vlc_fifo_Lock(), and vlc_fifo_Unlock().
Referenced by EsOutChangeRate(), and EsOutCreateDecoder().
int vlc_input_decoder_DelVoutOverlay | ( | vlc_input_decoder_t * | , |
size_t | |||
) |
void vlc_input_decoder_FrameNext | ( | vlc_input_decoder_t * | p_dec, |
vlc_tick_t * | pi_duration | ||
) |
This function force the display of the next picture and fills the stream time consumed.
References vlc_input_decoder_t::fmt, vlc_input_decoder_t::frames_countdown, es_format_t::i_cat, vlc_input_decoder_t::lock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::paused, VIDEO_ES, vlc_fifo_Lock(), vlc_fifo_Signal(), vlc_fifo_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), and vout_NextPicture().
Referenced by EsOutFrameNext().
void vlc_input_decoder_GetCcDesc | ( | vlc_input_decoder_t * | , |
decoder_cc_desc_t * | |||
) |
This function get cc channels descriptions.
References vlc_input_decoder_t::cc, vlc_input_decoder_t::desc, vlc_input_decoder_t::lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutSend().
int vlc_input_decoder_GetCcState | ( | vlc_input_decoder_t * | , |
vlc_fourcc_t | , | ||
int | i_channel, | ||
bool * | pb_decode | ||
) |
This function returns an error if the requested channel does not exist and set pb_decode to the channel status(active or not) otherwise.
References vlc_input_decoder_t::cc, vlc_input_decoder_t::lock, vlc_input_decoder_t::pp_decoder, VLC_EGENERIC, vlc_input_decoder_HasCCChanFlag(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_SUCCESS.
Referenced by EsIsSelected().
size_t vlc_input_decoder_GetFifoSize | ( | vlc_input_decoder_t * | p_dec | ) |
This function returns the current size in bytes of the decoder fifo.
References block_FifoSize(), and vlc_input_decoder_t::p_fifo.
Referenced by EsOutIsExtraBufferingAllowed().
int vlc_input_decoder_GetVbiPage | ( | vlc_input_decoder_t * | , |
bool * | opaque | ||
) |
References vlc_input_decoder_t::dec, DecoderHasVbi(), var_GetBool(), and var_GetInteger().
Referenced by EsOutSelectEs().
bool vlc_input_decoder_HasFormatChanged | ( | vlc_input_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 vlc_input_decoder_t::b_fmt_description, es_format_Copy(), vlc_input_decoder_t::fmt, vlc_input_decoder_t::lock, vlc_input_decoder_t::p_description, vlc_meta_Merge(), vlc_meta_New(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by EsOutSend().
bool vlc_input_decoder_IsEmpty | ( | vlc_input_decoder_t * | ) |
This function returns true if the decoder fifo is empty and false otherwise.
References AUDIO_ES, vlc_input_decoder_t::b_draining, vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::drained, vlc_input_decoder_t::fmt, es_format_t::i_cat, vlc_input_decoder_t::lock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, sout_InputIsEmpty(), VIDEO_ES, vlc_fifo_IsEmpty(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), and vout_IsEmpty().
Referenced by EsOutDecodersIsEmpty(), and EsOutDrainDecoder().
vlc_input_decoder_t* vlc_input_decoder_New | ( | vlc_object_t * | parent, |
es_format_t * | fmt, | ||
vlc_clock_t * | p_clock, | ||
input_resource_t * | resource, | ||
sout_instance_t * | p_sout, | ||
bool | thumbnailing, | ||
const struct vlc_input_decoder_callbacks * | cbs, | ||
void * | cbs_userdata | ||
) |
Spawns a new decoder thread from the input thread.
p_input | the input thread |
p_es | the es descriptor |
References decoder_New().
Referenced by EsOutCreateDecoder(), EsOutSetRecord(), and vlc_input_decoder_SetCcState().
int vlc_input_decoder_SetCcState | ( | vlc_input_decoder_t * | , |
vlc_fourcc_t | , | ||
int | i_channel, | ||
bool | b_decode | ||
) |
This function activates the request closed caption channel.
References _, vlc_input_decoder_t::cc, subs_format_t::cc, vlc_input_decoder_t::dec, DecoderUnsupportedCodec(), vlc_input_decoder_t::desc, es_format_Init(), vlc_input_decoder_t::fmt, subs_format_t::i_channel, decoder_cc_desc_t::i_reorder_depth, subs_format_t::i_reorder_depth, vlc_input_decoder_t::lock, msg_Err, vlc_input_decoder_t::p_clock, decoder_t::p_module, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::pp_decoder, SPU_ES, es_format_t::subs, vlc_dialog_display_error, VLC_EGENERIC, vlc_input_decoder_Delete(), vlc_input_decoder_HasCCChanFlag(), vlc_input_decoder_New(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, and VLC_SUCCESS.
Referenced by EsOutSelectEs(), EsOutUnselectEs(), and vlc_input_decoder_Delete().
int vlc_input_decoder_SetVbiOpaque | ( | vlc_input_decoder_t * | , |
bool | opaque | ||
) |
References vlc_input_decoder_t::dec, DecoderHasVbi(), var_SetBool(), and VLC_EGENERIC.
Referenced by EsOutVaPrivControlLocked().
int vlc_input_decoder_SetVbiPage | ( | vlc_input_decoder_t * | , |
unsigned | page | ||
) |
References vlc_input_decoder_t::dec, DecoderHasVbi(), var_SetInteger(), and VLC_EGENERIC.
Referenced by EsOutVaPrivControlLocked().
void vlc_input_decoder_SetVoutMouseEvent | ( | vlc_input_decoder_t * | , |
vlc_mouse_event | , | ||
void * | |||
) |
void vlc_input_decoder_StartWait | ( | vlc_input_decoder_t * | ) |
This function makes the decoder start waiting for a valid data block from its fifo.
References vlc_input_decoder_t::b_first, vlc_input_decoder_t::b_has_data, vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::lock, vlc_cond_signal(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_input_decoder_t::wait_request.
Referenced by EsOutChangePosition(), EsOutCreateDecoder(), and EsOutSetRecord().
void vlc_input_decoder_StopWait | ( | vlc_input_decoder_t * | ) |
This function exits the waiting mode of the decoder.
References vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::lock, vlc_cond_signal(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_input_decoder_t::wait_request.
Referenced by EsOutDecodersStopBuffering().
void vlc_input_decoder_Wait | ( | vlc_input_decoder_t * | ) |
This function waits for the decoder to actually receive data.
References vlc_input_decoder_t::b_has_data, vlc_input_decoder_t::b_idle, vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::dec, vlc_input_decoder_t::lock, msg_Err, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::paused, vlc_cond_wait(), vlc_fifo_IsEmpty(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_input_decoder_t::wait_acknowledge.
Referenced by EsOutDecodersStopBuffering().