Data Structures | |
| struct | spu_t |
| Subpicture unit descriptor. More... | |
Defines | |
| #define | DEFAULT_CHAN 1 |
| #define | spu_Create(a) __spu_Create(VLC_OBJECT(a)) |
Typedefs | |
| typedef struct spu_private_t | spu_private_t |
Enumerations | |
| enum | spu_query_e { SPU_CHANNEL_REGISTER, SPU_CHANNEL_CLEAR } |
Functions | |
| static int | spu_vaControl (spu_t *p_spu, int i_query, va_list args) |
| static int | spu_Control (spu_t *p_spu, int i_query,...) |
| spu_t * | __spu_Create (vlc_object_t *) |
| Creates the subpicture unit. | |
| int | spu_Init (spu_t *) |
| Initialise the subpicture unit. | |
| void | spu_Destroy (spu_t *) |
| Destroy the subpicture unit. | |
| void | spu_Attach (spu_t *, vlc_object_t *, bool) |
| Attach/Detach the SPU from any input. | |
| void | spu_DisplaySubpicture (spu_t *, subpicture_t *) |
| This function sends a subpicture to the spu_t core. | |
| subpicture_t * | spu_SortSubpictures (spu_t *, mtime_t render_subtitle_date, bool b_subtitle_only) |
| This function asks the spu_t core a list of subpictures to display. | |
| void | spu_RenderSubpictures (spu_t *, picture_t *, const video_format_t *p_fmt_dst, subpicture_t *p_list, const video_format_t *p_fmt_src, mtime_t render_subtitle_date) |
| This function renders a list of subpicture_t on the provided picture. | |
It includes functions allowing to create/destroy an spu, create/destroy subpictures and render them.
| #define DEFAULT_CHAN 1 |
Referenced by ClearChannels(), DisplayAnchor(), DisplayTitleOnOSD(), EventKey(), CmdQuit::execute(), VLCControls::loop:, mediacontrol_display_text(), PutAction(), VLCControls::random:, VLCControls::repeat:, VLCControls::repeatButtonAction:, spu_DisplaySubpicture(), SpuClearChannel(), vlclua_osd_icon(), vlclua_osd_message(), vlclua_osd_slider(), and VoutOsdSnapshot().
| #define spu_Create | ( | a | ) | __spu_Create(VLC_OBJECT(a)) |
Referenced by __vout_Create(), and transcode_osd_process().
| typedef struct spu_private_t spu_private_t |
| enum spu_query_e |
| spu_t* __spu_Create | ( | vlc_object_t * | p_this | ) |
Creates the subpicture unit.
| p_this | the parent object which creates the subpicture unit |
References filter_chain_New, spu_private_t::heap, spu_private_t::i_channel, spu_private_t::i_last_sort_date, spu_private_t::lock, spu_t::p, spu_private_t::p_blend, spu_private_t::p_chain, spu_private_t::p_scale, spu_private_t::p_scale_yuvp, p_sys, spu_private_t::p_text, spu_t::pf_control, spu_private_t::psz_chain_update, SpuControl(), SpuHeapInit(), SpuRenderCreateAndLoadScale(), SpuRenderCreateAndLoadText(), SubFilterAllocationClean(), SubFilterAllocationInit(), vlc_custom_create, vlc_mutex_init(), vlc_object_attach, and VLC_OBJECT_GENERIC.
| void spu_Attach | ( | spu_t * | p_spu, | |
| vlc_object_t * | p_this, | |||
| bool | b_attach | |||
| ) |
Attach/Detach the SPU from any input.
| p_this | the object in which to destroy the subpicture unit | |
| b_attach | to select attach or detach |
References CropCallback(), FIND_PARENT, UpdateSPU(), var_AddCallback, var_DelCallback, VLC_OBJECT, vlc_object_find, VLC_OBJECT_INPUT, and vlc_object_release.
Referenced by __vout_Create(), __vout_Request(), and EndThread().
| static int spu_Control | ( | spu_t * | p_spu, | |
| int | i_query, | |||
| ... | ||||
| ) | [inline, static] |
| void spu_Destroy | ( | spu_t * | p_spu | ) |
Destroy the subpicture unit.
| p_this | the parent object which destroys the subpicture unit |
References filter_chain_Delete(), filter_DeleteBlend(), FilterRelease(), spu_private_t::heap, spu_private_t::lock, spu_t::p, spu_private_t::p_blend, spu_private_t::p_chain, spu_private_t::p_scale, spu_private_t::p_scale_yuvp, p_sys, spu_private_t::p_text, spu_private_t::psz_chain_update, SpuHeapClean(), SubFilterCallback(), var_DelCallback, vlc_mutex_destroy(), and vlc_object_release.
Referenced by __vout_Create(), and vout_Destructor().
| void spu_DisplaySubpicture | ( | spu_t * | p_spu, | |
| subpicture_t * | p_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.
| p_spu | the subpicture unit object | |
| p_subpic | the subpicture to display |
References DEFAULT_CHAN, spu_private_t::heap, subpicture_t::i_channel, spu_private_t::lock, msg_Err, spu_t::p, subpicture_region_t::p_next, subpicture_t::p_region, p_sys, SpuClearChannel(), SpuHeapPush(), subpicture_Delete(), vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by DecoderPlaySpu(), filter_chain_SubFilter(), osd_Icon(), osd_ShowTextAbsolute(), osd_Slider(), transcode_spu_process(), vout_ShowTextAbsolute(), and VoutSnapshotPip().
| int spu_Init | ( | spu_t * | p_spu | ) |
Initialise the subpicture unit.
| p_spu | the subpicture unit object |
References spu_private_t::i_margin, spu_t::p, p_sys, SubFilterCallback(), var_AddCallback, var_Create, var_CreateGetInteger, var_TriggerCallback, VLC_SUCCESS, VLC_VAR_DOINHERIT, and VLC_VAR_STRING.
Referenced by __vout_Create(), and transcode_osd_process().
| void spu_RenderSubpictures | ( | spu_t * | p_spu, | |
| picture_t * | p_pic_dst, | |||
| const video_format_t * | p_fmt_dst, | |||
| subpicture_t * | p_subpic_list, | |||
| const video_format_t * | p_fmt_src, | |||
| mtime_t | render_subtitle_date | |||
| ) |
This function renders a list of subpicture_t on the provided picture.
| p_fmt_dst | is the format of the destination picture. | |
| p_fmt_src | is the format of the original(source) video. |
References subpicture_t::b_absolute, subpicture_t::b_subtitle, filter_NewBlend(), subpicture_region_t::fmt, filter_t::fmt_out, spu_scale_t::h, video_format_t::i_aspect, spu_area_t::i_height, video_format_t::i_height, subpicture_t::i_original_picture_height, subpicture_t::i_original_picture_width, video_format_t::i_sar_den, video_format_t::i_sar_num, video_format_t::i_visible_height, video_format_t::i_visible_width, spu_area_t::i_width, video_format_t::i_width, spu_area_t::i_x, subpicture_region_t::i_x, spu_area_t::i_y, subpicture_region_t::i_y, spu_private_t::lock, mdate(), msg_Err, spu_t::p, spu_private_t::p_blend, subpicture_region_t::p_next, subpicture_t::p_next, subpicture_t::p_region, p_sys, spu_private_t::p_text, spu_area_unscaled(), spu_scale_createq(), SpuRenderRegion(), SubpictureCmp(), es_format_t::video, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_OBJECT, VOUT_ASPECT_FACTOR, VOUT_MAX_SUBPICTURES, and spu_scale_t::w.
Referenced by transcode_video_process(), and vout_RenderPicture().
| subpicture_t* spu_SortSubpictures | ( | spu_t * | , | |
| mtime_t | render_subtitle_date, | |||
| bool | b_subtitle_only | |||
| ) |
This function asks the spu_t core a list of subpictures to display.
The returned list can only be used by spu_RenderSubpictures.
References __MAX, subpicture_t::b_ephemer, spu_heap_entry_t::b_reject, subpicture_t::b_subtitle, filter_chain_AppendFromString(), filter_chain_Reset(), filter_chain_SubFilter(), spu_private_t::heap, subpicture_t::i_channel, spu_private_t::i_channel, spu_private_t::i_last_sort_date, subpicture_t::i_order, subpicture_t::i_start, subpicture_t::i_stop, spu_private_t::lock, mdate(), spu_t::p, spu_private_t::p_chain, spu_heap_t::p_entry, spu_heap_entry_t::p_subpicture, p_sys, spu_private_t::psz_chain_update, SpuHeapDeleteAt(), SpuHeapDeleteSubpicture(), SubpictureChain(), vlc_mutex_lock(), vlc_mutex_unlock(), and VOUT_MAX_SUBPICTURES.
Referenced by RunThread(), transcode_osd_process(), and transcode_video_process().
| static int spu_vaControl | ( | spu_t * | p_spu, | |
| int | i_query, | |||
| va_list | args | |||
| ) | [inline, static] |
1.5.6