VLC 4.0.0-dev
Loading...
Searching...
No Matches
vout_internal.h File Reference
Include dependency graph for vout_internal.h:

Go to the source code of this file.

Data Structures

struct  vout_configuration_t
 Vout configuration. More...
 
struct  vout_crop
 

Macros

#define VLC_DAR_FROM_SOURCE   ((vlc_rational_t){0, 0})
 

Typedefs

typedef struct input_thread_t input_thread_t
 
typedef struct vlc_spu_highlight_t vlc_spu_highlight_t
 Use the aspect ratio from the source video format.
 

Enumerations

enum  vout_crop_mode { VOUT_CROP_NONE , VOUT_CROP_RATIO , VOUT_CROP_WINDOW , VOUT_CROP_BORDER }
 

Functions

vout_thread_tvout_Create (vlc_object_t *obj)
 Creates a video output.
 
vout_thread_tvout_CreateDummy (vlc_object_t *obj)
 
vlc_decoder_devicevout_GetDevice (vout_thread_t *vout)
 Setup the vout for the given configuration and get an associated decoder device.
 
int vout_Request (const vout_configuration_t *cfg, vlc_video_context *vctx, input_thread_t *input)
 Returns a suitable vout or release the given one.
 
void vout_Stop (vout_thread_t *)
 Disables a vout.
 
void vout_StopDisplay (vout_thread_t *)
 Stop the display plugin, but keep its window plugin for later reuse.
 
int vout_ChangeSource (vout_thread_t *p_vout, const video_format_t *fmt, const vlc_video_context *)
 Set the new source format for a started vout.
 
static bool vout_CropEqual (const struct vout_crop *a, const struct vout_crop *b)
 
bool vout_ParseCrop (struct vout_crop *, const char *crop_str)
 
bool GetAspectRatio (const char *ar_str, unsigned *num, unsigned *den)
 
void vout_ChangeFullscreen (vout_thread_t *, const char *id)
 
void vout_ChangeWindowed (vout_thread_t *)
 
void vout_ChangeWindowState (vout_thread_t *, unsigned state)
 
void vout_ChangeDisplaySize (vout_thread_t *, unsigned width, unsigned height, void(*ack_cb)(void *), void *opaque)
 
void vout_ChangeDisplayFitting (vout_thread_t *, enum vlc_video_fitting)
 
void vout_ChangeZoom (vout_thread_t *, unsigned num, unsigned den)
 
void vout_ChangeDisplayAspectRatio (vout_thread_t *, unsigned num, unsigned den)
 
void vout_ChangeCrop (vout_thread_t *, const struct vout_crop *)
 
void vout_ControlChangeFilters (vout_thread_t *, const char *)
 
void vout_ControlChangeInterlacing (vout_thread_t *, bool)
 
void vout_ControlChangeSubSources (vout_thread_t *, const char *)
 
void vout_ControlChangeSubFilters (vout_thread_t *, const char *)
 
void vout_ChangeSpuChannelMargin (vout_thread_t *, enum vlc_vout_order order, int)
 
void vout_ChangeViewpoint (vout_thread_t *, const vlc_viewpoint_t *)
 
void vout_ChangeIccProfile (vout_thread_t *, vlc_icc_profile_t *)
 
void vout_FilterMouse (vout_thread_t *vout, vlc_mouse_t *mouse)
 
void vout_CreateVars (vout_thread_t *)
 
void vout_IntfInit (vout_thread_t *)
 
void vout_IntfReinit (vout_thread_t *)
 
void vout_IntfDeinit (vlc_object_t *)
 
enum vlc_video_fitting var_InheritFit (vlc_object_t *)
 
ssize_t vout_RegisterSubpictureChannelInternal (vout_thread_t *, vlc_clock_t *clock, enum vlc_vout_order *out_order)
 
ssize_t spu_RegisterChannelInternal (spu_t *, vlc_clock_t *, enum vlc_vout_order *)
 
void spu_Attach (spu_t *, input_thread_t *input)
 Attach the SPU to an input.
 
void spu_Detach (spu_t *)
 Detach the SPU from its attached input.
 
void spu_SetClockDelay (spu_t *spu, size_t channel_id, vlc_tick_t delay)
 
void spu_SetClockRate (spu_t *spu, size_t channel_id, float rate)
 
void spu_ChangeChannelOrderMargin (spu_t *, enum vlc_vout_order, int)
 
void spu_SetHighlight (spu_t *, const vlc_spu_highlight_t *)
 
void vout_ChangePause (vout_thread_t *, bool b_paused, vlc_tick_t i_date)
 This function will (un)pause the display of pictures.
 
void vout_ChangeRate (vout_thread_t *, float rate)
 This function will change the rate of the vout It is thread safe.
 
void vout_ChangeDelay (vout_thread_t *, vlc_tick_t delay)
 This function will change the delay of the vout It is thread safe.
 
void vout_ChangeSpuRate (vout_thread_t *, size_t channel_id, float rate)
 This function will change the rate of the spu channel It is thread safe.
 
void vout_ChangeSpuDelay (vout_thread_t *, size_t channel_id, vlc_tick_t delay)
 This function will change the delay of the spu channel It is thread safe.
 
void vout_GetResetStatistic (vout_thread_t *p_vout, unsigned *pi_displayed, unsigned *pi_lost, unsigned *pi_late)
 This function will return and reset internal statistics.
 
void vout_NextPicture (vout_thread_t *p_vout)
 This function will force to display the next picture while paused.
 
void vout_DisplayTitle (vout_thread_t *p_vout, const char *psz_title)
 This function will ask the display of the input title.
 
bool vout_IsEmpty (vout_thread_t *p_vout)
 This function will return true if no more pictures are to be displayed.
 
void vout_SetSpuHighlight (vout_thread_t *p_vout, const vlc_spu_highlight_t *)
 

Macro Definition Documentation

◆ VLC_DAR_FROM_SOURCE

#define VLC_DAR_FROM_SOURCE   ((vlc_rational_t){0, 0})

Typedef Documentation

◆ input_thread_t

◆ vlc_spu_highlight_t

Use the aspect ratio from the source video format.

Enumeration Type Documentation

◆ vout_crop_mode

Enumerator
VOUT_CROP_NONE 
VOUT_CROP_RATIO 
VOUT_CROP_WINDOW 
VOUT_CROP_BORDER 

Function Documentation

◆ GetAspectRatio()

bool GetAspectRatio ( const char *  ar_str,
unsigned *  num,
unsigned *  den 
)

References VLC_DAR_FROM_SOURCE.

Referenced by AspectCallback(), and vout_InitSource().

◆ spu_Attach()

◆ spu_ChangeChannelOrderMargin()

◆ spu_Detach()

void spu_Detach ( spu_t spu)

Detach the SPU from its attached input.

References spu_private_t::input, spu_private_t::lock, spu_t::p, spu_PrerenderPause(), vlc_mutex_lock(), and vlc_mutex_unlock().

Referenced by vout_ReleaseDisplay().

◆ spu_RegisterChannelInternal()

◆ spu_SetClockDelay()

◆ spu_SetClockRate()

void spu_SetClockRate ( spu_t spu,
size_t  channel_id,
float  rate 
)

◆ spu_SetHighlight()

void spu_SetHighlight ( spu_t spu,
const vlc_spu_highlight_t hl 
)

◆ var_InheritFit()

◆ vout_ChangeCrop()

void vout_ChangeCrop ( vout_thread_t ,
const struct vout_crop  
)

◆ vout_ChangeDelay()

◆ vout_ChangeDisplayAspectRatio()

◆ vout_ChangeDisplayFitting()

◆ vout_ChangeDisplaySize()

◆ vout_ChangeFullscreen()

◆ vout_ChangeIccProfile()

◆ vout_ChangePause()

◆ vout_ChangeRate()

void vout_ChangeRate ( vout_thread_t vout,
float  rate 
)

This function will change the rate of the vout It is thread safe.

References vout_thread_sys_t::control, vout_thread_sys_t::dummy, vout_thread_sys_t::rate, vout_control_Hold(), vout_control_Release(), and VOUT_THREAD_TO_SYS.

Referenced by Decoder_ChangeOutputRate().

◆ vout_ChangeSource()

int vout_ChangeSource ( vout_thread_t p_vout,
const video_format_t fmt,
const vlc_video_context vctx 
)

Set the new source format for a started vout.

Return values
0on success
-1on error, the vout needs to be restarted to handle the format

References vout_thread_sys_t::display, vout_thread_sys_t::filter, msg_Dbg, vout_thread_t::obj, vout_thread_sys_t::original, vout_thread_sys_t::src_vctx, video_format_IsSimilar(), video_format_LogDifferences(), vlc_object_logger, and VOUT_THREAD_TO_SYS.

Referenced by vout_Request().

◆ vout_ChangeSpuChannelMargin()

void vout_ChangeSpuChannelMargin ( vout_thread_t vout,
enum vlc_vout_order  order,
int  margin 
)

◆ vout_ChangeSpuDelay()

void vout_ChangeSpuDelay ( vout_thread_t vout,
size_t  channel_id,
vlc_tick_t  delay 
)

This function will change the delay of the spu channel It is thread safe.

References vout_thread_sys_t::dummy, vout_thread_sys_t::spu, spu_SetClockDelay(), and VOUT_THREAD_TO_SYS.

Referenced by Decoder_ChangeOutputDelay().

◆ vout_ChangeSpuRate()

void vout_ChangeSpuRate ( vout_thread_t vout,
size_t  channel_id,
float  rate 
)

This function will change the rate of the spu channel It is thread safe.

References vout_thread_sys_t::dummy, vout_thread_sys_t::spu, spu_SetClockRate(), and VOUT_THREAD_TO_SYS.

Referenced by Decoder_ChangeOutputRate().

◆ vout_ChangeViewpoint()

◆ vout_ChangeWindowed()

◆ vout_ChangeWindowState()

◆ vout_ChangeZoom()

◆ vout_ControlChangeFilters()

◆ vout_ControlChangeInterlacing()

◆ vout_ControlChangeSubFilters()

void vout_ControlChangeSubFilters ( vout_thread_t vout,
const char *  filters 
)

◆ vout_ControlChangeSubSources()

void vout_ControlChangeSubSources ( vout_thread_t vout,
const char *  filters 
)

◆ vout_Create()

vout_thread_t * vout_Create ( vlc_object_t obj)

Creates a video output.

References vout_thread_sys_t::clock_lock, vout_thread_sys_t::clock_nowait, config_GetType(), vout_thread_sys_t::control, vout_thread_sys_t::control_is_terminated, vout_thread_sys_t::crop, vout_thread_sys_t::dar, vout_thread_sys_t::display, vout_thread_sys_t::display_cfg, vout_thread_sys_t::display_lock, vout_thread_sys_t::dummy, vout_thread_sys_t::filter, vout_thread_sys_t::first_picture, vout_thread_sys_t::frame_next_count, vout_display_cfg::icc_profile, vout_thread_sys_t::interlacing, vout_thread_sys_t::is_late_dropped, vout_thread_sys_t::lock, vout_crop::mode, vout_thread_sys_t::obj, vout_thread_sys_t::original, vout_thread_sys_t::position, vout_thread_sys_t::private_pool, vout_thread_sys_t::show, vout_thread_sys_t::snapshot, vout_thread_sys_t::source, vout_thread_sys_t::splitter_name, vout_thread_sys_t::spu, spu_Create, spu_Destroy(), vout_thread_sys_t::statistic, vout_thread_sys_t::timeout, vout_thread_sys_t::title, unlikely, var_Create(), var_Destroy(), var_InheritBool(), var_InheritInteger(), var_InheritString(), var_SetString(), video_format_Init(), VLC_DAR_FROM_SOURCE, vlc_mutex_init(), vlc_object_delete, vlc_queuedmutex_init(), VLC_VAR_STRING, vlc_window_SetState(), VLC_WINDOW_STATE_ABOVE, VLC_WINDOW_STATE_BELOW, vout_control_Init(), vout_CreateCommon(), VOUT_CROP_NONE, vout_display_window_New(), vout_InitInterlacingSupport(), vout_IntfInit(), vout_snapshot_New(), vout_statistic_Init(), vout_thread_sys_t::wait_interrupted, vout_display_cfg::window, vout_thread_sys_t::window_enabled, vout_thread_sys_t::window_height, vout_thread_sys_t::window_lock, and vout_thread_sys_t::window_width.

Referenced by aout_filter_GetVout(), and RequestVoutRsc().

◆ vout_CreateDummy()

◆ vout_CreateVars()

◆ vout_CropEqual()

◆ vout_DisplayTitle()

void vout_DisplayTitle ( vout_thread_t p_vout,
const char *  psz_title 
)

◆ vout_FilterMouse()

◆ vout_GetDevice()

vlc_decoder_device * vout_GetDevice ( vout_thread_t vout)

Setup the vout for the given configuration and get an associated decoder device.

Parameters
voutthe video configuration requested.
Returns
pointer to a decoder device reference to use with the vout or NULL

References vout_thread_sys_t::dec_device, vout_thread_sys_t::display_cfg, vout_thread_t::obj, vlc_decoder_device_Create(), vlc_decoder_device_Hold(), vlc_mutex_lock(), vlc_mutex_unlock(), VOUT_THREAD_TO_SYS, vout_display_cfg::window, and vout_thread_sys_t::window_lock.

Referenced by ModuleThread_GetDecoderDevice().

◆ vout_GetResetStatistic()

void vout_GetResetStatistic ( vout_thread_t p_vout,
unsigned *  pi_displayed,
unsigned *  pi_lost,
unsigned *  pi_late 
)

This function will return and reset internal statistics.

◆ vout_IntfDeinit()

◆ vout_IntfInit()

◆ vout_IntfReinit()

void vout_IntfReinit ( vout_thread_t p_vout)

References var_TriggerCallback().

Referenced by vout_Request().

◆ vout_IsEmpty()

bool vout_IsEmpty ( vout_thread_t p_vout)

This function will return true if no more pictures are to be displayed.

References vout_thread_sys_t::decoder_fifo, vout_thread_sys_t::dummy, picture_fifo_IsEmpty(), and VOUT_THREAD_TO_SYS.

Referenced by vlc_input_decoder_IsEmpty().

◆ vout_NextPicture()

void vout_NextPicture ( vout_thread_t p_vout)

◆ vout_ParseCrop()

bool vout_ParseCrop ( struct vout_crop ,
const char *  crop_str 
)

Referenced by vout_InitSource().

◆ vout_RegisterSubpictureChannelInternal()

ssize_t vout_RegisterSubpictureChannelInternal ( vout_thread_t vout,
vlc_clock_t clock,
enum vlc_vout_order out_order 
)

◆ vout_Request()

int vout_Request ( const vout_configuration_t cfg,
vlc_video_context vctx,
input_thread_t input 
)

Returns a suitable vout or release the given one.

If cfg->fmt is non NULL and valid, a vout will be returned, reusing cfg->vout is possible, otherwise it returns NULL. If cfg->vout is not used, it will be closed and released.

You can release the returned value either by vout_Request() or vout_Close().

Parameters
cfgthe video configuration requested.
inputused to get attachments for spu filters
vctxpointer to the video context to use with the vout or NULL
Return values
0on success
-1on error

References vout_thread_sys_t::clock, vout_configuration_t::clock, clock_event_OnDiscontinuity(), vout_thread_sys_t::clock_id, vout_thread_sys_t::clock_listener_id, vout_thread_sys_t::clock_lock, vout_thread_sys_t::control_is_terminated, vout_thread_sys_t::delay, vout_thread_sys_t::display, EnableWindowLocked(), vout_configuration_t::fmt, vout_thread_sys_t::interlacing, msg_Err, vlc_clock_event_cbs::on_discontinuity, vout_thread_sys_t::original, vout_thread_sys_t::rate, vout_thread_sys_t::spu, spu_Attach(), vout_thread_sys_t::str_id, vout_configuration_t::str_id, vout_thread_sys_t::thread, Thread(), video_format_Clean(), vlc_clock_AddListener(), vlc_clock_Lock(), vlc_clock_RemoveListener(), vlc_clock_Unlock(), vlc_clone(), vlc_mutex_lock(), vlc_mutex_unlock(), vout_configuration_t::vout, vout_ChangeSource(), vout_DisableWindow(), vout_InitSource(), vout_IntfReinit(), vout_ReinitInterlacingSupport(), vout_ReleaseDisplay(), vout_Start(), vout_StopDisplay(), VOUT_THREAD_TO_SYS, VoutCheckFormat(), VoutFixFormat(), and vout_thread_sys_t::window_lock.

Referenced by aout_filter_GetVout(), and input_resource_RequestVout().

◆ vout_SetSpuHighlight()

void vout_SetSpuHighlight ( vout_thread_t p_vout,
const vlc_spu_highlight_t spu_hl 
)

◆ vout_Stop()

void vout_Stop ( vout_thread_t vout)

Disables a vout.

This disables a vout, but keeps it for later reuse.

References vout_thread_sys_t::display, vout_thread_sys_t::dummy, vout_DisableWindow(), vout_StopDisplay(), and VOUT_THREAD_TO_SYS.

Referenced by input_resource_PutVoutLocked(), input_resource_StopFreeVout(), and vout_Close().

◆ vout_StopDisplay()

void vout_StopDisplay ( vout_thread_t vout)