VLC 4.0.0-dev
|
The input decoder connects the input client pushing data to the decoder implementation (through the matching elementary stream) and the following output for audio, video and subtitles. More...
Data Structures | |
struct | vlc_input_decoder_t |
Macros | |
#define | PREROLL_NONE VLC_TICK_MIN |
#define | PREROLL_FORCED VLC_TICK_MAX |
#define | MAX_CC_DECODERS 64 /* The es_out only creates one type of es */ |
#define | DECODER_BOGUS_VIDEO_DELAY ((vlc_tick_t)(DEFAULT_PTS_DELAY * 30)) |
#define | DECODER_SPU_VOUT_WAIT_DURATION VLC_TICK_FROM_MS(200) |
#define | BLOCK_FLAG_CORE_PRIVATE_RELOADED (1 << BLOCK_FLAG_CORE_PRIVATE_SHIFT) |
#define | decoder_Notify(decoder_priv, event, ...) |
Enumerations | |
enum | reload { RELOAD_NO_REQUEST , RELOAD_DECODER , RELOAD_DECODER_AOUT } |
Functions | |
static vlc_input_decoder_t * | dec_get_owner (decoder_t *p_dec) |
static bool | vlc_input_decoder_IsSynchronous (const vlc_input_decoder_t *dec) |
When the input decoder is being used only for packetizing (happen in stream output configuration.), there's no need to spawn a decoder thread. More... | |
static void | Decoder_ChangeOutputPause (vlc_input_decoder_t *p_owner, bool paused, vlc_tick_t date) |
static void | Decoder_ChangeOutputRate (vlc_input_decoder_t *p_owner, float rate) |
static void | Decoder_ChangeOutputDelay (vlc_input_decoder_t *p_owner, vlc_tick_t delay) |
static void | Decoder_UpdateOutState (vlc_input_decoder_t *owner) |
static int | LoadDecoder (decoder_t *p_dec, bool b_packetizer, es_format_t *fmt_in, const es_format_t *restrict p_fmt) |
Load a decoder module. More... | |
static int | DecoderThread_Reload (vlc_input_decoder_t *p_owner, const es_format_t *restrict p_fmt, enum reload reload) |
static void | DecoderUpdateFormatLocked (vlc_input_decoder_t *p_owner) |
static void | MouseEvent (const vlc_mouse_t *newmouse, void *user_data) |
static bool | aout_replaygain_changed (const audio_replay_gain_t *a, const audio_replay_gain_t *b) |
static int | ModuleThread_UpdateAudioFormat (decoder_t *p_dec) |
static int | CreateVoutIfNeeded (vlc_input_decoder_t *) |
static int | ModuleThread_UpdateVideoFormat (decoder_t *p_dec, vlc_video_context *vctx) |
static vlc_decoder_device * | ModuleThread_GetDecoderDevice (decoder_t *p_dec) |
static picture_t * | ModuleThread_NewVideoBuffer (decoder_t *p_dec) |
static subpicture_t * | ModuleThread_NewSpuBuffer (decoder_t *p_dec, const subpicture_updater_t *p_updater) |
static int | InputThread_GetInputAttachments (decoder_t *p_dec, input_attachment_t ***ppp_attachment, int *pi_attachment) |
static vlc_tick_t | ModuleThread_GetDisplayDate (decoder_t *p_dec, vlc_tick_t system_now, vlc_tick_t i_ts) |
static float | ModuleThread_GetDisplayRate (decoder_t *p_dec) |
vlc_frame_t * | decoder_NewAudioBuffer (decoder_t *dec, int samples) |
This function will return a new audio buffer usable by a decoder as an output buffer. More... | |
static void | RequestReload (vlc_input_decoder_t *p_owner) |
static void | DecoderWaitUnblock (vlc_input_decoder_t *p_owner) |
static void | DecoderUpdatePreroll (vlc_tick_t *pi_preroll, const vlc_frame_t *p) |
static void | DecoderPlayCc (vlc_input_decoder_t *p_owner, vlc_frame_t *p_cc, const decoder_cc_desc_t *p_desc) |
static void | PacketizerGetCc (vlc_input_decoder_t *p_owner, decoder_t *p_dec_cc) |
static void | ModuleThread_QueueCc (decoder_t *p_videodec, vlc_frame_t *p_cc, const decoder_cc_desc_t *p_desc) |
static int | ModuleThread_PlayVideo (vlc_input_decoder_t *p_owner, picture_t *p_picture) |
static void | ModuleThread_QueueVideo (decoder_t *p_dec, picture_t *p_pic) |
static vlc_decoder_device * | thumbnailer_get_device (decoder_t *p_dec) |
static picture_t * | thumbnailer_buffer_new (decoder_t *p_dec) |
static void | ModuleThread_QueueThumbnail (decoder_t *p_dec, picture_t *p_pic) |
static int | ModuleThread_PlayAudio (vlc_input_decoder_t *p_owner, vlc_frame_t *p_audio) |
static void | ModuleThread_QueueAudio (decoder_t *p_dec, vlc_frame_t *p_aout_buf) |
static void | ModuleThread_PlaySpu (vlc_input_decoder_t *p_owner, subpicture_t *p_subpic) |
static void | ModuleThread_QueueSpu (decoder_t *p_dec, subpicture_t *p_spu) |
static void | DecoderThread_ProcessInput (vlc_input_decoder_t *p_owner, vlc_frame_t *frame) |
Decode a frame. More... | |
static void | DecoderThread_DecodeBlock (vlc_input_decoder_t *p_owner, vlc_frame_t *frame) |
static void | DecoderThread_Flush (vlc_input_decoder_t *p_owner) |
static void * | DecoderThread (void *p_data) |
The decoding main loop. More... | |
static vlc_input_decoder_t * | CreateDecoder (vlc_object_t *p_parent, const struct vlc_input_decoder_cfg *cfg) |
Create a decoder object. More... | |
static void | DeleteDecoder (vlc_input_decoder_t *p_owner, enum es_format_category_e i_cat) |
Destroys a decoder object. More... | |
static void | DecoderUnsupportedCodec (decoder_t *p_dec, const es_format_t *fmt, bool b_decoding) |
static vlc_input_decoder_t * | decoder_New (vlc_object_t *p_parent, const struct vlc_input_decoder_cfg *cfg) |
vlc_input_decoder_t * | vlc_input_decoder_New (vlc_object_t *parent, const struct vlc_input_decoder_cfg *cfg) |
Spawns a new decoder thread from the input thread. More... | |
vlc_input_decoder_t * | vlc_input_decoder_Create (vlc_object_t *p_parent, const es_format_t *fmt, struct vlc_clock_t *clock, input_resource_t *p_resource) |
Spawn a decoder thread outside of the input thread. More... | |
void | vlc_input_decoder_Delete (vlc_input_decoder_t *p_owner) |
Kills a decoder thread and waits until it's finished. More... | |
void | vlc_input_decoder_Decode (vlc_input_decoder_t *p_owner, vlc_frame_t *frame, bool b_do_pace) |
Put a vlc_frame_t in the decoder's fifo. More... | |
bool | vlc_input_decoder_IsEmpty (vlc_input_decoder_t *p_owner) |
This function returns true if the decoder fifo is empty and false otherwise. More... | |
void | vlc_input_decoder_Drain (vlc_input_decoder_t *p_owner) |
Signals that there are no further frames to decode, and requests that the decoder drain all pending buffers. More... | |
void | vlc_input_decoder_Flush (vlc_input_decoder_t *p_owner) |
Requests that the decoder immediately discard all pending buffers. More... | |
static bool | vlc_input_decoder_HasCCChanFlag (vlc_input_decoder_t *p_owner, vlc_fourcc_t codec, int i_channel) |
int | vlc_input_decoder_SetCcState (vlc_input_decoder_t *p_owner, vlc_fourcc_t codec, int i_channel, bool b_decode) |
This function activates the request closed caption channel. More... | |
int | vlc_input_decoder_GetCcState (vlc_input_decoder_t *p_owner, vlc_fourcc_t codec, 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_ChangePause (vlc_input_decoder_t *p_owner, bool b_paused, vlc_tick_t i_date) |
This function changes the pause state. More... | |
void | vlc_input_decoder_ChangeRate (vlc_input_decoder_t *owner, float rate) |
Changes the decoder rate. More... | |
void | vlc_input_decoder_ChangeDelay (vlc_input_decoder_t *owner, vlc_tick_t delay) |
void | vlc_input_decoder_StartWait (vlc_input_decoder_t *p_owner) |
This function makes the decoder start waiting for a valid data block from its fifo. More... | |
void | vlc_input_decoder_StopWait (vlc_input_decoder_t *p_owner) |
This function exits the waiting mode of the decoder. More... | |
void | vlc_input_decoder_Wait (vlc_input_decoder_t *p_owner) |
This function waits for the decoder to actually receive data. More... | |
void | vlc_input_decoder_FrameNext (vlc_input_decoder_t *p_owner) |
This function forces the display of the next picture. More... | |
void | vlc_input_decoder_GetStatus (vlc_input_decoder_t *p_owner, struct vlc_input_decoder_status *status) |
Get the last status of the decoder. More... | |
size_t | vlc_input_decoder_GetFifoSize (vlc_input_decoder_t *p_owner) |
This function returns the current size in bytes of the decoder fifo. More... | |
static bool | DecoderHasVbi (decoder_t *dec) |
int | vlc_input_decoder_GetVbiPage (vlc_input_decoder_t *owner, bool *opaque) |
int | vlc_input_decoder_SetVbiPage (vlc_input_decoder_t *owner, unsigned page) |
int | vlc_input_decoder_SetVbiOpaque (vlc_input_decoder_t *owner, bool opaque) |
void | vlc_input_decoder_SetVoutMouseEvent (vlc_input_decoder_t *owner, vlc_mouse_event mouse_event, void *user_data) |
int | vlc_input_decoder_AddVoutOverlay (vlc_input_decoder_t *owner, subpicture_t *sub, size_t *channel) |
int | vlc_input_decoder_DelVoutOverlay (vlc_input_decoder_t *owner, size_t channel) |
int | vlc_input_decoder_SetSpuHighlight (vlc_input_decoder_t *p_owner, const vlc_spu_highlight_t *spu_hl) |
Variables | |
static const struct decoder_owner_callbacks | dec_video_cbs |
static const struct decoder_owner_callbacks | dec_thumbnailer_cbs |
static const struct decoder_owner_callbacks | dec_audio_cbs |
static const struct decoder_owner_callbacks | dec_spu_cbs |
The input decoder connects the input client pushing data to the decoder implementation (through the matching elementary stream) and the following output for audio, video and subtitles.
It follows the locking rules below:
Backpressure preventing starvation is done by the pacing of the decoder, the calls into the decoder implementation, and the limits of the fifo queue.
Basically a very fast decoder will often wait since the fifo will be consumed really quickly and thus almost never stay under the lock. Likewise, when the decoder is slower and the fifo can grow, it also means that the decoder thread will wait more often on the decoder_t::pf_decode
call, which is done without the fifo lock as per above rules.
In addition with the standard input/output cycle from the decoder, the video decoders can create sub-decoders for the closed captions support embedded in the supplementary information from the codecs.
To do so, they need to create a decoder_cc_desc_t
matching with the format that needs to be described (number of channels, type of channels) and they then create them along with the closed-captions content with decoder_QueueCc
.
In the input/decoder.c
code, the access to the sub-decoders in the cc.pp_decoders table is protected through the cc.lock
mutex. Taking this lock ensures that the sub-decoder won't get asynchronously removed while using it, and any mutex from the sub-decoder can then be taken under this lock.
#define BLOCK_FLAG_CORE_PRIVATE_RELOADED (1 << BLOCK_FLAG_CORE_PRIVATE_SHIFT) |
#define DECODER_BOGUS_VIDEO_DELAY ((vlc_tick_t)(DEFAULT_PTS_DELAY * 30)) |
#define decoder_Notify | ( | decoder_priv, | |
event, | |||
... | |||
) |
#define DECODER_SPU_VOUT_WAIT_DURATION VLC_TICK_FROM_MS(200) |
#define MAX_CC_DECODERS 64 /* The es_out only creates one type of es */ |
#define PREROLL_FORCED VLC_TICK_MAX |
#define PREROLL_NONE VLC_TICK_MIN |
enum reload |
|
static |
|
static |
Create a decoder object.
p_input | the input thread |
p_es | the es descriptor |
b_packetizer | instead of a decoder |
References AUDIO_ES, es_format_t::audio_replay_gain, AUDIO_REPLAY_GAIN_MAX, vlc_input_decoder_t::b_draining, vlc_input_decoder_t::b_first, vlc_input_decoder_t::b_fmt_description, vlc_input_decoder_t::b_has_data, vlc_input_decoder_t::b_idle, es_format_t::b_packetized, vlc_input_decoder_t::b_sout_created, vlc_input_decoder_t::b_supported, vlc_input_decoder_t::b_waiting, block_FifoNew, decoder_t::cbs, vlc_input_decoder_t::cbs, vlc_input_decoder_cfg::cbs, vlc_input_decoder_cfg::cbs_data, vlc_input_decoder_t::cbs_userdata, vlc_input_decoder_t::cc, vlc_input_decoder_cfg::clock, vlc_input_decoder_t::dec, dec_audio_cbs, vlc_input_decoder_t::dec_fmt_in, dec_spu_cbs, dec_thumbnailer_cbs, dec_video_cbs, vlc_input_decoder_t::delay, vlc_input_decoder_t::desc, vlc_input_decoder_t::error, es_format_Init(), vlc_input_decoder_t::flushing, vlc_input_decoder_t::fmt, vlc_input_decoder_cfg::fmt, decoder_t::fmt_in, decoder_t::fmt_out, vlc_input_decoder_t::frames_countdown, decoder_cc_desc_t::i_608_channels, decoder_cc_desc_t::i_708_channels, es_format_t::i_cat, vlc_input_decoder_t::i_preroll_end, vlc_input_decoder_t::i_spu_channel, vlc_input_decoder_t::i_spu_order, vlc_input_decoder_cfg::input_type, INPUT_TYPE_PREPARSING, INPUT_TYPE_THUMBNAILING, LoadDecoder(), vlc_input_decoder_t::lock, MAX_CC_DECODERS, vlc_input_decoder_t::mouse_event, vlc_input_decoder_t::mouse_lock, vlc_input_decoder_t::mouse_opaque, msg_Err, vlc_input_decoder_t::output_delay, vlc_input_decoder_t::output_paused, vlc_input_decoder_t::output_rate, vlc_input_decoder_t::p_aout, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_clock, vlc_input_decoder_t::p_description, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_packetizer, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::pause_date, vlc_input_decoder_t::paused, audio_replay_gain_t::pb_gain, audio_replay_gain_t::pb_peak, audio_replay_gain_t::pf_gain, audio_replay_gain_t::pf_peak, vlc_input_decoder_t::pktz_fmt_in, vlc_input_decoder_t::pp_decoder, PREROLL_NONE, vlc_input_decoder_t::psz_id, vlc_input_decoder_t::rate, vlc_input_decoder_t::reload, RELOAD_NO_REQUEST, vlc_input_decoder_cfg::resource, vlc_input_decoder_cfg::sout, SPU_ES, vlc_input_decoder_cfg::str_id, unlikely, VIDEO_ES, vlc_cond_init(), vlc_custom_create, vlc_mutex_init(), vlc_object_delete, VLC_TICK_INVALID, VOUT_SPU_CHANNEL_INVALID, vlc_input_decoder_t::vout_started, vlc_input_decoder_t::wait_acknowledge, vlc_input_decoder_t::wait_fifo, and vlc_input_decoder_t::wait_request.
Referenced by decoder_New().
|
static |
References vlc_input_decoder_t::dec, DecoderUpdateFormatLocked(), vlc_input_decoder_t::fmt, decoder_t::fmt_out, video_format_t::i_chroma, es_format_t::i_codec, video_format_t::i_height, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, video_format_t::i_x_offset, video_format_t::i_y_offset, input_resource_RequestVout(), msg_Dbg, msg_Err, video_format_t::multiview_mode, video_format_t::orientation, vlc_input_decoder_t::out_pool, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_vout, picture_pool_Release(), es_format_t::video, vlc_fifo_Lock(), vlc_fifo_Unlock(), vout_configuration_t::vout, vlc_input_decoder_t::vout_order, and vlc_input_decoder_t::vout_started.
Referenced by ModuleThread_GetDecoderDevice(), and ModuleThread_UpdateVideoFormat().
|
inlinestatic |
References container_of.
Referenced by InputThread_GetInputAttachments(), ModuleThread_GetDecoderDevice(), ModuleThread_GetDisplayDate(), ModuleThread_GetDisplayRate(), ModuleThread_NewSpuBuffer(), ModuleThread_NewVideoBuffer(), ModuleThread_QueueAudio(), ModuleThread_QueueCc(), ModuleThread_QueueSpu(), ModuleThread_QueueThumbnail(), ModuleThread_QueueVideo(), ModuleThread_UpdateAudioFormat(), ModuleThread_UpdateVideoFormat(), MouseEvent(), and thumbnailer_buffer_new().
|
static |
References AUDIO_ES, vlc_input_decoder_t::dec, decoder_t::fmt_in, es_format_t::i_cat, vlc_input_decoder_t::i_spu_channel, msg_Dbg, vlc_input_decoder_t::output_delay, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, SPU_ES, VIDEO_ES, vlc_aout_stream_ChangeDelay(), vlc_assert_unreachable, vlc_fifo_Assert, vout_ChangeDelay(), vout_ChangeSpuDelay(), VOUT_SPU_CHANNEL_INVALID, and vlc_input_decoder_t::vout_started.
Referenced by Decoder_UpdateOutState(), and DecoderThread().
|
static |
References AUDIO_ES, vlc_input_decoder_t::dec, decoder_t::fmt_in, es_format_t::i_cat, msg_Dbg, vlc_input_decoder_t::output_paused, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, SPU_ES, VIDEO_ES, vlc_aout_stream_ChangePause(), vlc_assert_unreachable, vlc_fifo_Assert, vout_ChangePause(), and vlc_input_decoder_t::vout_started.
Referenced by Decoder_UpdateOutState(), and DecoderThread().
|
static |
References AUDIO_ES, vlc_input_decoder_t::dec, decoder_t::fmt_in, es_format_t::i_cat, vlc_input_decoder_t::i_spu_channel, msg_Dbg, vlc_input_decoder_t::output_rate, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, SPU_ES, VIDEO_ES, vlc_aout_stream_ChangeRate(), vlc_assert_unreachable, vlc_fifo_Assert, vout_ChangeRate(), vout_ChangeSpuRate(), VOUT_SPU_CHANNEL_INVALID, and vlc_input_decoder_t::vout_started.
Referenced by Decoder_UpdateOutState(), and DecoderThread().
|
static |
References _, AUDIO_ES, es_format_t::b_packetized, CreateDecoder(), vlc_input_decoder_t::dec, DecoderThread(), DecoderUnsupportedCodec(), DeleteDecoder(), vlc_input_decoder_t::error, vlc_input_decoder_cfg::fmt, decoder_t::fmt_in, es_format_t::i_cat, es_format_t::i_codec, msg_Err, N_, decoder_t::p_module, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_cfg::sout, sout_InputNew(), vlc_input_decoder_cfg::str_id, vlc_input_decoder_t::thread, UNKNOWN_ES, VIDEO_ES, vlc_clone(), vlc_dialog_display_error, vlc_gettext(), and vlc_input_decoder_IsSynchronous().
Referenced by vlc_input_decoder_Create(), and vlc_input_decoder_New().
vlc_frame_t * decoder_NewAudioBuffer | ( | decoder_t * | dec, |
int | i_nb_samples | ||
) |
This function will return a new audio buffer usable by a decoder as an output buffer.
It must be released with block_Release() or returned it to the caller as a decoder_QueueAudio parameter.
References es_format_t::audio, block_Alloc, decoder_t::fmt_out, audio_format_t::i_bytes_per_frame, audio_format_t::i_frame_length, vlc_frame_t::i_length, vlc_frame_t::i_nb_samples, vlc_frame_t::i_pts, and likely.
|
static |
References Decoder_ChangeOutputDelay(), Decoder_ChangeOutputPause(), Decoder_ChangeOutputRate(), vlc_input_decoder_t::delay, vlc_input_decoder_t::pause_date, vlc_input_decoder_t::paused, and vlc_input_decoder_t::rate.
Referenced by ModuleThread_UpdateAudioFormat(), and ModuleThread_UpdateVideoFormat().
|
static |
References decoder_t::fmt_in, es_format_t::i_cat, es_format_t::i_codec, SPU_ES, var_Type(), VLC_CODEC_TELETEXT, and VLC_VAR_INTEGER.
Referenced by vlc_input_decoder_GetVbiPage(), vlc_input_decoder_SetVbiOpaque(), and vlc_input_decoder_SetVbiPage().
|
static |
References vlc_input_decoder_t::aborting, block_Duplicate, block_FifoPut, block_Release, vlc_input_decoder_t::cc, vlc_input_decoder_t::desc, vlc_input_decoder_t::flushing, decoder_cc_desc_t::i_608_channels, decoder_cc_desc_t::i_708_channels, vlc_input_decoder_t::lock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::pp_decoder, vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_frame_Release(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by ModuleThread_QueueCc(), and PacketizerGetCc().
|
static |
The decoding main loop.
p_dec | the decoder |
References vlc_input_decoder_t::aborting, AUDIO_ES, vlc_input_decoder_t::b_draining, vlc_input_decoder_t::b_idle, DATA_ES, vlc_input_decoder_t::dec, Decoder_ChangeOutputDelay(), Decoder_ChangeOutputPause(), Decoder_ChangeOutputRate(), DecoderThread_Flush(), DecoderThread_ProcessInput(), vlc_input_decoder_t::delay, vlc_input_decoder_t::flushing, decoder_t::fmt_in, vlc_input_decoder_t::frames_countdown, es_format_t::i_cat, vlc_input_decoder_t::i_preroll_end, likely, vlc_input_decoder_t::output_delay, vlc_input_decoder_t::output_paused, vlc_input_decoder_t::output_rate, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::pause_date, vlc_input_decoder_t::paused, PREROLL_NONE, vlc_input_decoder_t::rate, SPU_ES, VIDEO_ES, vlc_aout_stream_Drain(), vlc_cond_signal(), vlc_fifo_DequeueUnlocked(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_fifo_Wait(), vlc_thread_set_name(), vlc_input_decoder_t::wait_acknowledge, and vlc_input_decoder_t::wait_fifo.
Referenced by decoder_New().
|
static |
References BLOCK_FLAG_CORE_PRIVATE_RELOADED, block_Release, vlc_input_decoder_t::dec, DecoderThread_ProcessInput(), vlc_input_decoder_t::error, vlc_frame_t::i_dts, vlc_frame_t::i_flags, vlc_frame_t::i_pts, decoder_t::obj, decoder_t::pf_decode, vlc_input_decoder_t::psz_id, RequestReload(), unlikely, vlc_assert_unreachable, vlc_object_get_tracer(), vlc_tracer_TraceStreamDTS(), VLCDEC_ECRITICAL, VLCDEC_RELOAD, and VLCDEC_SUCCESS.
Referenced by DecoderThread_ProcessInput().
|
static |
References vlc_input_decoder_t::b_supported, vlc_input_decoder_t::cc, vlc_input_decoder_t::dec, vlc_input_decoder_t::error, vlc_input_decoder_t::lock, MAX_CC_DECODERS, vlc_input_decoder_t::p_packetizer, decoder_t::pf_flush, vlc_input_decoder_t::pp_decoder, vlc_input_decoder_Flush(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by DecoderThread(), and vlc_input_decoder_Flush().
|
static |
Decode a frame.
p_dec | the decoder object |
frame | the block to decode |
References block_ChainRelease, BLOCK_FLAG_CORE_PRIVATE_RELOADED, block_Release, vlc_input_decoder_t::dec, DecoderThread_DecodeBlock(), DecoderThread_Reload(), DecoderUpdatePreroll(), vlc_input_decoder_t::error, es_format_IsSimilar(), decoder_t::fmt_in, decoder_t::fmt_out, vlc_frame_t::i_buffer, vlc_frame_t::i_flags, vlc_input_decoder_t::i_preroll_end, msg_Dbg, msg_Warn, vlc_input_decoder_t::p_fifo, vlc_frame_t::p_next, vlc_input_decoder_t::p_packetizer, vlc_input_decoder_t::p_sout, PacketizerGetCc(), decoder_t::pf_get_cc, decoder_t::pf_packetize, vlc_input_decoder_t::reload, RELOAD_DECODER, RELOAD_DECODER_AOUT, RELOAD_NO_REQUEST, unlikely, vlc_fifo_Lock(), vlc_fifo_Unlock(), and VLC_SUCCESS.
Referenced by DecoderThread(), DecoderThread_DecodeBlock(), vlc_input_decoder_Decode(), and vlc_input_decoder_Drain().
|
static |
References AUDIO_ES, vlc_input_decoder_t::dec, vlc_input_decoder_t::dec_fmt_in, decoder_Clean(), vlc_input_decoder_t::error, es_format_Clean(), es_format_Copy(), vlc_input_decoder_t::fmt, es_format_t::i_cat, input_resource_PutAout(), LoadDecoder(), vlc_input_decoder_t::p_aout, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_resource, RELOAD_DECODER_AOUT, vlc_aout_stream_Delete(), VLC_EGENERIC, and VLC_SUCCESS.
Referenced by DecoderThread_ProcessInput().
|
static |
References _, es_format_t::i_cat, es_format_t::i_codec, msg_Err, N_, VLC_CODEC_UNKNOWN, vlc_dialog_display_error, and vlc_fourcc_GetDescription().
Referenced by decoder_New(), and vlc_input_decoder_SetCcState().
|
static |
References vlc_input_decoder_t::b_fmt_description, vlc_input_decoder_t::dec, es_format_Clean(), es_format_Copy(), vlc_input_decoder_t::fmt, decoder_t::fmt_in, decoder_t::fmt_out, es_format_t::i_cat, decoder_t::p_description, vlc_input_decoder_t::p_description, vlc_input_decoder_t::p_fifo, vlc_fifo_Assert, and vlc_meta_Delete().
Referenced by CreateVoutIfNeeded(), ModuleThread_GetDecoderDevice(), and ModuleThread_UpdateAudioFormat().
|
inlinestatic |
References BLOCK_FLAG_CORRUPTED, BLOCK_FLAG_DISCONTINUITY, BLOCK_FLAG_PREROLL, p, PREROLL_FORCED, and VLC_TICK_INVALID.
Referenced by DecoderThread_ProcessInput().
|
static |
References vlc_input_decoder_t::b_has_data, vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::p_fifo, vlc_cond_signal(), vlc_fifo_Assert, vlc_fifo_WaitCond(), vlc_input_decoder_t::wait_acknowledge, and vlc_input_decoder_t::wait_request.
Referenced by ModuleThread_PlayAudio(), ModuleThread_PlaySpu(), and ModuleThread_PlayVideo().
|
static |
Destroys a decoder object.
p_dec | the decoder object |
References AUDIO_ES, block_FifoEmpty, block_FifoRelease, vlc_input_decoder_t::cc, DATA_ES, vlc_input_decoder_t::dec, vlc_input_decoder_t::dec_fmt_in, decoder_Clean(), decoder_Destroy(), decoder_Notify, es_format_Clean(), vlc_input_decoder_t::fmt, decoder_t::fmt_in, es_format_t::i_codec, vlc_input_decoder_t::i_spu_channel, input_resource_PutAout(), input_resource_PutVout(), INPUT_RESOURCE_VOUT_STOPPED, msg_Dbg, vlc_input_decoder_t::out_pool, vlc_input_decoder_t::p_aout, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_description, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_packetizer, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, picture_pool_Release(), vlc_input_decoder_t::pktz_fmt_in, sout_InputDelete(), SPU_ES, UNKNOWN_ES, vlc_input_decoder_t::vctx, VIDEO_ES, vlc_aout_stream_Delete(), vlc_assert_unreachable, vlc_meta_Delete(), vlc_video_context_Release(), vout_Hold(), vout_Release(), VOUT_SPU_CHANNEL_INVALID, and vout_UnregisterSubpictureChannel().
Referenced by decoder_New(), and vlc_input_decoder_Delete().
|
static |
|
static |
Load a decoder module.
References AUDIO_ES, decoder_t::b_frame_drop_allowed, decoder_Clean(), decoder_Init(), ES_CATEGORY_COUNT, es_format_Clean(), decoder_t::fmt_in, es_format_t::i_cat, module_need_var, decoder_t::p_module, SPU_ES, and VIDEO_ES.
Referenced by CreateDecoder(), and DecoderThread_Reload().
|
static |
References CreateVoutIfNeeded(), dec_get_owner(), DecoderUpdateFormatLocked(), vlc_input_decoder_t::fmt, decoder_t::fmt_out, video_format_t::lighting, video_format_t::mastering, video_format_t::MaxCLL, video_format_t::MaxFALL, msg_Dbg, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, var_InheritBool(), es_format_t::video, vlc_fifo_Lock(), vlc_fifo_Unlock(), and vout_GetDevice().
|
static |
|
static |
|
static |
References subpicture_t::b_subtitle, channel_order, dec_get_owner(), decoder_Notify, DECODER_SPU_VOUT_WAIT_DURATION, vlc_input_decoder_t::error, subpicture_t::i_channel, subpicture_t::i_order, vlc_input_decoder_t::i_spu_channel, vlc_input_decoder_t::i_spu_order, input_resource_HoldVout(), msg_Warn, vlc_input_decoder_t::p_clock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_vout, subpicture_New(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_tick_sleep(), VLC_VOUT_ORDER_NONE, vlc_input_decoder_t::vout_order, vout_RegisterSubpictureChannelInternal(), vout_Release(), VOUT_SPU_CHANNEL_INVALID, and vout_UnregisterSubpictureChannel().
|
static |
References vlc_input_decoder_t::aborting, AOUT_DEC_CHANGED, AOUT_DEC_FAILED, block_Release, vlc_input_decoder_t::dec, DecoderWaitUnblock(), vlc_input_decoder_t::flushing, vlc_input_decoder_t::i_preroll_end, vlc_frame_t::i_pts, msg_Dbg, msg_Warn, vlc_input_decoder_t::p_astream, PREROLL_NONE, vlc_input_decoder_t::reload, RELOAD_DECODER_AOUT, RequestReload(), unlikely, vlc_aout_stream_Flush(), vlc_aout_stream_Play(), VLC_EGENERIC, VLC_SUCCESS, and VLC_TICK_INVALID.
Referenced by ModuleThread_QueueAudio().
|
static |
|
static |
References vlc_input_decoder_t::aborting, vlc_input_decoder_t::b_first, picture_t::b_force, picture_t::b_still, vlc_input_decoder_t::b_waiting, picture_t::date, vlc_input_decoder_t::dec, DecoderWaitUnblock(), vlc_input_decoder_t::flushing, vlc_input_decoder_t::frames_countdown, vlc_input_decoder_t::i_preroll_end, likely, msg_Dbg, msg_Warn, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::paused, picture_Release(), PREROLL_NONE, unlikely, VLC_EGENERIC, VLC_SUCCESS, VLC_TICK_INVALID, vout_Flush(), vout_FlushAll, vout_PutPicture(), and vlc_input_decoder_t::vout_started.
Referenced by ModuleThread_QueueVideo().
|
static |
References dec_get_owner(), decoder_Notify, vlc_frame_t::i_dts, vlc_frame_t::i_pts, ModuleThread_PlayAudio(), decoder_t::obj, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::psz_id, vlc_aout_stream_GetResetStats(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_object_get_tracer(), VLC_SUCCESS, and vlc_tracer_TraceStreamDTS().
|
static |
|
static |
References dec_get_owner(), vlc_input_decoder_t::i_preroll_end, subpicture_t::i_start, subpicture_t::i_stop, ModuleThread_PlaySpu(), decoder_t::obj, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::psz_id, subpicture_Delete(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_object_get_tracer(), VLC_TICK_INVALID, and vlc_tracer_TraceStreamPTS().
References picture_t::date, dec_get_owner(), decoder_Notify, ModuleThread_PlayVideo(), decoder_t::obj, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::psz_id, vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_object_get_tracer(), VLC_SUCCESS, vlc_tracer_TraceStreamPTS(), and vout_GetResetStatistic().
|
static |
References AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT, AOUT_CHANMODE_DOLBYSTEREO, AOUT_FMTS_IDENTICAL, aout_FormatPrepare(), aout_replaygain_changed(), es_format_t::audio, es_format_t::audio_replay_gain, dec_get_owner(), Decoder_UpdateOutState(), DecoderUpdateFormatLocked(), vlc_aout_stream_cfg::fmt, vlc_input_decoder_t::fmt, decoder_t::fmt_in, decoder_t::fmt_out, audio_format_t::i_bitspersample, audio_format_t::i_bytes_per_frame, audio_format_t::i_chan_mode, es_format_t::i_codec, audio_format_t::i_format, audio_format_t::i_frame_length, audio_format_t::i_physical_channels, es_format_t::i_profile, input_resource_GetAout(), input_resource_PutAout(), vlc_input_decoder_t::p_aout, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_clock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::psz_id, var_InheritInteger(), var_TriggerCallback(), vlc_aout_stream_Delete(), vlc_aout_stream_New(), vlc_fifo_Lock(), and vlc_fifo_Unlock().
|
static |
References CreateVoutIfNeeded(), dec_get_owner(), decoder_Notify, Decoder_UpdateOutState(), es_format_Clean(), vlc_input_decoder_t::fmt, decoder_t::fmt_in, decoder_t::fmt_out, video_format_t::i_chroma, es_format_t::i_codec, decoder_t::i_extra_picture_buffers, input_resource_RequestVout(), INPUT_RESOURCE_VOUT_NOTCHANGED, INPUT_RESOURCE_VOUT_STARTED, INPUT_RESOURCE_VOUT_STOPPED, MouseEvent(), msg_Err, vlc_input_decoder_t::out_pool, vlc_input_decoder_t::p_clock, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_resource, vlc_input_decoder_t::p_vout, picture_pool_NewFromFormat(), vlc_input_decoder_t::psz_id, vlc_input_decoder_t::vctx, es_format_t::video, VLC_CODEC_AV1, VLC_CODEC_DIRAC, VLC_CODEC_H264, VLC_CODEC_HEVC, VLC_CODEC_MP4V, VLC_CODEC_VP5, VLC_CODEC_VP6, VLC_CODEC_VP6F, VLC_CODEC_VP8, vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_video_context_Hold(), vlc_video_context_Release(), vout_configuration_t::vout, vlc_input_decoder_t::vout_order, and vlc_input_decoder_t::vout_started.
|
static |
|
static |
References vlc_input_decoder_t::b_supported, vlc_input_decoder_t::cc, DecoderPlayCc(), and decoder_t::pf_get_cc.
Referenced by DecoderThread_ProcessInput().
|
static |
References vlc_input_decoder_t::reload, RELOAD_DECODER, and RELOAD_NO_REQUEST.
Referenced by DecoderThread_DecodeBlock(), and ModuleThread_PlayAudio().
|
static |
References VLC_UNUSED.
int vlc_input_decoder_AddVoutOverlay | ( | vlc_input_decoder_t * | owner, |
subpicture_t * | sub, | ||
size_t * | channel | ||
) |
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::p_fifo, vlc_input_decoder_t::p_vout, VIDEO_ES, VLC_EGENERIC, vlc_fifo_Lock(), vlc_fifo_Unlock(), VLC_SUCCESS, vlc_tick_now(), vout_PutSubpicture(), and vout_RegisterSubpictureChannel().
Referenced by EsOutVaControlLocked().
void vlc_input_decoder_ChangeDelay | ( | vlc_input_decoder_t * | owner, |
vlc_tick_t | 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 * | p_owner, |
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 EsOutCreateDecoder(), and 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::rate, vlc_fifo_Lock(), and vlc_fifo_Unlock().
Referenced by EsOutChangeRate(), and EsOutCreateDecoder().
vlc_input_decoder_t * vlc_input_decoder_Create | ( | vlc_object_t * | p_parent, |
const es_format_t * | fmt, | ||
struct vlc_clock_t * | clock, | ||
input_resource_t * | p_resource | ||
) |
Spawn a decoder thread outside of the input thread.
References vlc_input_decoder_cfg::clock, decoder_New(), vlc_input_decoder_cfg::fmt, and INPUT_TYPE_NONE.
void vlc_input_decoder_Decode | ( | vlc_input_decoder_t * | p_owner, |
vlc_frame_t * | frame, | ||
bool | b_do_pace | ||
) |
Put a vlc_frame_t in the decoder's fifo.
Thread-safe w.r.t. the decoder. May be a cancellation point.
p_dec | the decoder object |
frame | the data frame |
References vlc_input_decoder_t::b_waiting, block_ChainRelease, BLOCK_FLAG_DISCONTINUITY, vlc_input_decoder_t::dec, DecoderThread_ProcessInput(), vlc_frame_t::i_flags, msg_Warn, vlc_input_decoder_t::p_fifo, vlc_fifo_DequeueAllUnlocked(), vlc_fifo_GetBytes(), vlc_fifo_GetCount(), vlc_fifo_IsEmpty(), vlc_fifo_Lock(), vlc_fifo_QueueUnlocked(), vlc_fifo_Unlock(), vlc_fifo_WaitCond(), vlc_input_decoder_IsSynchronous(), and vlc_input_decoder_t::wait_fifo.
Referenced by EsOutSend().
void vlc_input_decoder_Delete | ( | vlc_input_decoder_t * | p_owner | ) |
Kills a decoder thread and waits until it's finished.
Delete an existing vlc_input_decoder_t instance.
p_input | the input thread |
p_es | the es descriptor |
References vlc_input_decoder_t::aborting, vlc_input_decoder_t::b_supported, vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::cc, vlc_input_decoder_t::dec, DeleteDecoder(), decoder_t::fmt_in, es_format_t::i_cat, MAX_CC_DECODERS, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::thread, VLC_CODEC_CEA608, vlc_cond_signal(), vlc_fifo_Lock(), vlc_fifo_Signal(), vlc_fifo_Unlock(), vlc_input_decoder_IsSynchronous(), vlc_input_decoder_SetCcState(), vlc_join(), and vlc_input_decoder_t::wait_request.
Referenced by EsOutDestroyDecoder(), EsOutSetRecord(), EsOutTerminate(), and vlc_input_decoder_SetCcState().
int vlc_input_decoder_DelVoutOverlay | ( | vlc_input_decoder_t * | owner, |
size_t | channel | ||
) |
void vlc_input_decoder_Drain | ( | vlc_input_decoder_t * | p_owner | ) |
Signals that there are no further frames to decode, and requests that the decoder drain all pending buffers.
This is used to ensure that all intermediate buffers empty and no samples get lost at the end of the stream.
References vlc_input_decoder_t::b_draining, DecoderThread_ProcessInput(), vlc_input_decoder_t::p_fifo, vlc_fifo_Lock(), vlc_fifo_Signal(), vlc_fifo_Unlock(), and vlc_input_decoder_IsSynchronous().
Referenced by EsOutDrainCCChannels(), EsOutDrainDecoder(), and EsOutVaPrivControlLocked().
void vlc_input_decoder_Flush | ( | vlc_input_decoder_t * | p_owner | ) |
Requests that the decoder immediately discard all pending buffers.
This is useful when seeking or when deselecting a stream.
References AUDIO_ES, vlc_input_decoder_t::b_draining, block_ChainRelease, vlc_input_decoder_t::dec, DecoderThread_Flush(), vlc_input_decoder_t::flushing, decoder_t::fmt_in, vlc_input_decoder_t::frames_countdown, es_format_t::i_cat, vlc_input_decoder_t::i_preroll_end, vlc_input_decoder_t::i_spu_channel, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, vlc_input_decoder_t::paused, PREROLL_NONE, sout_InputFlush(), SPU_ES, VIDEO_ES, vlc_aout_stream_Flush(), vlc_fifo_DequeueAllUnlocked(), vlc_fifo_Lock(), vlc_fifo_Signal(), vlc_fifo_Unlock(), vlc_input_decoder_IsSynchronous(), vout_FlushAll, vout_FlushSubpictureChannel(), VOUT_SPU_CHANNEL_INVALID, and vlc_input_decoder_t::vout_started.
Referenced by DecoderThread_Flush(), EsOutChangePosition(), EsOutDestroyDecoder(), EsOutSetRecord(), EsOutTerminate(), and vlc_input_decoder_SetCcState().
void vlc_input_decoder_FrameNext | ( | vlc_input_decoder_t * | p_owner | ) |
This function forces the display of the next picture.
References vlc_input_decoder_t::dec, decoder_t::fmt_in, vlc_input_decoder_t::frames_countdown, es_format_t::i_cat, 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(), and vout_NextPicture().
Referenced by EsOutFrameNext().
int vlc_input_decoder_GetCcState | ( | vlc_input_decoder_t * | p_owner, |
vlc_fourcc_t | codec, | ||
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_owner | ) |
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().
void vlc_input_decoder_GetStatus | ( | vlc_input_decoder_t * | p_owner, |
struct vlc_input_decoder_status * | status | ||
) |
Get the last status of the decoder.
References vlc_input_decoder_t::b_fmt_description, vlc_input_decoder_t::cc, vlc_input_decoder_status::cc, vlc_input_decoder_status::changed, vlc_input_decoder_t::desc, vlc_input_decoder_status::desc, es_format_Copy(), vlc_input_decoder_t::fmt, vlc_input_decoder_status::fmt, vlc_input_decoder_status::format, es_format_t::i_cat, vlc_input_decoder_status::meta, vlc_input_decoder_t::p_description, vlc_input_decoder_t::p_fifo, UNKNOWN_ES, vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_meta_Merge(), and vlc_meta_New().
Referenced by EsOutSend().
int vlc_input_decoder_GetVbiPage | ( | vlc_input_decoder_t * | owner, |
bool * | opaque | ||
) |
References vlc_input_decoder_t::dec, DecoderHasVbi(), var_GetBool(), and var_GetInteger().
Referenced by EsOutSelectEs().
|
static |
bool vlc_input_decoder_IsEmpty | ( | vlc_input_decoder_t * | p_owner | ) |
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::fmt, es_format_t::i_cat, vlc_input_decoder_t::p_astream, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, VIDEO_ES, vlc_aout_stream_IsDrained(), vlc_fifo_IsEmpty(), vlc_fifo_Lock(), vlc_fifo_Unlock(), and vout_IsEmpty().
Referenced by EsOutDecodersIsEmpty(), EsOutDrainDecoder(), and EsOutVaPrivControlLocked().
|
inlinestatic |
When the input decoder is being used only for packetizing (happen in stream output configuration.), there's no need to spawn a decoder thread.
The input_decoder is then considered synchronous.
true | When no decoder thread will be spawned. |
false | When a decoder thread will be spawned. |
References vlc_input_decoder_t::p_sout.
Referenced by decoder_New(), vlc_input_decoder_Decode(), vlc_input_decoder_Delete(), vlc_input_decoder_Drain(), vlc_input_decoder_Flush(), vlc_input_decoder_StartWait(), vlc_input_decoder_StopWait(), and vlc_input_decoder_Wait().
vlc_input_decoder_t * vlc_input_decoder_New | ( | vlc_object_t * | parent, |
const struct vlc_input_decoder_cfg * | cfg | ||
) |
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 * | p_owner, |
vlc_fourcc_t | codec, | ||
int | i_channel, | ||
bool | b_decode | ||
) |
This function activates the request closed caption channel.
References _, subs_format_t::cc, vlc_input_decoder_t::cc, vlc_input_decoder_t::dec, DecoderUnsupportedCodec(), vlc_input_decoder_t::desc, es_format_Init(), vlc_input_decoder_cfg::fmt, subs_format_t::i_channel, decoder_cc_desc_t::i_reorder_depth, subs_format_t::i_reorder_depth, INPUT_TYPE_NONE, 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, vlc_input_decoder_t::psz_id, SPU_ES, es_format_t::subs, vlc_dialog_display_error, VLC_EGENERIC, vlc_input_decoder_Delete(), vlc_input_decoder_Flush(), 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_SetSpuHighlight | ( | vlc_input_decoder_t * | p_owner, |
const vlc_spu_highlight_t * | spu_hl | ||
) |
References vlc_input_decoder_t::dec, decoder_t::fmt_in, es_format_t::i_cat, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::p_sout, vlc_input_decoder_t::p_sout_input, vlc_input_decoder_t::p_vout, SOUT_INPUT_SET_SPU_HIGHLIGHT, sout_InputControl(), SPU_ES, VLC_EGENERIC, vlc_fifo_Lock(), vlc_fifo_Unlock(), VLC_SUCCESS, and vout_SetSpuHighlight().
Referenced by EsOutVaControlLocked().
int vlc_input_decoder_SetVbiOpaque | ( | vlc_input_decoder_t * | owner, |
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 * | owner, |
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 * | owner, |
vlc_mouse_event | mouse_event, | ||
void * | user_data | ||
) |
void vlc_input_decoder_StartWait | ( | vlc_input_decoder_t * | p_owner | ) |
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::p_fifo, vlc_cond_signal(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_input_decoder_IsSynchronous(), and vlc_input_decoder_t::wait_request.
Referenced by EsOutChangePosition(), EsOutCreateDecoder(), and EsOutSetRecord().
void vlc_input_decoder_StopWait | ( | vlc_input_decoder_t * | p_owner | ) |
This function exits the waiting mode of the decoder.
References vlc_input_decoder_t::b_waiting, vlc_input_decoder_t::p_fifo, vlc_cond_signal(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_input_decoder_IsSynchronous(), and vlc_input_decoder_t::wait_request.
Referenced by EsOutDecodersStopBuffering().
void vlc_input_decoder_Wait | ( | vlc_input_decoder_t * | p_owner | ) |
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, msg_Err, vlc_input_decoder_t::p_fifo, vlc_input_decoder_t::paused, vlc_fifo_IsEmpty(), vlc_fifo_Lock(), vlc_fifo_Unlock(), vlc_fifo_WaitCond(), vlc_input_decoder_IsSynchronous(), and vlc_input_decoder_t::wait_acknowledge.
Referenced by EsOutDecodersStopBuffering().
|
static |
Referenced by CreateDecoder().
|
static |
Referenced by CreateDecoder().
|
static |
Referenced by CreateDecoder().
|
static |
Referenced by CreateDecoder().