VLC  4.0.0-dev
Data Structures | Macros | Typedefs | Enumerations | Functions
vlc_codec.h File Reference
Include dependency graph for vlc_codec.h:

Go to the source code of this file.

Data Structures

struct  decoder_owner_callbacks
struct  decoder_t
struct  decoder_cc_desc_t
struct  encoder_owner_callbacks
struct  encoder_t
struct  vlc_decoder_device_operations
struct  vlc_decoder_device
 Decoder context struct. More...


#define VLCDEC_RELOAD   (-100)
#define set_callback_dec_device(activate, priority)


typedef struct decoder_cc_desc_t decoder_cc_desc_t
typedef struct vlc_decoder_device vlc_decoder_device
 Decoder context struct. More...
typedef int(* vlc_decoder_device_Open) (vlc_decoder_device *device, vout_window_t *window)
 "decoder device" module open entry point More...


enum  vlc_decoder_device_type {
 Decoder device type. More...


VLC_EXPORT vlc_decoder_devicevlc_encoder_GetDecoderDevice (encoder_t *)
 Creates/Updates the output decoder device. More...
VLC_EXPORT vlc_decoder_devicevlc_decoder_device_Create (vlc_object_t *, vout_window_t *window)
 Create a decoder device from a window. More...
VLC_EXPORT vlc_decoder_devicevlc_decoder_device_Hold (vlc_decoder_device *device)
 Hold a decoder device. More...
VLC_EXPORT void vlc_decoder_device_Release (vlc_decoder_device *device)
 Release a decoder device. More...
static vlc_decoder_devicedecoder_GetDecoderDevice (decoder_t *dec)
 Creates/Updates the output decoder device. More...
VLC_EXPORT int decoder_UpdateVideoOutput (decoder_t *dec, vlc_video_context *vctx_out)
 Creates/Updates the rest of the video output pipeline. More...
VLC_EXPORT int decoder_UpdateVideoFormat (decoder_t *dec)
 Updates the video output format. More...
VLC_EXPORT picture_tdecoder_NewPicture (decoder_t *dec)
 Allocates an output picture buffer. More...
VLC_EXPORT void decoder_Init (decoder_t *dec, const es_format_t *)
 Initialize a decoder structure before creating the decoder. More...
VLC_EXPORT void decoder_Destroy (decoder_t *p_dec)
 Destroy a decoder and reset the structure. More...
VLC_EXPORT void decoder_Clean (decoder_t *p_dec)
 Unload a decoder module and reset the input/output formats. More...
static void decoder_QueueVideo (decoder_t *dec, picture_t *p_pic)
 This function queues a single picture to the video output. More...
static void decoder_QueueCc (decoder_t *dec, block_t *p_cc, const decoder_cc_desc_t *p_desc)
 This function queues the Closed Captions. More...
static void decoder_QueueAudio (decoder_t *dec, block_t *p_aout_buf)
 This function queues a single audio block to the audio output. More...
static void decoder_QueueSub (decoder_t *dec, subpicture_t *p_spu)
 This function queues a single subtitle to the video output. More...
static int decoder_UpdateAudioFormat (decoder_t *dec)
 This function notifies the audio output pipeline of a new audio output format (fmt_out.audio). More...
VLC_EXPORT block_tdecoder_NewAudioBuffer (decoder_t *, int i_nb_samples)
 This function will return a new audio buffer usable by a decoder as an output buffer. More...
static subpicture_tdecoder_NewSubpicture (decoder_t *dec, const subpicture_updater_t *p_dyn)
 This function will return a new subpicture usable by a decoder as an output buffer. More...
static int decoder_GetInputAttachments (decoder_t *dec, input_attachment_t ***ppp_attachment, int *pi_attachment)
 This function gives all input attachments at once. More...
static vlc_tick_t decoder_GetDisplayDate (decoder_t *dec, vlc_tick_t system_now, vlc_tick_t i_ts)
 This function converts a decoder timestamp into a display date comparable to vlc_tick_now(). More...
static float decoder_GetDisplayRate (decoder_t *dec)
 This function returns the current input rate. More...

Detailed Description

Decoder and encoder modules interface

Macro Definition Documentation




#define VLCDEC_RELOAD   (-100)



Function Documentation

◆ vlc_encoder_GetDecoderDevice()

VLC_EXPORT vlc_decoder_device* vlc_encoder_GetDecoderDevice ( encoder_t enc)

Creates/Updates the output decoder device.

This function is not reentrant.
the held decoder device, NULL if none should be used

Creates/Updates the output decoder device.

References encoder_t::cbs, encoder_t::fmt_in, encoder_owner_callbacks::get_device, es_format_t::i_cat, unlikely, encoder_owner_callbacks::video, VIDEO_ES, and vlc_assert.