VLC 4.0.0-dev
|
Modules | |
On-screen display | |
Files | |
file | vlc_spu.h |
Data Structures | |
struct | spu_t |
Subpicture unit descriptor. More... | |
Macros | |
#define | spu_Create(a, b) spu_Create(VLC_OBJECT(a),b) |
Typedefs | |
typedef struct spu_private_t | spu_private_t |
Functions | |
spu_t * | spu_Create (vlc_object_t *, vout_thread_t *) |
Creates the subpicture unit. More... | |
void | spu_Destroy (spu_t *) |
Destroy the subpicture unit. More... | |
void | spu_PutSubpicture (spu_t *, subpicture_t *) |
This function sends a subpicture to the spu_t core. More... | |
subpicture_t * | spu_Render (spu_t *, const vlc_fourcc_t *p_chroma_list, const video_format_t *p_fmt_dst, const video_format_t *p_fmt_src, vlc_tick_t system_now, vlc_tick_t pts, bool ignore_osd, bool external_scale) |
This function will return an unique subpicture containing the OSD and subtitles visible at the requested date. More... | |
ssize_t | spu_RegisterChannel (spu_t *) |
It registers a new SPU channel. More... | |
void | spu_UnregisterChannel (spu_t *, size_t) |
void | spu_ClearChannel (spu_t *, size_t) |
It clears all subpictures associated to a SPU channel. More... | |
void | spu_ChangeSources (spu_t *, const char *) |
It changes the sub sources list. More... | |
void | spu_ChangeFilters (spu_t *, const char *) |
It changes the sub filters list. More... | |
#define spu_Create | ( | a, | |
b | |||
) | spu_Create(VLC_OBJECT(a),b) |
typedef struct spu_private_t spu_private_t |
void spu_ChangeFilters | ( | spu_t * | spu, |
const char * | filters | ||
) |
It changes the sub filters list.
References spu_private_t::filter_chain_current, spu_private_t::filter_chain_update, spu_private_t::lock, spu_t::p, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vout_ControlChangeSubFilters().
void spu_ChangeSources | ( | spu_t * | spu, |
const char * | filters | ||
) |
It changes the sub sources list.
References spu_private_t::lock, spu_t::p, spu_private_t::source_chain_current, spu_private_t::source_chain_update, strdup(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by vout_ControlChangeSubSources().
void spu_ClearChannel | ( | spu_t * | spu, |
size_t | channel_id | ||
) |
It clears all subpictures associated to a SPU channel.
References spu_channel::clock, spu_channel::delay, spu_private_t::lock, spu_t::p, spu_channel_Clear(), spu_GetChannel(), vlc_clock_Reset(), vlc_clock_SetDelay(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by spu_PutSubpicture(), SubSourceClean(), and vout_FlushSubpictureChannel().
spu_t * spu_Create | ( | vlc_object_t * | object, |
vout_thread_t * | vout | ||
) |
Creates the subpicture unit.
p_this | the parent object which creates the subpicture unit |
References spu_private_t::channels, spu_private_t::chroma_list, spu_private_t::cond, spu_private_t::filter_chain, spu_private_t::filter_chain_lock, filter_chain_NewSPU, spu_private_t::filter_chain_update, spu_private_t::fmtdst, spu_private_t::fmtsrc, spu_private_t::last_sort_date, spu_private_t::live, spu_private_t::lock, spu_private_t::margin, spu_private_t::output_cond, spu_t::p, spu_private_t::p_processed, spu_private_t::prerender, spu_private_t::scale, spu_private_t::scale_yuvp, spu_private_t::secondary_alignment, spu_private_t::secondary_margin, spu_private_t::source_chain, spu_private_t::source_chain_update, spu_channel_Init(), SPU_CHROMALIST_COUNT, spu_Cleanup(), spu_PrerenderThread(), SpuRenderCreateAndLoadScale(), SpuRenderCreateAndLoadText(), spu_private_t::text, spu_private_t::textlock, spu_private_t::thread, var_InheritInteger(), spu_private_t::vector, video_format_Init(), vlc_clone(), VLC_CODEC_RGBA, VLC_CODEC_YUVA, VLC_CODEC_YUVP, vlc_cond_init(), vlc_custom_create, vlc_mutex_init(), VLC_OBJECT, vlc_object_delete, vlc_vector_init, vlc_vector_push, vlc_vector_reserve, VLC_VOUT_ORDER_PRIMARY, spu_private_t::vout, and VOUT_SPU_CHANNEL_OSD_COUNT.
void spu_Destroy | ( | spu_t * | spu | ) |
Destroy the subpicture unit.
p_this | the parent object which destroys the subpicture unit |
References spu_private_t::cond, spu_private_t::live, spu_private_t::lock, spu_t::p, spu_private_t::prerender, spu_Cleanup(), spu_private_t::thread, vlc_cond_signal(), vlc_join(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_object_delete.
Referenced by vout_Close(), and vout_Create().
void spu_PutSubpicture | ( | spu_t * | spu, |
subpicture_t * | subpic | ||
) |
This function sends a subpicture to the spu_t core.
You cannot use the provided subpicture anymore. The spu_t core will destroy it at its convenience.
This function sends a subpicture to the spu_t core.
Remove the reservation flag of a subpicture, which will cause it to be ready for display.
spu | the subpicture unit object |
subpic | the subpicture to display |
References spu_channel::clock, spu_private_t::filter_chain, filter_chain_AppendFromString(), filter_chain_Clear(), filter_chain_ForEach(), filter_chain_IsEmpty(), spu_private_t::filter_chain_lock, filter_chain_SubFilter(), spu_private_t::filter_chain_update, subpicture_t::i_channel, subpicture_t::i_start, subpicture_t::i_stop, spu_private_t::lock, msg_Err, spu_t::p, subpicture_region_t::p_next, subpicture_t::p_region, spu_channel::rate, spu_private_t::source_chain_current, spu_private_t::source_chain_update, spu_channel_Push(), spu_ClearChannel(), spu_GetChannel(), spu_PrerenderEnqueue(), strdup(), SubFilterAddProxyCallbacks(), SubFilterDelProxyCallbacks(), subpicture_Delete(), vlc_clock_ConvertToSystemLocked(), vlc_clock_Lock(), vlc_clock_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_tick_now(), spu_private_t::vout, and VOUT_SPU_CHANNEL_OSD.
Referenced by filter_chain_SubSource(), and vout_PutSubpicture().
ssize_t spu_RegisterChannel | ( | spu_t * | spu | ) |
It registers a new SPU channel.
References spu_RegisterChannelInternal().
Referenced by SubSourceInit(), and vout_RegisterSubpictureChannel().
subpicture_t * spu_Render | ( | spu_t * | spu, |
const vlc_fourcc_t * | p_chroma_list, | ||
const video_format_t * | p_fmt_dst, | ||
const video_format_t * | p_fmt_src, | ||
vlc_tick_t | system_now, | ||
vlc_tick_t | pts, | ||
bool | ignore_osd, | ||
bool | external_scale | ||
) |
This function will return an unique subpicture containing the OSD and subtitles visible at the requested date.
p_chroma_list | is a list of supported chroma for the output (can be NULL) |
p_fmt_dst | is the format of the picture on which the return subpicture will be rendered. |
p_fmt_src | is the format of the original(source) video. |
The returned value if non NULL must be released by subpicture_Delete().
References subpicture_t::b_subtitle, filter_chain_AppendFromString(), filter_chain_Clear(), filter_chain_ForEach(), filter_chain_SubSource(), video_format_t::i_chroma, spu_private_t::lock, spu_t::p, subpicture_updater_t::pf_validate, spu_private_t::source_chain, spu_private_t::source_chain_update, spu_PrerenderSync(), spu_PrerenderWake(), spu_SelectSubpictures(), SpuRenderCmp(), SpuRenderSubpictures(), subpicture_Update(), SubSourceAddProxyCallbacks(), SubSourceClean(), SubSourceDelProxyCallbacks(), SubSourceInit(), subpicture_t::updater, VLC_CODEC_ABGR, VLC_CODEC_ARGB, VLC_CODEC_BGRA, VLC_CODEC_RGBA, VLC_CODEC_YUVA, VLC_CODEC_YUVP, vlc_fourcc_IsYUV(), vlc_mutex_lock(), vlc_mutex_unlock(), and spu_private_t::vout.
Referenced by PrerenderPicture().
void spu_UnregisterChannel | ( | spu_t * | spu, |
size_t | channel_id | ||
) |
References spu_private_t::channels, spu_private_t::lock, spu_t::p, spu_channel_Clean(), spu_GetChannel(), vlc_mutex_lock(), vlc_mutex_unlock(), and vlc_vector_remove.
Referenced by vout_UnregisterSubpictureChannel().