VLC 4.0.0-dev
|
Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD. More...
Files | |
file | vlc_subpicture.h |
Subpictures functions. | |
Data Structures | |
struct | subpicture_region_t |
Video subtitle region. More... | |
struct | vlc_spu_highlight_t |
struct | subpicture_updater_t |
struct | subpicture_t |
Video subtitle. More... | |
Macros | |
#define | SUBPICTURE_ALIGN_LEFT 0x1 |
#define | SUBPICTURE_ALIGN_RIGHT 0x2 |
#define | SUBPICTURE_ALIGN_TOP 0x4 |
#define | SUBPICTURE_ALIGN_BOTTOM 0x8 |
#define | SUBPICTURE_ALIGN_MASK |
Typedefs | |
typedef struct subpicture_region_private_t | subpicture_region_private_t |
Video subtitle region spu core private. More... | |
typedef struct vlc_spu_highlight_t | vlc_spu_highlight_t |
typedef struct filter_t | vlc_blender_t |
typedef struct subpicture_private_t | subpicture_private_t |
Functions | |
subpicture_region_t * | subpicture_region_New (const video_format_t *p_fmt) |
This function will create a new subpicture region. More... | |
void | subpicture_region_Delete (subpicture_region_t *p_region) |
This function will destroy a subpicture region allocated by subpicture_region_New. More... | |
void | subpicture_region_ChainDelete (subpicture_region_t *p_head) |
This function will destroy a list of subpicture regions allocated by subpicture_region_New. More... | |
subpicture_region_t * | subpicture_region_Copy (subpicture_region_t *p_region) |
This function will copy a subpicture region to a new allocated one and transfer all the properties. More... | |
subpicture_t * | subpicture_New (const subpicture_updater_t *) |
This function create a new empty subpicture. More... | |
void | subpicture_Delete (subpicture_t *p_subpic) |
This function delete a subpicture created by subpicture_New. More... | |
subpicture_t * | subpicture_NewFromPicture (vlc_object_t *, picture_t *, vlc_fourcc_t i_chroma) |
This function will create a subpicture having one region in the requested chroma showing the given picture. More... | |
void | subpicture_Update (subpicture_t *, const video_format_t *src, const video_format_t *, vlc_tick_t) |
This function will update the content of a subpicture created with a non NULL subpicture_updater_t. More... | |
unsigned | picture_BlendSubpicture (picture_t *, vlc_blender_t *, subpicture_t *) |
This function will blend a given subpicture onto a picture. More... | |
Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD.
#define SUBPICTURE_ALIGN_BOTTOM 0x8 |
#define SUBPICTURE_ALIGN_LEFT 0x1 |
#define SUBPICTURE_ALIGN_MASK |
#define SUBPICTURE_ALIGN_RIGHT 0x2 |
#define SUBPICTURE_ALIGN_TOP 0x4 |
typedef struct subpicture_private_t subpicture_private_t |
typedef struct subpicture_region_private_t subpicture_region_private_t |
Video subtitle region spu core private.
typedef struct filter_t vlc_blender_t |
typedef struct vlc_spu_highlight_t vlc_spu_highlight_t |
unsigned picture_BlendSubpicture | ( | picture_t * | dst, |
vlc_blender_t * | blend, | ||
subpicture_t * | src | ||
) |
This function will blend a given subpicture onto a picture.
The subpicture and all its region must:
References subpicture_t::b_absolute, subpicture_t::b_fade, filter_Blend(), filter_ConfigureBlend(), filter_t::fmt_in, filter_t::fmt_out, picture_t::format, subpicture_t::i_alpha, video_format_t::i_chroma, video_format_t::i_height, video_format_t::i_width, msg_Err, subpicture_region_t::p_next, subpicture_t::p_region, and es_format_t::video.
Referenced by ConvertRGB32AndBlend(), and PrerenderPicture().
void subpicture_Delete | ( | subpicture_t * | p_subpic | ) |
This function delete a subpicture created by subpicture_New.
You may give it NULL.
References subpicture_private_t::dst, subpicture_t::p_private, subpicture_t::p_region, subpicture_updater_t::pf_destroy, subpicture_private_t::src, subpicture_region_ChainDelete(), subpicture_t::updater, and video_format_Clean().
Referenced by ModuleThread_PlaySpu(), ModuleThread_QueueSpu(), PrerenderPicture(), RenderPicture(), spu_channel_Clean(), spu_channel_DeleteAt(), spu_PutSubpicture(), spu_SelectSubpictures(), and vout_PutSubpicture().
subpicture_t * subpicture_New | ( | const subpicture_updater_t * | p_upd | ) |
This function create a new empty subpicture.
You must use subpicture_Delete to destroy it.
References subpicture_t::b_absolute, subpicture_t::b_fade, subpicture_t::b_subtitle, subpicture_private_t::dst, subpicture_t::i_alpha, subpicture_t::i_order, subpicture_t::p_private, subpicture_t::p_region, subpicture_updater_t::p_sys, subpicture_updater_t::pf_destroy, subpicture_updater_t::pf_update, subpicture_updater_t::pf_validate, subpicture_private_t::src, subpicture_t::updater, and video_format_Init().
Referenced by ModuleThread_NewSpuBuffer(), OSDWidget(), SpuRenderSubpictures(), sub_new_buffer(), subpicture_NewFromPicture(), vout_OSDEpg(), and vout_OSDText().
subpicture_t * subpicture_NewFromPicture | ( | vlc_object_t * | p_obj, |
picture_t * | p_picture, | ||
vlc_fourcc_t | i_chroma | ||
) |
This function will create a subpicture having one region in the requested chroma showing the given picture.
The picture_t given is not released nor used inside the returned subpicture_t.
References picture_t::format, video_format_t::i_chroma, 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, image_Convert, image_HandlerCreate, image_HandlerDelete(), subpicture_region_t::p_picture, subpicture_t::p_region, picture_Release(), subpicture_New(), and subpicture_region_New().
Referenced by VoutSnapshotPip().
void subpicture_region_ChainDelete | ( | subpicture_region_t * | p_head | ) |
This function will destroy a list of subpicture regions allocated by subpicture_region_New.
Provided for convenience.
References subpicture_region_t::p_next, and subpicture_region_Delete().
Referenced by subpicture_Delete(), and subpicture_Update().
subpicture_region_t * subpicture_region_Copy | ( | subpicture_region_t * | p_region | ) |
This function will copy a subpicture region to a new allocated one and transfer all the properties.
Provided for convenience.
References subpicture_region_t::fmt, subpicture_region_t::i_align, subpicture_region_t::i_alpha, plane_t::i_lines, plane_t::i_pitch, picture_t::i_planes, subpicture_region_t::i_x, subpicture_region_t::i_y, picture_t::p, subpicture_region_t::p_picture, plane_t::p_pixels, subpicture_region_t::p_text, subpicture_region_New(), text_segment_Copy(), and unlikely.
void subpicture_region_Delete | ( | subpicture_region_t * | p_region | ) |
This function will destroy a subpicture region allocated by subpicture_region_New.
You may give it NULL.
References subpicture_region_t::fmt, subpicture_region_t::p_picture, subpicture_region_t::p_private, subpicture_region_t::p_text, picture_Release(), subpicture_region_private_Delete(), text_segment_ChainDelete(), and video_format_Clean().
Referenced by subpicture_region_ChainDelete().
subpicture_region_t * subpicture_region_New | ( | const video_format_t * | p_fmt | ) |
This function will create a new subpicture region.
You must use subpicture_region_Delete to destroy it.
References subpicture_region_t::fmt, video_format_t::i_chroma, subpicture_region_t::p_picture, picture_NewFromFormat(), subpicture_region_NewInternal(), video_format_Clean(), and VLC_CODEC_TEXT.
Referenced by OSDRegion(), OSDTextUpdate(), spuregion_CreateFromPicture(), subpicture_NewFromPicture(), subpicture_region_Copy(), vout_OSDBackground(), vout_OSDEpgSlider(), and vout_OSDTextRegion().
void subpicture_Update | ( | subpicture_t * | p_subpicture, |
const video_format_t * | src, | ||
const video_format_t * | p_fmt_dst, | ||
vlc_tick_t | i_ts | ||
) |
This function will update the content of a subpicture created with a non NULL subpicture_updater_t.
References subpicture_private_t::dst, subpicture_t::p_private, subpicture_t::p_region, subpicture_updater_t::pf_update, subpicture_updater_t::pf_validate, subpicture_private_t::src, subpicture_region_ChainDelete(), subpicture_t::updater, video_format_Clean(), video_format_Copy(), and video_format_IsSimilar().
Referenced by spu_PrerenderText(), and spu_Render().