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. | |
void | spu_Destroy (spu_t *) |
Destroy the subpicture unit. | |
void | spu_PutSubpicture (spu_t *, subpicture_t *) |
This function sends a subpicture to the spu_t core. | |
struct vlc_render_subpicture * | 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, bool spu_in_full_window, const struct vout_display_place_t *video_position, vlc_tick_t system_now, vlc_tick_t pts, bool ignore_osd) |
This function will return an unique subpicture containing the OSD and subtitles visible at the requested date. | |
ssize_t | spu_RegisterChannel (spu_t *) |
It registers a new SPU channel. | |
void | spu_UnregisterChannel (spu_t *, size_t) |
void | spu_ClearChannel (spu_t *, size_t) |
It clears all subpictures associated to a SPU channel. | |
void | spu_ChangeSources (spu_t *, const char *) |
It changes the sub sources list. | |
void | spu_ChangeFilters (spu_t *, const char *) |
It changes the sub filters list. | |
#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_Clean(), spu_GetChannel(), vlc_clock_Lock(), vlc_clock_Reset(), vlc_clock_SetDelay(), vlc_clock_Unlock(), 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.
object | the parent object which creates the subpicture unit |
vout | the video output that will use the spu_t instance |
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::subs_pos, 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.
spu | a subpicture unit created with spu_Create |
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 subpicture_t::b_ephemer, 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, 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_private, spu_channel::rate, subpicture_t::regions, spu_private_t::source_chain_current, spu_private_t::source_chain_update, spu_channel_EarlyRemoveLate(), spu_channel_Push(), spu_ClearChannel(), spu_GetChannel(), spu_HasAlreadyExpired(), spu_PrerenderEnqueue(), strdup(), SubFilter(), SubFilterAddProxyCallbacks(), SubFilterDelProxyCallbacks(), subpicture_Delete(), vlc_clock_ConvertToSystem(), vlc_clock_Lock(), vlc_clock_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_spu_regions_foreach, VLC_TICK_INVALID, vlc_tick_now(), spu_private_t::vout, and VOUT_SPU_CHANNEL_OSD.
Referenced by SubSourceGenerate(), 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().
struct vlc_render_subpicture * 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, | ||
bool | spu_in_full_window, | ||
const struct vout_display_place_t * | video_position, | ||
vlc_tick_t | system_now, | ||
vlc_tick_t | pts, | ||
bool | ignore_osd | ||
) |
This function will return an unique subpicture containing the OSD and subtitles visible at the requested date.
spu | the subpicture unit instance |
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. |
video_position | position of the video inside the display or NULL to fit in p_fmt_dst |
system_now | the reference current time |
pts | the timestamp of the rendered frame |
ignore_osd | whether we display the OSD or not |
The returned value if non NULL must be released by subpicture_Delete().
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().