|
Modules | |
| Video Subpictures | |
| Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD. | |
| Flags for changes | |
| These flags are set in the vout_thread_t::i_changes field when another thread changed a variable. | |
Data Structures | |
| struct | vout_thread_t |
| Video output thread descriptor. More... | |
Defines | |
| #define | I_OUTPUTPICTURES p_vout->output.i_pictures |
| #define | PP_OUTPUTPICTURE p_vout->output.pp_picture |
| #define | I_RENDERPICTURES p_vout->render.i_pictures |
| #define | PP_RENDERPICTURE p_vout->render.pp_picture |
| #define | VOUT_ALIGN_LEFT 0x0001 |
| #define | VOUT_ALIGN_RIGHT 0x0002 |
| #define | VOUT_ALIGN_HMASK 0x0003 |
| #define | VOUT_ALIGN_TOP 0x0004 |
| #define | VOUT_ALIGN_BOTTOM 0x0008 |
| #define | VOUT_ALIGN_VMASK 0x000C |
| #define | MAX_JITTER_SAMPLES 20 |
| #define | ZOOM_FP_FACTOR 1000 |
| #define | vout_Request(a, b, c) __vout_Request(VLC_OBJECT(a),b,c) |
This function will
| |
| #define | vout_Create(a, b) __vout_Create(VLC_OBJECT(a),b) |
| This function will create a suitable vout for a given p_fmt. | |
Typedefs | |
| typedef struct vout_thread_sys_t | vout_thread_sys_t |
| Video ouput thread private structure. | |
Enumerations | |
| enum | output_query_e { VOUT_SET_SIZE, VOUT_SET_STAY_ON_TOP, VOUT_SET_VIEWPORT, VOUT_REDRAW_RECT } |
Functions | |
| vout_thread_t * | __vout_Request (vlc_object_t *p_this, vout_thread_t *p_vout, video_format_t *p_fmt) |
| vout_thread_t * | __vout_Create (vlc_object_t *p_this, video_format_t *p_fmt) |
| void | vout_Close (vout_thread_t *p_vout) |
| This function will close a vout created by vout_Create or vout_Request. | |
| static void | vout_CloseAndRelease (vout_thread_t *p_vout) |
| This function will close a vout created by vout_Create and then release it. | |
| int | vout_GetSnapshot (vout_thread_t *p_vout, block_t **pp_image, picture_t **pp_picture, video_format_t *p_fmt, const char *psz_format, mtime_t i_timeout) |
| This function will handle a snapshot request. | |
| int | vout_ChromaCmp (uint32_t, uint32_t) |
| Compare two chroma values. | |
| picture_t * | vout_CreatePicture (vout_thread_t *, bool, bool, unsigned int) |
| void | vout_DestroyPicture (vout_thread_t *, picture_t *) |
| Remove a permanent or reserved picture from the heap. | |
| void | vout_DisplayPicture (vout_thread_t *, picture_t *) |
| Display a picture. | |
| void | vout_LinkPicture (vout_thread_t *, picture_t *) |
| Increment reference counter of a picture. | |
| void | vout_UnlinkPicture (vout_thread_t *, picture_t *) |
| Decrement reference counter of a picture. | |
| void | vout_PlacePicture (const vout_thread_t *, unsigned int, unsigned int, unsigned int *, unsigned int *, unsigned int *, unsigned int *) |
| spu_t * | vout_GetSpu (vout_thread_t *) |
| Return the spu_t object associated to a vout_thread_t. | |
| void | vout_IntfInit (vout_thread_t *) |
| void | vout_EnableFilter (vout_thread_t *, const char *, bool, bool) |
| static int | vout_vaControl (vout_thread_t *p_vout, int i_query, va_list args) |
| static int | vout_Control (vout_thread_t *p_vout, int i_query,...) |
It includes functions allowing to open a new thread, send pictures to a thread, and destroy a previously opened video output thread.
| #define I_OUTPUTPICTURES p_vout->output.i_pictures |
| #define I_RENDERPICTURES p_vout->render.i_pictures |
Referenced by __vout_Create(), InitThread(), RunThread(), vout_ChangePause(), vout_CountPictureAvailable(), and vout_CreatePicture().
| #define MAX_JITTER_SAMPLES 20 |
| #define PP_OUTPUTPICTURE p_vout->output.pp_picture |
| #define PP_RENDERPICTURE p_vout->render.pp_picture |
Referenced by InitThread(), RunThread(), vout_ChangePause(), vout_CountPictureAvailable(), and vout_CreatePicture().
| #define VOUT_ALIGN_BOTTOM 0x0008 |
Referenced by Configuration(), and vout_PlacePicture().
| #define VOUT_ALIGN_HMASK 0x0003 |
Referenced by vout_PlacePicture().
| #define VOUT_ALIGN_LEFT 0x0001 |
Referenced by Configuration(), and vout_PlacePicture().
| #define VOUT_ALIGN_RIGHT 0x0002 |
Referenced by Configuration(), and vout_PlacePicture().
| #define VOUT_ALIGN_TOP 0x0004 |
Referenced by Configuration(), and vout_PlacePicture().
| #define VOUT_ALIGN_VMASK 0x000C |
Referenced by vout_PlacePicture().
| #define vout_Create | ( | a, | |||
| b | ) | __vout_Create(VLC_OBJECT(a),b) |
This function will create a suitable vout for a given p_fmt.
It will never reuse an already existing unused vout.
You have to call either vout_Close or vout_Request on the returned value
| p_this | a vlc object to which the returned vout will be attached | |
| p_fmt | the video format requested |
Referenced by __vout_Request(), Init(), Manage(), and SpawnRealVout().
| #define vout_Request | ( | a, | |||
| b, | |||||
| c | ) | __vout_Request(VLC_OBJECT(a),b,c) |
This function will
The purpose of this function is to avoid unnecessary creation/destruction of vout (and to allow optional vout reusing).
You can call vout_Request on a vout created by vout_Create or by a previous call to vout_Request. You can release the returned value either by vout_Request or vout_Close() followed by a vlc_object_release() or shorter vout_CloseAndRelease()
| p_this | a vlc object | |
| p_vout | a vout candidate | |
| p_fmt | the video format requested or NULL |
Referenced by Render(), and RequestVout().
| #define ZOOM_FP_FACTOR 1000 |
Referenced by __vout_Create(), CommonManage(), Manage(), ManageVideo(), vout_IntfInit(), and vout_PlacePicture().
| typedef struct vout_thread_sys_t vout_thread_sys_t |
Video ouput thread private structure.
| enum output_query_e |
| vout_thread_t* __vout_Create | ( | vlc_object_t * | p_this, | |
| video_format_t * | p_fmt | |||
| ) |
References _, picture_heap_t::b_allow_modify_pics, vout_thread_t::b_autoscale, vout_thread_sys_t::b_done, vout_thread_t::b_error, vout_thread_sys_t::b_filter_change, vout_thread_sys_t::b_first_vout, vout_thread_t::b_fullscreen, vout_thread_sys_t::b_paused, vout_thread_sys_t::b_picture_displayed, vout_thread_sys_t::b_picture_empty, vout_thread_sys_t::b_picture_interlaced, vout_thread_sys_t::b_ready, picture_t::b_slow, vout_thread_sys_t::b_title_show, vout_thread_sys_t::c_fps_samples, vout_thread_t::change_lock, vout_thread_sys_t::change_wait, config_ChainCreate(), config_ChainDestroy(), DeinterlaceEnable(), EMPTY_PICTURE, filter_chain_New, FilterCallback(), vout_thread_t::fmt_in, vout_thread_t::fmt_render, FREE_PICTURE, vout_thread_t::i_alignment, picture_heap_t::i_aspect, video_format_t::i_aspect, video_format_t::i_bmask, picture_heap_t::i_bmask, vout_thread_t::i_changes, picture_heap_t::i_chroma, video_format_t::i_chroma, i_chroma, video_format_t::i_gmask, picture_heap_t::i_gmask, vout_thread_t::i_heap_size, picture_heap_t::i_height, video_format_t::i_height, i_height, picture_heap_t::i_last_used_pic, I_OUTPUTPICTURES, vout_thread_sys_t::i_par_den, vout_thread_sys_t::i_par_num, vout_thread_sys_t::i_pause_date, vout_thread_sys_t::i_picture_displayed_date, vout_thread_sys_t::i_picture_qtype, I_RENDERPICTURES, video_format_t::i_rmask, picture_heap_t::i_rmask, video_format_t::i_sar_den, video_format_t::i_sar_num, picture_t::i_status, picture_t::i_type, picture_heap_t::i_width, video_format_t::i_width, vout_thread_t::i_zoom, vout_thread_sys_t::mouse, msg_Err, vout_thread_t::output, vout_thread_t::p, vout_thread_t::p_cfg, vout_thread_t::p_module, vout_thread_t::p_picture, vout_thread_sys_t::p_picture_displayed, vout_thread_t::p_spu, vout_thread_sys_t::p_vf2_chain, vout_thread_t::pf_control, picture_t::pf_lock, picture_t::pf_unlock, vout_thread_t::picture_lock, vout_thread_sys_t::picture_wait, vout_thread_sys_t::psz_filter_chain, vout_thread_sys_t::psz_module_name, vout_thread_sys_t::psz_module_type, psz_name, vlc_value_t::psz_string, vout_thread_sys_t::psz_vf2, QTYPE_NONE, vout_thread_t::render, vout_thread_sys_t::render_time, RunThread(), vout_thread_sys_t::snapshot, spu_Attach(), spu_Create, spu_Destroy(), spu_Init(), vout_thread_sys_t::statistic, strdup(), text, vout_thread_sys_t::thread, var_AddCallback, var_Change, var_Create, var_CreateGetString, var_CreateGetStringCommand, var_GetString, vout_thread_sys_t::vfilter_lock, VIDEO_ES, video_filter_buffer_allocation_init(), VideoFilter2Callback(), vlc_clone(), vlc_cond_init(), vlc_cond_wait(), vlc_custom_create, vlc_fourcc_GetCodec(), vlc_internals, vlc_mouse_Init(), vlc_mutex_init(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, vlc_object_attach, vlc_object_release, vlc_object_set_destructor, VLC_OBJECT_VOUT, VLC_THREAD_PRIORITY_OUTPUT, vlc_ureduce(), VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_INTEGER, VLC_VAR_ISCOMMAND, VLC_VAR_SETTEXT, VLC_VAR_STRING, vout_CloseAndRelease(), vout_Destructor(), vout_IntfInit(), VOUT_MAX_PICTURES, vout_snapshot_Init(), vout_statistic_Init(), and ZOOM_FP_FACTOR.
| vout_thread_t* __vout_Request | ( | vlc_object_t * | p_this, | |
| vout_thread_t * | p_vout, | |||
| video_format_t * | p_fmt | |||
| ) |
References vout_thread_sys_t::b_filter_change, vout_thread_t::change_lock, vout_thread_t::fmt_in, vout_thread_t::fmt_render, picture_heap_t::i_aspect, video_format_t::i_aspect, vout_thread_t::i_changes, video_format_t::i_chroma, video_format_t::i_height, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_width, msg_Dbg, vout_thread_t::p, vout_thread_t::p_spu, vout_thread_sys_t::psz_filter_chain, vout_thread_t::render, spu_Attach(), var_GetString, VIDEO_ES, vlc_fourcc_GetCodec(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, vlc_object_attach, vlc_object_detach, vlc_object_hold, vlc_object_release, vlc_ureduce(), VOUT_ASPECT_CHANGE, vout_CloseAndRelease(), and vout_Create.
| int vout_ChromaCmp | ( | vlc_fourcc_t | i_chroma, | |
| vlc_fourcc_t | i_amorhc | |||
| ) |
Compare two chroma values.
This function returns 1 if the two fourcc values given as argument are the same format (eg. UYVY/UYNV) or almost the same format (eg. I420/YV12)
References i, VIDEO_ES, VLC_CODEC_I420, VLC_CODEC_I422, VLC_CODEC_I440, VLC_CODEC_I444, VLC_CODEC_J420, VLC_CODEC_J422, VLC_CODEC_J440, VLC_CODEC_J444, VLC_CODEC_YV12, and vlc_fourcc_GetCodec().
Referenced by ChromaIsEqual().
| void vout_Close | ( | vout_thread_t * | p_vout | ) |
This function will close a vout created by vout_Create or vout_Request.
The associated vout module is closed. Note: It is not released yet, you'll have to call vlc_object_release() or use the convenient vout_CloseAndRelease().
| p_vout | the vout to close |
References vout_thread_sys_t::b_done, vout_thread_t::change_lock, vout_thread_sys_t::change_wait, vout_thread_t::p, vout_thread_sys_t::snapshot, vout_thread_sys_t::thread, vlc_cond_signal(), vlc_join(), vlc_mutex_lock(), vlc_mutex_unlock(), and vout_snapshot_End().
| static void vout_CloseAndRelease | ( | vout_thread_t * | p_vout | ) | [inline, static] |
This function will close a vout created by vout_Create and then release it.
| p_vout | the vout to close and release |
Referenced by __vout_Create(), __vout_Request(), DestroyVout(), End(), FilterCallback(), Manage(), RequestVout(), and VoutsClean().
| static int vout_Control | ( | vout_thread_t * | p_vout, | |
| int | i_query, | |||
| ... | ||||
| ) | [inline, static] |
Referenced by RunThread(), and ZoomCallback().
| picture_t* vout_CreatePicture | ( | vout_thread_t * | , | |
| bool | , | |||
| bool | , | |||
| unsigned | int | |||
| ) |
References picture_t::b_force, picture_t::b_progressive, picture_t::b_slow, picture_t::b_top_field_first, DESTROYED_PICTURE, FREE_PICTURE, picture_heap_t::i_aspect, picture_heap_t::i_chroma, vout_thread_t::i_heap_size, picture_heap_t::i_height, picture_heap_t::i_last_used_pic, picture_t::i_nb_fields, picture_t::i_planes, picture_t::i_refcount, I_RENDERPICTURES, picture_t::i_status, picture_t::i_type, picture_heap_t::i_width, MEMORY_PICTURE, msg_Err, vout_thread_t::picture_lock, PP_RENDERPICTURE, vout_thread_t::render, RESERVED_PICTURE, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, and vout_AllocatePicture.
Referenced by DoWork(), Render(), video_new_buffer_filter(), vout_new_buffer(), and VoutsNewPicture().
| void vout_DestroyPicture | ( | vout_thread_t * | p_vout, | |
| picture_t * | p_pic | |||
| ) |
Remove a permanent or reserved picture from the heap.
This function frees a previously reserved picture or a permanent picture. It is meant to be used when the construction of a picture aborted. Note that the picture will be destroyed even if it is linked !
TODO remove it, vout_DropPicture should be used instead
References picture_t::i_status, msg_Err, vout_thread_t::picture_lock, RESERVED_PICTURE, vlc_mutex_lock(), vlc_mutex_unlock(), and vout_DropPicture().
Referenced by Render().
| void vout_DisplayPicture | ( | vout_thread_t * | p_vout, | |
| picture_t * | p_pic | |||
| ) |
Display a picture.
Remove the reservation flag of a picture, which will cause it to be ready for display.
References vout_thread_sys_t::b_picture_interlaced, picture_t::b_progressive, vout_thread_sys_t::i_picture_qtype, picture_t::i_qtype, picture_t::i_status, msg_Err, vout_thread_t::p, vout_thread_t::picture_lock, vout_thread_sys_t::picture_wait, READY_PICTURE, RESERVED_PICTURE, vlc_cond_signal(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by DecoderPlayVideo(), DoWork(), and Render().
| void vout_EnableFilter | ( | vout_thread_t * | , | |
| const char * | , | |||
| bool | , | |||
| bool | ||||
| ) |
References asprintf(), config_PutPsz, module_find(), module_provides(), module_release(), msg_Err, strdup(), var_GetString, var_SetString, and vout_GetSpu().
Referenced by libvlc_video_set_marquee_option_as_int().
| int vout_GetSnapshot | ( | vout_thread_t * | p_vout, | |
| block_t ** | pp_image, | |||
| picture_t ** | pp_picture, | |||
| video_format_t * | p_fmt, | |||
| const char * | psz_format, | |||
| mtime_t | i_timeout | |||
| ) |
This function will handle a snapshot request.
pp_image, pp_picture and p_fmt can be NULL otherwise they will be set with returned value in case of success.
pp_image will hold an encoded picture in psz_format format.
i_timeout specifies the time the function will wait for a snapshot to be available.
References image_Type2Fourcc(), msg_Err, vout_thread_t::p, picture_Export(), picture_Release(), vout_thread_sys_t::snapshot, var_GetInteger, VLC_CODEC_PNG, VLC_EGENERIC, VLC_OBJECT, VLC_SUCCESS, and vout_snapshot_Get().
Referenced by mediacontrol_snapshot(), and VoutSaveSnapshot().
| spu_t* vout_GetSpu | ( | vout_thread_t * | ) |
Return the spu_t object associated to a vout_thread_t.
The return object is valid only as long as the vout is. You must not release the spu_t object returned. It cannot return NULL so no need to check.
References vout_thread_t::p_spu.
Referenced by ClearChannels(), DecoderPlaySpu(), DecoderProcessSpu(), DeleteDecoder(), mediacontrol_showtext(), PutAction(), RequestVout(), spu_new_buffer(), vlclua_spu_channel_clear(), vlclua_spu_channel_register(), and vout_EnableFilter().
| void vout_IntfInit | ( | vout_thread_t * | ) |
References _, AddCustomRatios(), AspectCallback(), vout_thread_t::b_autoscale, vout_thread_sys_t::b_title_show, config_GetPsz, CropCallback(), vlc_value_t::f_float, FullscreenCallback(), i, vout_thread_t::i_alignment, vout_thread_t::i_changes, vout_thread_sys_t::i_par_den, vout_thread_sys_t::i_par_num, vout_thread_sys_t::i_title_position, vout_thread_sys_t::i_title_timeout, vout_thread_t::i_window_height, vout_thread_t::i_window_width, vout_thread_t::i_zoom, InitWindowSize(), msg_Dbg, OnTopCallback(), vout_thread_t::p, p_aspect_ratio_values, p_crop_values, p_zoom_values, psz_label, vlc_value_t::psz_string, vout_thread_sys_t::psz_title, psz_value, ScalingCallback(), SnapshotCallback(), text, TitlePositionCallback(), TitleShowCallback(), TitleTimeoutCallback(), us_atof(), var_AddCallback, var_Change, var_Create, var_CreateGetBool, var_CreateGetBoolCommand, var_CreateGetInteger, var_Get, var_GetBool, var_GetFloat, var_Set, var_SetBool, var_SetInteger, var_TriggerCallback, vlc_ureduce(), VLC_VAR_ADDCHOICE, VLC_VAR_BOOL, VLC_VAR_DELCHOICE, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_HASCHOICE, VLC_VAR_INTEGER, VLC_VAR_ISCOMMAND, VLC_VAR_SETTEXT, VLC_VAR_STRING, VLC_VAR_VOID, VOUT_ASPECT_FACTOR, VOUT_FULLSCREEN_CHANGE, ZOOM_FP_FACTOR, and ZoomCallback().
Referenced by __vout_Create().
| void vout_LinkPicture | ( | vout_thread_t * | p_vout, | |
| picture_t * | p_pic | |||
| ) |
Increment reference counter of a picture.
This function increments the reference counter of a picture in the video heap. It needs a lock since several producer threads can access the picture.
References picture_t::i_refcount, vout_thread_t::picture_lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Render(), and vout_link_picture().
| void vout_PlacePicture | ( | const vout_thread_t * | , | |
| unsigned | int, | |||
| unsigned | int, | |||
| unsigned int * | , | |||
| unsigned int * | , | |||
| unsigned int * | , | |||
| unsigned int * | ||||
| ) |
| void vout_UnlinkPicture | ( | vout_thread_t * | p_vout, | |
| picture_t * | p_pic | |||
| ) |
Decrement reference counter of a picture.
This function decrement the reference counter of a picture in the video heap
References DestroyPicture(), DISPLAYED_PICTURE, picture_t::i_refcount, picture_t::i_status, msg_Err, vout_thread_t::picture_lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by Render(), and vout_unlink_picture().
| static int vout_vaControl | ( | vout_thread_t * | p_vout, | |
| int | i_query, | |||
| va_list | args | |||
| ) | [inline, static] |
Referenced by Control().
1.5.6