|
VLC
2.1.0-git
|
This module describes the programming interface for video output threads. More...
|
Modules | |
| Video Subpictures | |
| Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD. | |
Data Structures | |
| struct | vout_configuration_t |
| Vout configuration. More... | |
| struct | vout_thread_t |
| Video output thread descriptor. More... | |
Macros | |
| #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 | vout_Request(a, b) vout_Request(VLC_OBJECT(a),b) |
Typedefs | |
| typedef struct vout_thread_sys_t | vout_thread_sys_t |
| Video output thread private structure. | |
Functions | |
| vout_thread_t * | vout_Request (vlc_object_t *object, const vout_configuration_t *cfg) |
| Returns a suitable vout or release the given one. | |
| void | vout_Close (vout_thread_t *p_vout) |
| This function will close a vout created by 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. | |
| picture_t * | vout_GetPicture (vout_thread_t *) |
| It retreives a picture from the vout or NULL if no pictures are available yet. | |
| void | vout_PutPicture (vout_thread_t *, picture_t *) |
| It gives to the vout a picture to be displayed. | |
| void | vout_HoldPicture (vout_thread_t *, picture_t *) |
| It increment the reference counter of a picture retreived by vout_GetPicture. | |
| void | vout_ReleasePicture (vout_thread_t *, picture_t *) |
| It releases a picture retreived by vout_GetPicture. | |
| void | vout_PutSubpicture (vout_thread_t *, subpicture_t *) |
| int | vout_RegisterSubpictureChannel (vout_thread_t *) |
| void | vout_FlushSubpictureChannel (vout_thread_t *, int) |
| void | vout_EnableFilter (vout_thread_t *, const char *, bool, bool) |
This module describes the programming interface for video output threads.
It includes functions allowing to open a new thread, send pictures to a thread, and destroy a previously opened video output thread.
| #define VOUT_ALIGN_BOTTOM 0x0008 |
| #define VOUT_ALIGN_HMASK 0x0003 |
| #define VOUT_ALIGN_LEFT 0x0001 |
| #define VOUT_ALIGN_RIGHT 0x0002 |
| #define VOUT_ALIGN_TOP 0x0004 |
| #define VOUT_ALIGN_VMASK 0x000C |
| #define vout_Request | ( | a, | |
| b | |||
| ) | vout_Request(VLC_OBJECT(a),b) |
Referenced by RequestVout().
| typedef struct vout_thread_sys_t vout_thread_sys_t |
Video output thread private structure.
| void vout_Close | ( | vout_thread_t * | p_vout | ) |
This function will close a vout created by 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::control, vout_thread_sys_t::input, vout_thread_t::p, vout_thread_sys_t::snapshot, vout_thread_sys_t::spu, spu_Attach(), spu_Destroy(), vout_thread_sys_t::spu_lock, vout_thread_sys_t::thread, vlc_join(), vlc_mutex_lock(), vlc_mutex_unlock(), VOUT_CONTROL_CLEAN, vout_control_PushVoid(), and vout_snapshot_End().
Referenced by vout_CloseAndRelease().
|
inlinestatic |
This function will close a vout created by vout_Create and then release it.
| p_vout | the vout to close and release |
References vlc_object_release, and vout_Close().
Referenced by DestroyVout(), RequestVout(), vout_Request(), and VoutCreate().
| void vout_EnableFilter | ( | vout_thread_t * | , |
| const char * | , | ||
| bool | , | ||
| bool | |||
| ) |
References asprintf(), config_PutPsz, module_find(), module_provides(), msg_Err, strdup(), var_GetString, and var_SetString.
| void vout_FlushSubpictureChannel | ( | vout_thread_t * | , |
| int | |||
| ) |
References vout_thread_sys_t::control, vout_thread_t::p, VOUT_CONTROL_FLUSH_SUBPICTURE, and vout_control_PushInteger().
Referenced by DecoderProcessSpu(), DeleteDecoder(), and RequestVout().
| picture_t* vout_GetPicture | ( | vout_thread_t * | vout | ) |
It retreives a picture from the vout or NULL if no pictures are available yet.
You MUST call vout_PutPicture or vout_ReleasePicture on it.
You may use vout_HoldPicture(paired with vout_ReleasePicture) to keep a read-only reference.
References vout_thread_sys_t::decoder_pool, picture_t::format, vout_thread_sys_t::original, vout_thread_t::p, vout_thread_sys_t::picture_lock, picture_pool_Get(), picture_Reset(), VideoFormatCopyCropAr(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vout_new_buffer().
| 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.
< Unspecified error
< Unspecified error
< No error
References image_Type2Fourcc(), msg_Err, vout_thread_t::p, picture_Export(), picture_Release(), vout_thread_sys_t::snapshot, var_InheritInteger, VLC_CODEC_PNG, VLC_EGENERIC, VLC_OBJECT, VLC_SUCCESS, and vout_snapshot_Get().
Referenced by VoutSaveSnapshot().
| void vout_HoldPicture | ( | vout_thread_t * | , |
| picture_t * | |||
| ) |
It increment the reference counter of a picture retreived by vout_GetPicture.
References vout_thread_t::p, picture_Hold(), vout_thread_sys_t::picture_lock, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vout_link_picture().
| void vout_PutPicture | ( | vout_thread_t * | vout, |
| picture_t * | picture | ||
| ) |
It gives to the vout a picture to be displayed.
The given picture MUST comes from vout_GetPicture.
Becareful, after vout_PutPicture is called, picture_t::p_next cannot be read/used.
References vout_thread_sys_t::control, vout_thread_sys_t::decoder_fifo, vout_thread_t::p, picture_t::p_next, picture_fifo_Push(), vout_thread_sys_t::picture_lock, vlc_mutex_lock(), vlc_mutex_unlock(), and vout_control_Wake().
Referenced by DecoderPlayVideo().
| void vout_PutSubpicture | ( | vout_thread_t * | , |
| subpicture_t * | |||
| ) |
| int vout_RegisterSubpictureChannel | ( | vout_thread_t * | ) |
References vout_thread_t::p, vout_thread_sys_t::spu, SPU_DEFAULT_CHANNEL, vout_thread_sys_t::spu_lock, spu_RegisterChannel(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by spu_new_buffer().
| void vout_ReleasePicture | ( | vout_thread_t * | , |
| picture_t * | |||
| ) |
It releases a picture retreived by vout_GetPicture.
References vout_thread_sys_t::control, vout_thread_t::p, vout_thread_sys_t::picture_lock, picture_Release(), vlc_mutex_lock(), vlc_mutex_unlock(), and vout_control_Wake().
Referenced by DecoderDecodeVideo(), DecoderFlushBuffering(), DecoderPlayVideo(), vout_del_buffer(), and vout_unlink_picture().
| vout_thread_t* vout_Request | ( | vlc_object_t * | object, |
| const vout_configuration_t * | cfg | ||
| ) |
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() followed by a vlc_object_release() or shorter vout_CloseAndRelease()
| object | a vlc object |
| cfg | the video configuration requested. |
References vout_control_cmd_t::cfg, vout_configuration_t::change_fmt, vout_thread_sys_t::control, vout_thread_sys_t::dead, vout_configuration_t::fmt, vout_thread_sys_t::input, vout_configuration_t::input, msg_Dbg, msg_Warn, vout_thread_t::p, vout_thread_sys_t::spu, spu_Attach(), vout_control_cmd_t::u, vout_configuration_t::vout, vout_CloseAndRelease(), vout_control_cmd_Init(), vout_control_Push(), VOUT_CONTROL_REINIT, vout_control_WaitEmpty(), and VoutCreate().
1.8.1.2