25#ifndef VLC_SUBPICTURE_H
26#define VLC_SUBPICTURE_H 1
55#define VLC_SUBPIC_TEXT_FLAG_NO_REGION_BG (1 << 4)
57#define VLC_SUBPIC_TEXT_FLAG_GRID_MODE (1 << 5)
59#define VLC_SUBPIC_TEXT_FLAG_TEXT_NOT_BALANCED (1 << 6)
61#define VLC_SUBPIC_TEXT_FLAG_IS_TEXT (1 << 7)
93#define vlc_spu_regions_init(p_rs) \
95#define vlc_spu_regions_push(p_rs,reg) \
96 vlc_list_append(&(reg)->node, (p_rs))
97#define vlc_spu_regions_foreach(reg,p_rs) \
98 vlc_list_foreach(reg, (p_rs), node)
99#define vlc_spu_regions_foreach_const(reg,p_rs) \
100 vlc_list_foreach_const(reg, (p_rs), node)
101#define vlc_spu_regions_is_empty(p_rs) \
102 vlc_list_is_empty((p_rs))
103#define vlc_spu_regions_first_or_null(p_rs) \
104 vlc_list_first_entry_or_null((p_rs), subpicture_region_t, node)
105#define vlc_spu_regions_remove(p_rs, reg) \
106 vlc_list_remove(&(reg)->node)
118#define SUBPICTURE_ALIGN_LEFT 0x1
119#define SUBPICTURE_ALIGN_RIGHT 0x2
120#define SUBPICTURE_ALIGN_TOP 0x4
121#define SUBPICTURE_ALIGN_BOTTOM 0x8
122#define SUBPICTURE_ALIGN_MASK ( SUBPICTURE_ALIGN_LEFT|SUBPICTURE_ALIGN_RIGHT| \
123 SUBPICTURE_ALIGN_TOP |SUBPICTURE_ALIGN_BOTTOM )
195#define subpicture_region_IsText(r) \
196 (((r)->text_flags & VLC_SUBPIC_TEXT_FLAG_IS_TEXT) != 0)
#define VLC_API
Definition fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
vlc_render_subpicture * vlc_render_subpicture_New(void)
Create a vlc_render_subpicture.
Definition subpicture.c:100
void vlc_render_subpicture_Delete(vlc_render_subpicture *)
Destroy a vlc_render_subpicture.
Definition subpicture.c:109
subpicture_region_t * subpicture_region_New(const video_format_t *p_fmt)
This function will create a new subpicture region.
Definition subpicture.c:237
void subpicture_Delete(subpicture_t *p_subpic)
This function delete a subpicture created by subpicture_New.
Definition subpicture.c:80
void vlc_spu_regions_Clear(vlc_spu_regions *)
This function will clear a list of subpicture regions allocated by subpicture_region_New.
Definition subpicture.c:343
unsigned picture_BlendSubpicture(picture_t *, vlc_blender_t *, vlc_render_subpicture *)
This function will blend a given subpicture onto a picture.
Definition subpicture.c:355
void subpicture_region_Delete(subpicture_region_t *p_region)
This function will destroy a subpicture region allocated by subpicture_region_New.
Definition subpicture.c:327
subpicture_region_t * subpicture_region_NewText(void)
This function will create a new text subpicture region.
Definition subpicture.c:276
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.
Definition subpicture.c:175
subpicture_region_t * subpicture_region_ForPicture(const video_format_t *p_fmt, picture_t *pic)
Create a subpicture region containing the picture.
Definition subpicture.c:289
subpicture_t * subpicture_New(const subpicture_updater_t *)
This function create a new empty subpicture.
Definition subpicture.c:45
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 pi...
Definition subpicture.c:121
#define VLC_VECTOR(type)
Vector struct body.
Definition vlc_vector.h:66
Structure describing a filter.
Definition vlc_filter.h:213
Video picture.
Definition vlc_picture.h:130
Definition subpicture.c:40
Definition subpicture.h:23
Definition vlc_subpicture.h:211
picture_t * p_picture
picture comprising this region
Definition vlc_subpicture.h:212
int i_alpha
transparency
Definition vlc_subpicture.h:214
vout_display_place_t place
visible area in display coordinates
Definition vlc_subpicture.h:213
Video subtitle region.
Definition vlc_subpicture.h:72
int i_y
position of region, relative to alignment
Definition vlc_subpicture.h:78
int i_align
alignment flags of region
Definition vlc_subpicture.h:79
int i_x
position of region, relative to alignment
Definition vlc_subpicture.h:77
video_format_t fmt
format of the picture
Definition vlc_subpicture.h:73
picture_t * p_picture
picture comprising this region
Definition vlc_subpicture.h:74
subpicture_region_private_t * p_private
Private data for spu_t only
Definition vlc_subpicture.h:89
int i_max_width
Definition vlc_subpicture.h:85
struct vlc_list node
vertical rendering/cropping target/limit
Definition vlc_subpicture.h:88
int i_alpha
transparency
Definition vlc_subpicture.h:80
int i_max_height
horizontal rendering/cropping target/limit
Definition vlc_subpicture.h:86
int text_flags
VLC_SUBPIC_TEXT_FLAG_xxx and SUBPICTURE_ALIGN_xxx.
Definition vlc_subpicture.h:84
text_segment_t * p_text
subtitle text, made of a list of segments
Definition vlc_subpicture.h:83
bool b_absolute
position is absolute in the movie
Definition vlc_subpicture.h:76
Video subtitle.
Definition vlc_subpicture.h:234
vlc_tick_t i_start
beginning of display date
Definition vlc_subpicture.h:251
subpicture_t * p_next
an increasing unique number
Definition vlc_subpicture.h:244
bool b_ephemer
If this flag is set to true the subtitle will be displayed until the next one appears or if i_stop is...
Definition vlc_subpicture.h:255
unsigned i_original_picture_height
original height of the movie
Definition vlc_subpicture.h:269
bool b_fade
enable fading
Definition vlc_subpicture.h:258
unsigned i_original_picture_width
original width of the movie
Definition vlc_subpicture.h:268
subpicture_private_t * p_private
Definition vlc_subpicture.h:275
int i_alpha
transparency
Definition vlc_subpicture.h:270
bool b_subtitle
subtitle with timestamps relative to the video
Definition vlc_subpicture.h:259
int64_t i_order
Definition vlc_subpicture.h:243
vlc_spu_regions regions
region list composing this subtitle
Definition vlc_subpicture.h:247
ssize_t i_channel
subpicture channel ID
Definition vlc_subpicture.h:237
vlc_tick_t i_stop
end of display date.
Definition vlc_subpicture.h:252
subpicture_updater_t updater
Definition vlc_subpicture.h:273
Definition vlc_subpicture.h:203
const struct vlc_spu_updater_ops * ops
Definition vlc_subpicture.h:205
void * sys
Definition vlc_subpicture.h:204
Text segment for subtitles.
Definition vlc_text_style.h:139
Doubly-linked list node.
Definition vlc_list.h:44
VLC object common members.
Definition vlc_objects.h:53
Definition vlc_subpicture.h:218
int64_t i_order
Definition vlc_subpicture.h:220
struct vlc_render_subpicture::@284 regions
list of regions to render
Definition vlc_subpicture.h:110
video_palette_t palette
Definition vlc_subpicture.h:115
int x_start
Definition vlc_subpicture.h:111
int y_end
Definition vlc_subpicture.h:114
int x_end
Definition vlc_subpicture.h:112
int y_start
Definition vlc_subpicture.h:113
Subpicture updater operation virtual table.
Definition vlc_subpicture.h:180
void(* update)(subpicture_t *, const video_format_t *prev_src, const video_format_t *p_fmt_src, const video_format_t *prev_dst, const video_format_t *p_fmt_dst, vlc_tick_t)
Mandatory callback called after pf_validate and doing the main job of creating the subpicture regions...
Definition vlc_subpicture.h:184
void(* destroy)(subpicture_t *)
Optional callback for subpicture private data cleanup.
Definition vlc_subpicture.h:190
Video placement.
Definition vlc_vout_display.h:334
This file is a collection of common definitions and types.
This provides convenience helpers for linked lists.
This file defines picture structures and functions in vlc.
int64_t vlc_tick_t
High precision date or time interval.
Definition vlc_tick.h:48
This provides convenience helpers for vectors.
Video output display modules interface.