25#ifndef VLC_SUBPICTURE_H
26#define VLC_SUBPICTURE_H 1
54#define VLC_SUBPIC_TEXT_FLAG_NO_REGION_BG (1 << 4)
56#define VLC_SUBPIC_TEXT_FLAG_GRID_MODE (1 << 5)
58#define VLC_SUBPIC_TEXT_FLAG_TEXT_NOT_BALANCED (1 << 6)
60#define VLC_SUBPIC_TEXT_FLAG_IS_TEXT (1 << 7)
91#define vlc_spu_regions_init(p_rs) \
93#define vlc_spu_regions_push(p_rs,reg) \
94 vlc_list_append(&(reg)->node, (p_rs))
95#define vlc_spu_regions_foreach(reg,p_rs) \
96 vlc_list_foreach(reg, (p_rs), node)
97#define vlc_spu_regions_foreach_const(reg,p_rs) \
98 vlc_list_foreach_const(reg, (p_rs), node)
99#define vlc_spu_regions_is_empty(p_rs) \
100 vlc_list_is_empty((p_rs))
101#define vlc_spu_regions_first_or_null(p_rs) \
102 vlc_list_first_entry_or_null((p_rs), subpicture_region_t, node)
103#define vlc_spu_regions_remove(p_rs, reg) \
104 vlc_list_remove(&(reg)->node)
116#define SUBPICTURE_ALIGN_LEFT 0x1
117#define SUBPICTURE_ALIGN_RIGHT 0x2
118#define SUBPICTURE_ALIGN_TOP 0x4
119#define SUBPICTURE_ALIGN_BOTTOM 0x8
120#define SUBPICTURE_ALIGN_MASK ( SUBPICTURE_ALIGN_LEFT|SUBPICTURE_ALIGN_RIGHT| \
121 SUBPICTURE_ALIGN_TOP |SUBPICTURE_ALIGN_BOTTOM )
206#define subpicture_region_IsText(r) \
207 (((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:260
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:367
unsigned picture_BlendSubpicture(picture_t *, vlc_blender_t *, vlc_render_subpicture *)
This function will blend a given subpicture onto a picture.
Definition subpicture.c:379
void subpicture_region_Delete(subpicture_region_t *p_region)
This function will destroy a subpicture region allocated by subpicture_region_New.
Definition subpicture.c:350
subpicture_region_t * subpicture_region_NewText(void)
This function will create a new text subpicture region.
Definition subpicture.c:299
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:312
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 vlc_subpicture.h:222
picture_t * p_picture
picture comprising this region
Definition vlc_subpicture.h:223
int i_alpha
transparency
Definition vlc_subpicture.h:225
vout_display_place_t place
visible area in display coordinates
Definition vlc_subpicture.h:224
Video subtitle region.
Definition vlc_subpicture.h:71
int i_y
position of region, relative to alignment
Definition vlc_subpicture.h:77
int i_align
alignment flags of region
Definition vlc_subpicture.h:78
int i_x
position of region, relative to alignment
Definition vlc_subpicture.h:76
video_format_t fmt
format of the picture
Definition vlc_subpicture.h:72
picture_t * p_picture
picture comprising this region
Definition vlc_subpicture.h:73
int i_max_width
Definition vlc_subpicture.h:84
struct vlc_list node
vertical rendering/cropping target/limit
Definition vlc_subpicture.h:87
int i_alpha
transparency
Definition vlc_subpicture.h:79
int i_max_height
horizontal rendering/cropping target/limit
Definition vlc_subpicture.h:85
int text_flags
VLC_SUBPIC_TEXT_FLAG_xxx and SUBPICTURE_ALIGN_xxx.
Definition vlc_subpicture.h:83
text_segment_t * p_text
subtitle text, made of a list of segments
Definition vlc_subpicture.h:82
bool b_absolute
position is absolute in the movie
Definition vlc_subpicture.h:75
Video subtitle.
Definition vlc_subpicture.h:245
vlc_tick_t i_start
beginning of display date
Definition vlc_subpicture.h:262
subpicture_t * p_next
an increasing unique number
Definition vlc_subpicture.h:255
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:266
unsigned i_original_picture_height
original height of the movie
Definition vlc_subpicture.h:280
bool b_fade
enable fading
Definition vlc_subpicture.h:269
unsigned i_original_picture_width
original width of the movie
Definition vlc_subpicture.h:279
subpicture_private_t * p_private
Definition vlc_subpicture.h:286
int i_alpha
transparency
Definition vlc_subpicture.h:281
bool b_subtitle
subtitle with timestamps relative to the video
Definition vlc_subpicture.h:270
int64_t i_order
Definition vlc_subpicture.h:254
vlc_spu_regions regions
region list composing this subtitle
Definition vlc_subpicture.h:258
ssize_t i_channel
subpicture channel ID
Definition vlc_subpicture.h:248
vlc_tick_t i_stop
end of display date.
Definition vlc_subpicture.h:263
subpicture_updater_t updater
Definition vlc_subpicture.h:284
Definition vlc_subpicture.h:214
const struct vlc_spu_updater_ops * ops
Definition vlc_subpicture.h:216
void * sys
Definition vlc_subpicture.h:215
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:229
int64_t i_order
Definition vlc_subpicture.h:231
struct vlc_render_subpicture::@284 regions
list of regions to render
Definition vlc_subpicture.h:108
video_palette_t palette
Definition vlc_subpicture.h:113
int x_start
Definition vlc_subpicture.h:109
int y_end
Definition vlc_subpicture.h:112
int x_end
Definition vlc_subpicture.h:110
int y_start
Definition vlc_subpicture.h:111
Definition vlc_subpicture.h:173
const video_format_t * video_src
Definition vlc_subpicture.h:175
const video_format_t * prev_src
Definition vlc_subpicture.h:179
const video_format_t * video_dst
Definition vlc_subpicture.h:177
const video_format_t * prev_dst
Definition vlc_subpicture.h:181
vlc_tick_t pts
Definition vlc_subpicture.h:184
Subpicture updater operation virtual table.
Definition vlc_subpicture.h:193
void(* destroy)(subpicture_t *)
Optional callback for subpicture private data cleanup.
Definition vlc_subpicture.h:201
void(* update)(subpicture_t *, const struct vlc_spu_updater_configuration *)
Mandatory callback called after pf_validate and doing the main job of creating the subpicture regions...
Definition vlc_subpicture.h:197
Video placement.
Definition vlc_vout_display.h:361
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.