VLC  4.0.0-dev
vout_wrapper.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * vout_wrapper.h: definitions for vout wrappers (temporary)
3  *****************************************************************************
4  * Copyright (C) 2009 Laurent Aimar
5  *
6  * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published by
10  * the Free Software Foundation; either version 2.1 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software Foundation,
20  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22 
23 #ifndef LIBVLC_VOUT_WRAPPER_H
24 #define LIBVLC_VOUT_WRAPPER_H 1
25 
26 #include <vlc_vout_display.h>
27 
28 /* XXX DO NOT use it outside the vout module wrapper XXX */
29 struct vout_crop;
30 
32 
36 
37 void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
38 void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den);
39 void vout_SetDisplayAspect(vout_display_t *, unsigned num, unsigned den);
40 void vout_SetDisplayCrop(vout_display_t *, const struct vout_crop *);
42 
43 #endif /* LIBVLC_VOUT_WRAPPER_H */
44 
SpuRegionPlace
static void SpuRegionPlace(int *x, int *y, const subpicture_t *subpic, const subpicture_region_t *region, int i_align)
Place a region.
Definition: vout_subpictures.c:524
VLC_VECTOR
#define VLC_VECTOR(type)
Vector struct body.
Definition: vlc_vector.h:65
vout_thread_private_t
Definition: vout_private.h:34
vlc_mutex_init
void vlc_mutex_init(vlc_mutex_t *mtx)
Initializes a fast mutex.
Definition: threads.c:123
vlc_spu.h
SpuRenderCreateAndLoadScale
static filter_t * SpuRenderCreateAndLoadScale(vlc_object_t *object, vlc_fourcc_t src_chroma, vlc_fourcc_t dst_chroma, bool require_resize)
Definition: vout_subpictures.c:283
spu_render_entry_t::orgstart
vlc_tick_t orgstart
Definition: vout_subpictures.c:83
count
size_t count
Definition: core.c:401
spu_scale_t::h
int h
Definition: vout_subpictures.c:364
spu_RegisterChannel
ssize_t spu_RegisterChannel(spu_t *spu)
It registers a new SPU channel.
Definition: vout_subpictures.c:2033
input_GetAttachments
int input_GetAttachments(input_thread_t *input, input_attachment_t ***attachments)
Definition: input.c:3500
spu_private_t::last_sort_date
vlc_tick_t last_sort_date
Definition: vout_subpictures.c:133
vout_private.h
video_format_t::p_palette
video_palette_t * p_palette
video palette from demuxer
Definition: vlc_es.h:371
subpicture_Update
void subpicture_Update(subpicture_t *p_subpicture, const video_format_t *p_fmt_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.
Definition: subpicture.c:149
var_Create
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
IntegerCmp
static int IntegerCmp(int64_t i0, int64_t i1)
This function compares two 64 bits integers.
Definition: vout_subpictures.c:554
VIDEO_ES
@ VIDEO_ES
Definition: vlc_es.h:604
vlc_filter_operations::filter_video
picture_t *(* filter_video)(filter_t *, picture_t *)
Filter a picture (video filter)
Definition: vlc_filter.h:89
picture_t::format
video_frame_format_t format
The properties of the picture.
Definition: vlc_picture.h:125
input_attachment_t
Definition: vlc_input.h:159
es_format_t::video
video_format_t video
description of video format
Definition: vlc_es.h:647
COLOR_RANGE_FULL
@ COLOR_RANGE_FULL
Definition: vlc_es.h:342
spu_private_t::height
int height
Definition: vout_subpictures.c:96
spu_render_entry_t::start
vlc_tick_t start
Definition: vout_subpictures.c:85
spu_render_entry_IsSelected
static bool spu_render_entry_IsSelected(spu_render_entry_t *render_entry, size_t channel_id, vlc_tick_t system_now, vlc_tick_t render_subtitle_date, bool ignore_osd)
Definition: vout_subpictures.c:632
spu_channel::id
size_t id
Definition: vout_subpictures.c:69
VOUT_SPU_CHANNEL_OSD
#define VOUT_SPU_CHANNEL_OSD
Definition: vlc_vout.h:128
video_format_Copy
static int video_format_Copy(video_format_t *p_dst, const video_format_t *p_src)
Copy video_format_t including the palette.
Definition: vlc_es.h:416
subpicture_region_t::i_max_width
int i_max_width
try to balance wrapped text lines
Definition: vlc_subpicture.h:75
vlc_spu_highlight_t::x_end
int x_end
Definition: vlc_subpicture.h:88
spu_GetFreeChannelId
static ssize_t spu_GetFreeChannelId(spu_t *spu, enum vlc_vout_order *order)
Definition: vout_subpictures.c:196
spu_private_t::filter_chain_update
char * filter_chain_update
Definition: vout_subpictures.c:114
vout_SetDisplayFilled
void vout_SetDisplayFilled(vout_display_t *, bool is_filled)
Definition: display.c:588
vlc_spu_highlight_t
Definition: vlc_subpicture.h:85
unlikely
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
var_DelCallback
void() var_DelCallback(vlc_object_t *p_this, const char *psz_name, vlc_callback_t pf_callback, void *p_data)
Deregisters a callback from a variable.
Definition: variables.c:854
spu_channel_Init
static void spu_channel_Init(struct spu_channel *channel, size_t id, enum vlc_vout_order order, vlc_clock_t *clock)
Definition: vout_subpictures.c:140
video_format_t::color_range
video_color_range_t color_range
0-255 instead of 16-235
Definition: vlc_es.h:376
vlc_common.h
spu_private_t::scale
filter_t * scale
scaling module (all but YUVP)
Definition: vout_subpictures.c:90
spu_private_t::source_chain_update
char * source_chain_update
Definition: vout_subpictures.c:111
SpuAreaFixOverlap
static void SpuAreaFixOverlap(spu_area_t *dst, const spu_area_t *sub_array, size_t sub_count, int align)
Avoid area overlapping.
Definition: vout_subpictures.c:459
spu_channel_Push
static int spu_channel_Push(struct spu_channel *channel, subpicture_t *subpic, vlc_tick_t orgstart, vlc_tick_t orgstop)
Definition: vout_subpictures.c:152
vout_SetDisplayZoom
void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den)
Definition: display.c:600
spu_channel::order
enum vlc_vout_order order
Definition: vout_subpictures.c:70
DISPLAY_PICTURE_COUNT
#define DISPLAY_PICTURE_COUNT
Definition: vout_wrapper.c:53
subpicture_region_t::i_y
int i_y
position of region, relative to alignment
Definition: vlc_subpicture.h:65
filter_t::p_module
module_t * p_module
Definition: vlc_filter.h:220
spu_private_t::filter_chain
filter_chain_t * filter_chain
Definition: vout_subpictures.c:116
video_format_t::i_y_offset
unsigned int i_y_offset
start offset of visible area
Definition: vlc_es.h:358
VLC_VAR_DOINHERIT
#define VLC_VAR_DOINHERIT
Creation flag.
Definition: vlc_variables.h:69
spu_PrerenderWake
static void spu_PrerenderWake(spu_private_t *sys, const video_format_t *fmt_dst, const video_format_t *fmt_src, const vlc_fourcc_t *chroma_list)
Definition: vout_subpictures.c:1418
subpicture_t::updater
subpicture_updater_t updater
Definition: vlc_subpicture.h:203
vlc_vout.h
filter_chain_ForEach
int filter_chain_ForEach(filter_chain_t *chain, int(*cb)(filter_t *, void *), void *opaque)
Definition: filter_chain.c:389
video_palette_t::i_entries
int i_entries
to keep the compatibility with libavcodec's palette
Definition: vlc_es.h:45
vlc_mutex_assert
#define vlc_mutex_assert(m)
Asserts that a mutex is locked by the calling thread.
Definition: vlc_threads.h:328
vout_SetDisplayAspect
void vout_SetDisplayAspect(vout_display_t *, unsigned num, unsigned den)
Definition: display.c:614
sub_cbs
static const struct filter_subpicture_callbacks sub_cbs
Definition: vout_subpictures.c:1343
video_format_t::i_sar_num
unsigned int i_sar_num
sample/pixel aspect ratio
Definition: vlc_es.h:364
vlc_clock_SetDelay
vlc_tick_t vlc_clock_SetDelay(vlc_clock_t *clock, vlc_tick_t delay)
This functions change the clock delay.
Definition: clock.c:512
video_format_Clean
static void video_format_Clean(video_format_t *p_src)
Cleanup and free palette of this video_format_t.
Definition: vlc_es.h:470
module_need_var
#define module_need_var(a, b, c)
Definition: vlc_modules.h:123
spu_private_t::crop
struct spu_private_t::@131 crop
cropping
spu_PrerenderPause
static void spu_PrerenderPause(spu_private_t *sys)
Definition: vout_subpictures.c:1466
COLOR_RANGE_UNDEF
@ COLOR_RANGE_UNDEF
Definition: vlc_es.h:341
subpicture_t::i_original_picture_height
int i_original_picture_height
original height of the movie
Definition: vlc_subpicture.h:199
picture_pool_GetSize
unsigned picture_pool_GetSize(const picture_pool_t *pool)
Definition: picture_pool.c:234
spu_render_entry_t
Definition: vout_subpictures.c:53
spu_private_t::scale_yuvp
filter_t * scale_yuvp
scaling module for YUVP
Definition: vout_subpictures.c:89
vlc_vector_push
#define vlc_vector_push(pv, item)
Push an item at the end of the vector.
Definition: vlc_vector.h:313
filter_DelProxyCallbacks
#define filter_DelProxyCallbacks(a, b, c)
Definition: vlc_filter.h:387
spu_private_t::vector
spu_prerender_vector vector
Definition: vout_subpictures.c:124
subpicture_region_private_t::fmt
video_format_t fmt
Definition: subpicture.h:44
picture_Release
static void picture_Release(picture_t *picture)
Decrements the picture reference count.
Definition: vlc_picture.h:368
spu_private_t::source_chain_current
char * source_chain_current
Definition: vout_subpictures.c:110
spu_PutSubpicture
void spu_PutSubpicture(spu_t *spu, subpicture_t *subpic)
Display a subpicture.
Definition: vout_subpictures.c:1792
VLC_VOUT_ORDER_PRIMARY
@ VLC_VOUT_ORDER_PRIMARY
There is only one primary vout/spu_channel For vouts: this is the first vout, probably embedded in th...
Definition: vlc_vout.h:78
var_AddCallback
void() var_AddCallback(vlc_object_t *p_this, const char *psz_name, vlc_callback_t pf_callback, void *p_data)
Registers a callback for a variable.
Definition: variables.c:801
spu_SetClockDelay
void spu_SetClockDelay(spu_t *spu, size_t channel_id, vlc_tick_t delay)
Definition: vout_subpictures.c:1761
spu_UnregisterChannel
void spu_UnregisterChannel(spu_t *spu, size_t channel_id)
Definition: vout_subpictures.c:2063
filter_t::fmt_in
es_format_t fmt_in
Definition: vlc_filter.h:224
vlc_cond_wait
void vlc_cond_wait(vlc_cond_t *cond, vlc_mutex_t *mutex)
Waits on a condition variable.
Definition: threads.c:340
VLC_VAR_BOOL
#define VLC_VAR_BOOL
Definition: vlc_variables.h:49
video_format_t
video format description
Definition: vlc_es.h:351
spu_render_entry_t::orgstop
vlc_tick_t orgstop
Definition: vout_subpictures.c:84
subpicture_region_t::p_private
subpicture_region_private_t * p_private
Private data for spu_t only
Definition: vlc_subpicture.h:82
spu_private_t::textlock
vlc_mutex_t textlock
Definition: vout_subpictures.c:88
VLC_CODEC_TEXT
#define VLC_CODEC_TEXT
Definition: vlc_fourcc.h:594
spu_scale_create
static spu_scale_t spu_scale_create(int w, int h)
Definition: vout_subpictures.c:367
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
spu_channel_vector
Definition: vout_subpictures.c:76
subpicture_region_t::i_x
int i_x
position of region, relative to alignment
Definition: vlc_subpicture.h:64
PROJECTION_MODE_RECTANGULAR
@ PROJECTION_MODE_RECTANGULAR
Definition: vlc_es.h:258
var_InheritString
static char * var_InheritString(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:705
vout_display_owner_t
Vout owner structures.
Definition: vlc_vout_display.h:191
spu_private_t::secondary_alignment
int secondary_alignment
Force alignment for secondary subs.
Definition: vout_subpictures.c:106
vlc_viewpoint_t
Viewpoints.
Definition: vlc_viewpoint.h:41
picture_pool_Release
void picture_pool_Release(picture_pool_t *pool)
Releases a pool created by picture_pool_New() or picture_pool_NewFromFormat().
Definition: picture_pool.c:61
spu_private_t::palette
video_palette_t palette
force palette of subpicture
Definition: vout_subpictures.c:107
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
vlc_vector_init
#define vlc_vector_init(pv)
Initialize an empty vector.
Definition: vlc_vector.h:80
ARRAY_SIZE
#define ARRAY_SIZE(x)
Definition: vlc_arrays.h:178
es_format_Init
void es_format_Init(es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec)
This function will initialize a es_format_t structure.
Definition: es_format.c:409
subpicture_t::i_start
vlc_tick_t i_start
beginning of display date
Definition: vlc_subpicture.h:184
video_format_t::transfer
video_transfer_func_t transfer
transfer function
Definition: vlc_es.h:374
SpuRenderText
static int SpuRenderText(spu_t *spu, subpicture_region_t *region, int i_original_width, int i_original_height, const vlc_fourcc_t *chroma_list)
Definition: vout_subpictures.c:317
subpicture_t::b_absolute
bool b_absolute
position is absolute
Definition: vlc_subpicture.h:197
video_format_AdjustColorSpace
static void video_format_AdjustColorSpace(video_format_t *p_fmt)
Definition: vlc_es.h:429
vlc_ureduce
VLC_EXPORT bool vlc_ureduce(unsigned *, unsigned *, uint64_t, uint64_t, uint64_t)
spu_area_t::y
int y
Definition: vout_subpictures.c:407
vlc_spu_highlight_t::x_start
int x_start
Definition: vlc_subpicture.h:87
spu_private_t::cond
vlc_cond_t cond
Definition: vout_subpictures.c:122
spu_render_entry_t::subpic
subpicture_t * subpic
Definition: vout_subpictures.c:81
picture_t
Video picture.
Definition: vlc_picture.h:120
spu_area_create
static spu_area_t spu_area_create(int x, int y, int w, int h, spu_scale_t s)
Definition: vout_subpictures.c:414
spu_private_t::channels
spu_channel_vector channels
Definition: vout_subpictures.c:84
spu_private_t::filter_chain_current
char * filter_chain_current
Definition: vout_subpictures.c:113
vlc_cond_signal
void vlc_cond_signal(vlc_cond_t *cond)
Wakes up one thread waiting on a condition variable.
Definition: threads.c:253
SubSourceInit
static int SubSourceInit(filter_t *filter, void *data)
Definition: vout_subpictures.c:1347
vlc_vector_remove
#define vlc_vector_remove(pv, index)
Remove an item.
Definition: vlc_vector.h:577
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
subpicture_t::i_alpha
int i_alpha
transparency
Definition: vlc_subpicture.h:200
filter_chain_AppendFromString
int filter_chain_AppendFromString(filter_chain_t *chain, const char *str)
Append new filter to filter chain from string.
Definition: filter_chain.c:345
video_format_t::primaries
video_color_primaries_t primaries
color primaries
Definition: vlc_es.h:373
COLOR_SPACE_SRGB
#define COLOR_SPACE_SRGB
Definition: vlc_es.h:318
VLC_VOUT_ORDER_SECONDARY
@ VLC_VOUT_ORDER_SECONDARY
There can be several secondary vouts or spu_channels For vouts: a secondary vout using its own window...
Definition: vlc_vout.h:86
spu_render_entry_t::is_late
bool is_late
Definition: vout_subpictures.c:87
RestartSubFilterCallback
static int RestartSubFilterCallback(vlc_object_t *obj, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data)
Definition: vout_subpictures.c:1374
spu_area_t::scale
spu_scale_t scale
Definition: vout_subpictures.c:411
filter_AddProxyCallbacks
#define filter_AddProxyCallbacks(a, b, c)
Definition: vlc_filter.h:376
VOUT_SPU_CHANNEL_INVALID
#define VOUT_SPU_CHANNEL_INVALID
Definition: vlc_vout.h:127
spu_private_t::prerender
struct spu_private_t::@132 prerender
spu_prerender_vector::size
size_t size
Definition: vout_subpictures.c:77
spu_channel::entries
spu_render_vector entries
Definition: vout_subpictures.c:68
video_format_t::projection_mode
video_projection_mode_t projection_mode
Multiview left or right eye first.
Definition: vlc_es.h:382
spu_area_scaled
static spu_area_t spu_area_scaled(spu_area_t a)
Definition: vout_subpictures.c:419
filter_t::fmt_out
es_format_t fmt_out
Definition: vlc_filter.h:228
video_format_t::space
video_color_space_t space
YCbCr color space.
Definition: vlc_es.h:375
spu_area_t
A few area functions helpers.
Definition: vout_subpictures.c:405
vlc_clone
int vlc_clone(vlc_thread_t *th, void *(*entry)(void *), void *data, int priority)
Creates and starts a new thread.
Definition: thread.c:144
video_palette_t
Definition: vlc_es.h:43
SpuRenderCreateAndLoadText
static filter_t * SpuRenderCreateAndLoadText(spu_t *spu)
Definition: vout_subpictures.c:253
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
spu_prerender_vector::data
subpicture_t ** data
Definition: vout_subpictures.c:77
filter_Close
static void filter_Close(filter_t *p_filter)
Definition: vlc_filter.h:244
vlc_vector_reserve
#define vlc_vector_reserve(pv, mincap)
Increase the capacity of the vector to at least mincap.
Definition: vlc_vector.h:259
vlc_assert_unreachable
#define vlc_assert_unreachable()
Impossible branch assertion.
Definition: vlc_common.h:253
spu_PrerenderEnqueue
static void spu_PrerenderEnqueue(spu_private_t *sys, subpicture_t *p_subpic)
Definition: vout_subpictures.c:1446
SubFilterDelProxyCallbacks
static int SubFilterDelProxyCallbacks(filter_t *filter, void *opaque)
Definition: vout_subpictures.c:1389
spu_RegisterChannelInternal
ssize_t spu_RegisterChannelInternal(spu_t *spu, vlc_clock_t *clock, enum vlc_vout_order *order)
Definition: vout_subpictures.c:2007
spu_channel::clock
vlc_clock_t * clock
Definition: vout_subpictures.c:71
TRANSFER_FUNC_SRGB
@ TRANSFER_FUNC_SRGB
Definition: vlc_es.h:293
filter_owner_t
Definition: vlc_filter.h:65
video_format_t::i_width
unsigned int i_width
picture width
Definition: vlc_es.h:355
vout_CloseWrapper
void vout_CloseWrapper(vout_thread_t *vout, vout_thread_private_t *sys, vout_display_t *vd)
Definition: vout_wrapper.c:131
subpicture_t::i_channel
ssize_t i_channel
subpicture channel ID
Definition: vlc_subpicture.h:170
spu_ChangeChannelOrderMargin
void spu_ChangeChannelOrderMargin(spu_t *spu, enum vlc_vout_order order, int margin)
Definition: vout_subpictures.c:2112
picture_pool_t
Definition: picture_pool.c:42
vlc_tick_now
vlc_tick_t vlc_tick_now(void)
Precision monotonic clock.
Definition: thread.c:261
COLOR_PRIMARIES_UNDEF
@ COLOR_PRIMARIES_UNDEF
Definition: vlc_es.h:269
SUBPICTURE_ALIGN_LEFT
#define SUBPICTURE_ALIGN_LEFT
Definition: vlc_subpicture.h:95
SUBPICTURE_ALIGN_BOTTOM
#define SUBPICTURE_ALIGN_BOTTOM
Definition: vlc_subpicture.h:98
subpicture_updater_t::pf_validate
int(* pf_validate)(subpicture_t *, bool has_src_changed, const video_format_t *p_fmt_src, bool has_dst_changed, const video_format_t *p_fmt_dst, vlc_tick_t)
Optional pre update callback, usually useful on video format change.
Definition: vlc_subpicture.h:140
SSizeCmp
static int SSizeCmp(ssize_t i0, ssize_t i1)
Definition: vout_subpictures.c:559
video_format_t::i_x_offset
unsigned int i_x_offset
start offset of visible area
Definition: vlc_es.h:357
spu_Destroy
void spu_Destroy(spu_t *spu)
Destroy the subpicture unit.
Definition: vout_subpictures.c:1623
spu_render_vector::data
spu_render_entry_t * data
Definition: vout_subpictures.c:65
vout_display_t::source
const video_format_t * source
Source video format.
Definition: vlc_vout_display.h:335
filter_t
Structure describing a filter.
Definition: vlc_filter.h:215
spu_Attach
void spu_Attach(spu_t *spu, input_thread_t *input)
Attach the SPU to an input.
Definition: vout_subpictures.c:1733
spu_scale_h
static int spu_scale_h(int v, const spu_scale_t s)
Definition: vout_subpictures.c:389
vlc_tick_t
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45
vlc_clock_Reset
void vlc_clock_Reset(vlc_clock_t *clock)
This function resets the clock drift.
Definition: clock.c:507
spu_private_t::thread
vlc_thread_t thread
Definition: vout_subpictures.c:120
spu_private_t::margin
int margin
force position of a subpicture
Definition: vout_subpictures.c:99
filter_owner_t::sys
void * sys
Definition: vlc_filter.h:78
SubFilterAddProxyCallbacks
static int SubFilterAddProxyCallbacks(filter_t *filter, void *opaque)
Definition: vout_subpictures.c:1382
subpicture_t
Video subtitle.
Definition: vlc_subpicture.h:166
filter_owner_t::pf_get_attachments
int(* pf_get_attachments)(filter_t *, input_attachment_t ***, int *)
Definition: vlc_filter.h:76
spu_SetHighlight
void spu_SetHighlight(spu_t *spu, const vlc_spu_highlight_t *hl)
Definition: vout_subpictures.c:2132
vout_display_cfg
User configuration for a video output display (vout_display_t)
Definition: vlc_vout_display.h:94
SubSourceDelProxyCallbacks
static int SubSourceDelProxyCallbacks(filter_t *filter, void *opaque)
Definition: vout_subpictures.c:1411
subpicture_t::p_region
subpicture_region_t * p_region
region list composing this subtitle
Definition: vlc_subpicture.h:180
spu_channel_Clean
static void spu_channel_Clean(spu_private_t *sys, struct spu_channel *channel)
Definition: vout_subpictures.c:174
subpicture_region_private_t::p_picture
picture_t * p_picture
Definition: subpicture.h:45
vlc_filter.h
spu_area_t::x
int x
Definition: vout_subpictures.c:406
subpicture_region_t::i_align
int i_align
alignment flags of region
Definition: vlc_subpicture.h:66
UpdateSPU
static void UpdateSPU(spu_t *spu, const vlc_spu_highlight_t *hl)
Definition: vout_subpictures.c:1302
spu_t
Subpicture unit descriptor.
Definition: vlc_spu.h:47
spu_scale_createq
static spu_scale_t spu_scale_createq(int64_t wn, int64_t wd, int64_t hn, int64_t hd)
Definition: vout_subpictures.c:380
spu_private_t::live
bool live
Definition: vout_subpictures.c:129
spu_render_vector::size
size_t size
Definition: vout_subpictures.c:65
vlc_vout_display.h
subpicture_region_t
Video subtitle region.
Definition: vlc_subpicture.h:59
vlc_plugin.h
vout_FilterFlush
void vout_FilterFlush(vout_display_t *)
Definition: display.c:424
filter_t::ops
const struct vlc_filter_operations * ops
Definition: vlc_filter.h:238
lock
vlc_mutex_t lock
Definition: rand.c:50
spu_ChangeSources
void spu_ChangeSources(spu_t *spu, const char *filters)
It changes the sub sources list.
Definition: vout_subpictures.c:2074
spu_channel_vector::data
struct spu_channel * data
Definition: vout_subpictures.c:76
subpicture_t::i_original_picture_width
int i_original_picture_width
original width of the movie
Definition: vlc_subpicture.h:198
vout_display_New
vout_display_t * vout_display_New(vlc_object_t *parent, const video_format_t *source, vlc_video_context *vctx, const vout_display_cfg_t *cfg, const char *module, const vout_display_owner_t *owner)
Creates video output display.
Definition: display.c:668
spu_private_t::vout
vout_thread_t * vout
Definition: vout_subpictures.c:134
vlc_thread_t
Thread handle.
Definition: vlc_threads.h:180
var_SetBool
static int var_SetBool(vlc_object_t *p_obj, const char *psz_name, bool b)
Set the value of an boolean variable.
Definition: vlc_variables.h:308
spu_channel_UpdateDates
static size_t spu_channel_UpdateDates(struct spu_channel *channel, vlc_tick_t system_now)
Definition: vout_subpictures.c:592
video_palette_t::palette
uint8_t palette[256][4]
4-byte RGBA/YUVA palette
Definition: vlc_es.h:46
spu_channel
Definition: vout_subpictures.c:67
spu_scale_unit
static spu_scale_t spu_scale_unit(void)
Definition: vout_subpictures.c:376
spu_channel_Clear
static void spu_channel_Clear(spu_private_t *sys, struct spu_channel *channel)
Definition: vout_subpictures.c:2039
spu_channel::rate
float rate
Definition: vout_subpictures.c:73
SUBPICTURE_ALIGN_RIGHT
#define SUBPICTURE_ALIGN_RIGHT
Definition: vlc_subpicture.h:96
vlc_clock_t
Definition: clock.c:63
spu_SelectSubpictures
static spu_render_entry_t * spu_SelectSubpictures(spu_t *spu, vlc_tick_t system_now, vlc_tick_t render_subtitle_date, bool ignore_osd, size_t *subpicture_count)
Definition: vout_subpictures.c:664
spu_ChangeFilters
void spu_ChangeFilters(spu_t *spu, const char *filters)
It changes the sub filters list.
Definition: vout_subpictures.c:2093
filter_subpicture_callbacks
Definition: vlc_filter.h:60
spu_render_entry_t::channel_order
enum vlc_vout_order channel_order
Definition: vout_subpictures.c:88
spu_area_overlap
static bool spu_area_overlap(spu_area_t a, spu_area_t b)
Definition: vout_subpictures.c:447
subpicture_region_t::p_next
subpicture_region_t * p_next
next region in the list
Definition: vlc_subpicture.h:81
vout_ControlChangeSubFilters
void vout_ControlChangeSubFilters(vout_thread_t *vout, const char *filters)
Definition: video_output.c:701
video_format_t::i_visible_height
unsigned int i_visible_height
height of visible area
Definition: vlc_es.h:360
spu_t::p
spu_private_t * p
Definition: vlc_spu.h:51
SPU_CHROMALIST_COUNT
#define SPU_CHROMALIST_COUNT
Definition: vout_subpictures.c:78
subpicture_t::b_subtitle
bool b_subtitle
the picture is a movie subtitle
Definition: vlc_subpicture.h:196
vout_thread_private_t::private_pool
picture_pool_t * private_pool
Definition: vout_private.h:42
vlc_fourcc_IsYUV
bool vlc_fourcc_IsYUV(vlc_fourcc_t fcc)
It returns true if the given fourcc is YUV and false otherwise.
Definition: fourcc.c:680
vout_GetPool
picture_pool_t * vout_GetPool(vout_display_t *vd, unsigned count)
It retreives a picture pool from the display.
Definition: display.c:385
spu_private_t::y
int y
Definition: vout_subpictures.c:94
VLC_CODEC_BGRA
#define VLC_CODEC_BGRA
Definition: vlc_fourcc.h:355
vout_crop
Definition: vout_internal.h:107
video_format_t::i_sar_den
unsigned int i_sar_den
Definition: vlc_es.h:365
spu_private_t::p_processed
subpicture_t * p_processed
Definition: vout_subpictures.c:125
spu_prerender_vector
Definition: vout_subpictures.c:77
spu_private_t::input
input_thread_t * input
Definition: vout_subpictures.c:82
filter_chain_IsEmpty
bool filter_chain_IsEmpty(const filter_chain_t *chain)
Checks if the filter chain is empty.
Definition: filter_chain.c:401
spu_private_t::width
int width
Definition: vout_subpictures.c:95
subpicture_New
subpicture_t * subpicture_New(const subpicture_updater_t *p_upd)
This function create a new empty subpicture.
Definition: subpicture.c:43
vlc_video_context
Definition: decoder_helpers.c:228
vout_GetPool
picture_pool_t * vout_GetPool(vout_display_t *vd, unsigned count)
It retreives a picture pool from the display.
Definition: display.c:385
vlc_vector.h
spu_channel_DeleteAt
static void spu_channel_DeleteAt(struct spu_channel *channel, size_t index)
Definition: vout_subpictures.c:165
spu_private_t::filter_chain_lock
vlc_mutex_t filter_chain_lock
Definition: vout_subpictures.c:115
spu_scale_t
Definition: vout_subpictures.c:362
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
spu_Render
subpicture_t * spu_Render(spu_t *spu, const vlc_fourcc_t *chroma_list, const video_format_t *fmt_dst, const video_format_t *fmt_src, vlc_tick_t system_now, vlc_tick_t render_subtitle_date, bool ignore_osd, bool external_scale)
This function will return an unique subpicture containing the OSD and subtitles visibles at the reque...
Definition: vout_subpictures.c:1895
vlc_vector_clear
#define vlc_vector_clear(pv)
Clear a vector.
Definition: vlc_vector.h:101
spu_private_t::output_cond
vlc_cond_t output_cond
Definition: vout_subpictures.c:123
spu_render_vector
Definition: vout_subpictures.c:65
VLC_ENOMEM
#define VLC_ENOMEM
Not enough memory.
Definition: vlc_common.h:476
spu_Cleanup
static void spu_Cleanup(spu_t *spu)
Definition: vout_subpictures.c:1580
VOUT_MAX_PICTURES
#define VOUT_MAX_PICTURES
Definition: vout_internal.h:38
subpicture_t::b_ephemer
bool b_ephemer
If this flag is set to true the subtitle will be displayed until the next one appear.
Definition: vlc_subpicture.h:186
VLC_UNUSED
#define VLC_UNUSED(x)
Definition: vlc_common.h:1105
vlc_vector_index_of
#define vlc_vector_index_of(pv, item, pidx)
Return the index of an item.
Definition: vlc_vector.h:615
spu_area_t::width
int width
Definition: vout_subpictures.c:408
vlc_clock_ConvertArrayToSystem
void vlc_clock_ConvertArrayToSystem(vlc_clock_t *clock, vlc_tick_t system_now, vlc_tick_t *ts_array, size_t ts_count, double rate)
This functon converts an array of timestamp from stream to system.
Definition: clock.c:527
VLC_CODEC_YUVA
#define VLC_CODEC_YUVA
Definition: vlc_fourcc.h:270
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
COLOR_SPACE_UNDEF
@ COLOR_SPACE_UNDEF
Definition: vlc_es.h:314
VLC_THREAD_PRIORITY_VIDEO
#define VLC_THREAD_PRIORITY_VIDEO
Definition: vlc_threads.h:210
video_format_t::i_visible_width
unsigned int i_visible_width
width of visible area
Definition: vlc_es.h:359
spu_Detach
void spu_Detach(spu_t *spu)
Detach the SPU from its attached input.
Definition: vout_subpictures.c:1753
strdup
char * strdup(const char *)
spu_area_unscaled
static spu_area_t spu_area_unscaled(spu_area_t a, spu_scale_t s)
Definition: vout_subpictures.c:432
filter_chain_t
Definition: filter_chain.c:46
var_InheritInteger
static int64_t var_InheritInteger(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:685
SpuRenderRegion
static void SpuRenderRegion(spu_t *spu, subpicture_region_t **dst_ptr, spu_area_t *dst_area, const spu_render_entry_t *entry, subpicture_region_t *region, const spu_scale_t scale_size, const vlc_fourcc_t *chroma_list, const video_format_t *fmt, int i_original_width, int i_original_height, const spu_area_t *subtitle_area, size_t subtitle_area_count, vlc_tick_t render_date)
It will transform the provided region into another region suitable for rendering.
Definition: vout_subpictures.c:796
spu_ClearChannel
void spu_ClearChannel(spu_t *spu, size_t channel_id)
It clears all subpictures associated to a SPU channel.
Definition: vout_subpictures.c:2049
subpicture_t::b_fade
bool b_fade
enable fading
Definition: vlc_subpicture.h:188
display.h
vout_IsDisplayFiltered
bool vout_IsDisplayFiltered(vout_display_t *vd)
Definition: display.c:394
SubSourceClean
static int SubSourceClean(filter_t *filter, void *data)
Definition: vout_subpictures.c:1360
filter_chain_SubSource
void filter_chain_SubSource(filter_chain_t *p_chain, spu_t *spu, vlc_tick_t display_date)
Generate subpictures from a chain of subpicture source "filters".
Definition: filter_chain.c:476
vlc_custom_create
#define vlc_custom_create(o, s, n)
Definition: libvlc.h:117
es_format_t::i_codec
vlc_fourcc_t i_codec
FOURCC value as used in vlc.
Definition: vlc_es.h:621
spu_private_t
Definition: vout_subpictures.c:80
vout_SetDisplayViewpoint
void vout_SetDisplayViewpoint(vout_display_t *, const vlc_viewpoint_t *)
Definition: display.c:645
spu_invscale_w
static int spu_invscale_w(int v, const spu_scale_t s)
Definition: vout_subpictures.c:393
vout_IsDisplayFiltered
bool vout_IsDisplayFiltered(vout_display_t *)
Definition: display.c:394
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
video_format_Init
static void video_format_Init(video_format_t *p_src, vlc_fourcc_t i_chroma)
Initialize a video_format_t structure with chroma 'i_chroma'.
Definition: vlc_es.h:404
subpicture_region_t::p_picture
picture_t * p_picture
picture comprising this region
Definition: vlc_subpicture.h:62
vlc_vector_destroy
#define vlc_vector_destroy(pv)
Destroy a vector.
Definition: vlc_vector.h:93
SubSourceAddProxyCallbacks
static int SubSourceAddProxyCallbacks(filter_t *filter, void *opaque)
Definition: vout_subpictures.c:1404
entry
Definition: fourcc_gen.c:51
VOUT_SPU_CHANNEL_OSD_COUNT
#define VOUT_SPU_CHANNEL_OSD_COUNT
Definition: vlc_vout.h:131
vlc_cond_t
Condition variable.
Definition: vlc_threads.h:349
vlc_vout_order
vlc_vout_order
vout or spu_channel order
Definition: vlc_vout.h:70
VoutViewpointMoved
static void VoutViewpointMoved(void *sys, const vlc_viewpoint_t *vp)
Definition: vout_wrapper.c:46
VLC_CODEC_YUVP
#define VLC_CODEC_YUVP
Definition: vlc_fourcc.h:267
video_format_IsSimilar
bool video_format_IsSimilar(const video_format_t *f1, const video_format_t *f2)
This function will check if the first video format is similar to the second one.
Definition: es_format.c:338
spu_render_entry_t::stop
vlc_tick_t stop
Definition: vout_subpictures.c:86
TRANSFER_FUNC_UNDEF
@ TRANSFER_FUNC_UNDEF
Definition: vlc_es.h:291
vout_display_owner_t::viewpoint_moved
void(* viewpoint_moved)(void *sys, const vlc_viewpoint_t *vp)
Definition: vlc_vout_display.h:207
SpuAreaFitInside
static void SpuAreaFitInside(spu_area_t *area, const spu_area_t *boundary)
Definition: vout_subpictures.c:502
subpicture_t::i_stop
vlc_tick_t i_stop
end of display date
Definition: vlc_subpicture.h:185
vout_ConvertForDisplay
picture_t * vout_ConvertForDisplay(vout_display_t *, picture_t *)
Definition: display.c:401
spu_GetChannel
static struct spu_channel * spu_GetChannel(spu_t *spu, size_t channel_id)
Definition: vout_subpictures.c:185
video_format_t::i_height
unsigned int i_height
picture height
Definition: vlc_es.h:356
vout_display_Delete
void vout_display_Delete(vout_display_t *vd)
Destroys a video output display.
Definition: display.c:727
spu_scale_w
static int spu_scale_w(int v, const spu_scale_t s)
Definition: vout_subpictures.c:385
vlc_spu_highlight_t::y_start
int y_start
Definition: vlc_subpicture.h:89
SCALE_UNIT
#define SCALE_UNIT
A few scale functions helpers.
Definition: vout_subpictures.c:361
vout_display_t::fmt
const video_format_t * fmt
Picture format.
Definition: vlc_vout_display.h:350
vout_thread_private_t::display_pool
picture_pool_t * display_pool
Definition: vout_private.h:43
spu_private_t::fmtsrc
video_format_t fmtsrc
Definition: vout_subpictures.c:126
COLOR_PRIMARIES_SRGB
#define COLOR_PRIMARIES_SRGB
Definition: vlc_es.h:276
filter_owner_t::sub
const struct filter_subpicture_callbacks * sub
Definition: vlc_filter.h:71
var_Set
int() var_Set(vlc_object_t *p_this, const char *psz_name, vlc_value_t val)
Sets a variable value.
Definition: variables.c:721
vlc_spu_highlight_t::palette
video_palette_t palette
Definition: vlc_subpicture.h:91
vlc_filter_operations::render
int(* render)(filter_t *, subpicture_region_t *, subpicture_region_t *, const vlc_fourcc_t *)
Render text (text renderer)
Definition: vlc_filter.h:105
spu_SetClockRate
void spu_SetClockRate(spu_t *spu, size_t channel_id, float rate)
Definition: vout_subpictures.c:1773
filter_chain_SubFilter
subpicture_t * filter_chain_SubFilter(filter_chain_t *p_chain, subpicture_t *p_subpic)
Apply filter chain to subpictures.
Definition: filter_chain.c:488
picture_pool_NewFromFormat
picture_pool_t * picture_pool_NewFromFormat(const video_format_t *fmt, unsigned count)
Allocates pictures from the heap and creates a picture pool with them.
Definition: picture_pool.c:128
subpicture_region_t::i_alpha
int i_alpha
transparency
Definition: vlc_subpicture.h:67
vlc_object_delete
#define vlc_object_delete(obj)
Definition: vlc_objects.h:136
spu_channel_vector::size
size_t size
Definition: vout_subpictures.c:76
var_SetAddress
static int var_SetAddress(vlc_object_t *p_obj, const char *psz_name, void *ptr)
Set the value of a pointer variable.
Definition: vlc_variables.h:360
spu_PrerenderText
static void spu_PrerenderText(spu_t *spu, subpicture_t *p_subpic, video_format_t *fmtsrc, video_format_t *fmtdst, vlc_fourcc_t *chroma_list)
Definition: vout_subpictures.c:1488
spu_invscale_h
static int spu_invscale_h(int v, const spu_scale_t s)
Definition: vout_subpictures.c:397
picture_Hold
static picture_t * picture_Hold(picture_t *picture)
Increments the picture reference count.
Definition: vlc_picture.h:355
spu_scale_t::w
int w
Definition: vout_subpictures.c:363
VLC_OBJECT
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition: vlc_objects.h:70
spu_channel::delay
vlc_tick_t delay
Definition: vout_subpictures.c:72
filter_chain_Clear
void filter_chain_Clear(filter_chain_t *p_chain)
Remove all existing filters.
Definition: filter_chain.c:165
subpicture_region_t::fmt
video_format_t fmt
format of the picture
Definition: vlc_subpicture.h:61
video_format_t::i_chroma
vlc_fourcc_t i_chroma
picture chroma
Definition: vlc_es.h:353
picture_HasChainedPics
static bool picture_HasChainedPics(const picture_t *pic)
Check whether a picture has other pictures linked.
Definition: vlc_picture.h:168
spu_PrerenderThread
static void * spu_PrerenderThread(void *priv)
Definition: vout_subpictures.c:1524
RestartSubSourceCallback
static int RestartSubSourceCallback(vlc_object_t *obj, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data)
Definition: vout_subpictures.c:1396
vout_thread_t
Video output thread descriptor.
Definition: vlc_vout.h:55
spu_Create
spu_t * spu_Create(vlc_object_t *object, vout_thread_t *vout)
Creates the subpicture unit.
Definition: vout_subpictures.c:1643
spu_private_t::text
filter_t * text
text renderer module
Definition: vout_subpictures.c:87
input_thread_t
Main structure representing an input thread.
Definition: input_internal.h:48
vlc_cond_init
void vlc_cond_init(vlc_cond_t *cond)
Initializes a condition variable.
Definition: threads.c:234
spu_private_t::chroma_list
vlc_fourcc_t chroma_list[8+1]
Definition: vout_subpictures.c:128
spu_private_t::lock
vlc_mutex_t lock
Definition: vout_subpictures.c:81
vout_display_t
Definition: vlc_vout_display.h:316
SpuRenderSubpictures
static subpicture_t * SpuRenderSubpictures(spu_t *spu, size_t i_subpicture, const spu_render_entry_t *p_entries, const vlc_fourcc_t *chroma_list, const video_format_t *fmt_dst, const video_format_t *fmt_src, vlc_tick_t system_now, vlc_tick_t render_subtitle_date, bool external_scale)
This function renders all sub picture units in the list.
Definition: vout_subpictures.c:1141
vlc_alloc
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
vout_internal.h
subpicture_region_private_Delete
void subpicture_region_private_Delete(subpicture_region_private_t *p_private)
Definition: subpicture.c:197
module_unneed
#define module_unneed(a, b)
Definition: vlc_modules.h:126
SUBPICTURE_ALIGN_TOP
#define SUBPICTURE_ALIGN_TOP
Definition: vlc_subpicture.h:97
vlc_join
void vlc_join(vlc_thread_t handle, void **result)
Waits for a thread to complete (if needed), then destroys it.
Definition: thread.c:151
FilterRelease
static void FilterRelease(filter_t *filter)
Definition: vout_subpictures.c:225
spu_private_t::force_crop
bool force_crop
force cropping of subpicture
Definition: vout_subpictures.c:91
vlc_value_t
VLC value structure.
Definition: vlc_common.h:457
spu_get_attachments
static int spu_get_attachments(filter_t *filter, input_attachment_t ***attachment_ptr, int *attachment_count)
Definition: vout_subpictures.c:235
filter_chain_NewSPU
#define filter_chain_NewSPU(a, b)
Definition: vlc_filter.h:479
subpicture_region_private_New
subpicture_region_private_t * subpicture_region_private_New(video_format_t *p_fmt)
Definition: subpicture.c:180
spu_private_t::secondary_margin
int secondary_margin
Move the secondary subtites vertically.
Definition: vout_subpictures.c:105
spu_area_t::height
int height
Definition: vout_subpictures.c:409
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
vout_ControlChangeSubSources
void vout_ControlChangeSubSources(vout_thread_t *vout, const char *filters)
Definition: video_output.c:693
subpicture_region_t::i_max_height
int i_max_height
horizontal rendering/cropping target/limit
Definition: vlc_subpicture.h:76
vout_OpenWrapper
vout_display_t * vout_OpenWrapper(vout_thread_t *vout, vout_thread_private_t *sys, const char *splitter_name, const vout_display_cfg_t *cfg, video_format_t *fmt, vlc_video_context *vctx)
Definition: vout_wrapper.c:58
subpicture_region_private_t
Definition: subpicture.h:23
spu_private_t::fmtdst
video_format_t fmtdst
Definition: vout_subpictures.c:127
var
const char var[sizeof("video")]
Definition: player.c:1732
sub_new_buffer
static subpicture_t * sub_new_buffer(filter_t *filter)
Definition: vout_subpictures.c:1333
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
VLC_CODEC_ARGB
#define VLC_CODEC_ARGB
Definition: vlc_fourcc.h:353
subpicture_t::i_order
int64_t i_order
Definition: vlc_subpicture.h:176
subpicture_Delete
void subpicture_Delete(subpicture_t *p_subpic)
This function delete a subpicture created by subpicture_New.
Definition: subpicture.c:82
SpuRenderCmp
static int SpuRenderCmp(const void *s0, const void *s1)
This function compares 2 subpictures using the following properties (ordered by priority)
Definition: vout_subpictures.c:574
spu_PrerenderCancel
static void spu_PrerenderCancel(spu_private_t *, const subpicture_t *)
Definition: vout_subpictures.c:1454
spu_private_t::source_chain
filter_chain_t * source_chain
Definition: vout_subpictures.c:112
filter_chain_Delete
void filter_chain_Delete(filter_chain_t *p_chain)
Filter chain destruction.
Definition: filter_chain.c:174
module_need
#define module_need(a, b, c, d)
Definition: vlc_modules.h:111
VLC_CODEC_RGBA
#define VLC_CODEC_RGBA
Definition: vlc_fourcc.h:351
vlc_fourcc_t
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
vout_SetDisplayCrop
void vout_SetDisplayCrop(vout_display_t *, const struct vout_crop *)
vlc_modules.h
filter_t::owner
filter_owner_t owner
Private structure for the owner of the filter.
Definition: vlc_filter.h:241
vlc_spu_highlight_t::y_end
int y_end
Definition: vlc_subpicture.h:90
picture_pool_Reserve
picture_pool_t * picture_pool_Reserve(picture_pool_t *master, unsigned count)
Reserves pictures from a pool and creates a new pool with those.
Definition: picture_pool.c:152
subpicture_region_NewInternal
subpicture_region_t * subpicture_region_NewInternal(const video_format_t *p_fmt)
Definition: subpicture.c:205
spu_PrerenderSync
static void spu_PrerenderSync(spu_private_t *, const subpicture_t *)
Definition: vout_subpictures.c:1475
spu_private_t::x
int x
Definition: vout_subpictures.c:93