VLC
3.0.21
|
Data Structures | |
struct | spu_heap_entry_t |
struct | spu_heap_t |
struct | spu_private_t |
struct | spu_scale_t |
struct | spu_area_t |
A few area functions helpers. More... | |
Macros | |
#define | VOUT_MAX_SUBPICTURES (__MAX(VOUT_MAX_PICTURES, SPU_MAX_PREPARE_TIME/5000)) |
#define | SCALE_UNIT (10000) |
A few scale functions helpers. More... | |
Functions | |
static void | SpuHeapInit (spu_heap_t *heap) |
static int | SpuHeapPush (spu_heap_t *heap, subpicture_t *subpic) |
static void | SpuHeapDeleteAt (spu_heap_t *heap, int index) |
static int | SpuHeapDeleteSubpicture (spu_heap_t *heap, subpicture_t *subpic) |
static void | SpuHeapClean (spu_heap_t *heap) |
static void | FilterRelease (filter_t *filter) |
static picture_t * | spu_new_video_buffer (filter_t *filter) |
static int | spu_get_attachments (filter_t *filter, input_attachment_t ***attachment_ptr, int *attachment_count) |
static filter_t * | SpuRenderCreateAndLoadText (spu_t *spu) |
static filter_t * | SpuRenderCreateAndLoadScale (vlc_object_t *object, vlc_fourcc_t src_chroma, vlc_fourcc_t dst_chroma, bool require_resize) |
static void | SpuRenderText (spu_t *spu, bool *rerender_text, subpicture_region_t *region, const vlc_fourcc_t *chroma_list, vlc_tick_t elapsed_time) |
static spu_scale_t | spu_scale_create (int w, int h) |
static spu_scale_t | spu_scale_unit (void) |
static spu_scale_t | spu_scale_createq (int64_t wn, int64_t wd, int64_t hn, int64_t hd) |
static int | spu_scale_w (int v, const spu_scale_t s) |
static int | spu_scale_h (int v, const spu_scale_t s) |
static int | spu_invscale_w (int v, const spu_scale_t s) |
static int | spu_invscale_h (int v, const spu_scale_t s) |
static spu_area_t | spu_area_create (int x, int y, int w, int h, spu_scale_t s) |
static spu_area_t | spu_area_scaled (spu_area_t a) |
static spu_area_t | spu_area_unscaled (spu_area_t a, spu_scale_t s) |
static bool | spu_area_overlap (spu_area_t a, spu_area_t b) |
static void | SpuAreaFixOverlap (spu_area_t *dst, const spu_area_t *sub_array, int sub_count, int align) |
Avoid area overlapping. More... | |
static void | SpuAreaFitInside (spu_area_t *area, const spu_area_t *boundary) |
static void | SpuRegionPlace (int *x, int *y, const subpicture_t *subpic, const subpicture_region_t *region) |
Place a region. More... | |
static int | IntegerCmp (int64_t i0, int64_t i1) |
This function compares two 64 bits integers. More... | |
static int | SubpictureCmp (const void *s0, const void *s1) |
This function compares 2 subpictures using the following properties (ordered by priority) More... | |
static void | SpuSelectSubpictures (spu_t *spu, unsigned int *subpicture_count, subpicture_t **subpicture_array, vlc_tick_t render_subtitle_date, vlc_tick_t render_osd_date, bool ignore_osd) |
static void | SpuRenderRegion (spu_t *spu, subpicture_region_t **dst_ptr, spu_area_t *dst_area, subpicture_t *subpic, subpicture_region_t *region, const spu_scale_t scale_size, const vlc_fourcc_t *chroma_list, const video_format_t *fmt, const spu_area_t *subtitle_area, int subtitle_area_count, vlc_tick_t render_date) |
It will transform the provided region into another region suitable for rendering. More... | |
static subpicture_t * | SpuRenderSubpictures (spu_t *spu, unsigned int i_subpicture, subpicture_t **pp_subpicture, const vlc_fourcc_t *chroma_list, const video_format_t *fmt_dst, const video_format_t *fmt_src, vlc_tick_t render_subtitle_date, vlc_tick_t render_osd_date) |
This function renders all sub picture units in the list. More... | |
static void | UpdateSPU (spu_t *spu, vlc_object_t *object) |
static int | CropCallback (vlc_object_t *object, char const *var, vlc_value_t oldval, vlc_value_t newval, void *data) |
static subpicture_t * | sub_new_buffer (filter_t *filter) |
static int | SubSourceInit (filter_t *filter, void *data) |
static int | SubSourceClean (filter_t *filter, void *data) |
static int | RestartSubFilterCallback (vlc_object_t *obj, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data) |
static int | SubFilterAddProxyCallbacks (filter_t *filter, void *opaque) |
static int | SubFilterDelProxyCallbacks (filter_t *filter, void *opaque) |
static int | RestartSubSourceCallback (vlc_object_t *obj, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data) |
static int | SubSourceAddProxyCallbacks (filter_t *filter, void *opaque) |
static int | SubSourceDelProxyCallbacks (filter_t *filter, void *opaque) |
spu_t * | spu_Create (vlc_object_t *object, vout_thread_t *vout) |
Creates the subpicture unit. More... | |
void | spu_Destroy (spu_t *spu) |
Destroy the subpicture unit. More... | |
void | spu_Attach (spu_t *spu, vlc_object_t *input, bool attach) |
Attach/Detach the SPU from any input. More... | |
int | spu_ProcessMouse (spu_t *spu, const vlc_mouse_t *mouse, const video_format_t *fmt) |
Inform the SPU filters of mouse event. More... | |
void | spu_PutSubpicture (spu_t *spu, subpicture_t *subpic) |
Display a subpicture. More... | |
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 render_subtitle_date, vlc_tick_t render_osd_date, bool ignore_osd) |
This function will return an unique subpicture containing the OSD and subtitles visibles at the requested date. More... | |
void | spu_OffsetSubtitleDate (spu_t *spu, vlc_tick_t duration) |
This function will apply an offset on subtitle subpicture. More... | |
int | spu_RegisterChannel (spu_t *spu) |
It registers a new SPU channel. More... | |
void | spu_ClearChannel (spu_t *spu, int channel) |
It clears all subpictures associated to a SPU channel. More... | |
void | spu_ChangeSources (spu_t *spu, const char *filters) |
It changes the sub sources list. More... | |
void | spu_ChangeFilters (spu_t *spu, const char *filters) |
It changes the sub filters list. More... | |
void | spu_ChangeMargin (spu_t *spu, int margin) |
#define SCALE_UNIT (10000) |
A few scale functions helpers.
#define VOUT_MAX_SUBPICTURES (__MAX(VOUT_MAX_PICTURES, SPU_MAX_PREPARE_TIME/5000)) |
|
static |
< No error
|
static |
|
static |
This function compares two 64 bits integers.
It can be used by qsort.
Referenced by SubpictureCmp().
|
static |
< No error
|
static |
< No error
|
static |
Referenced by SpuRenderRegion().
|
static |
Referenced by SpuAreaFixOverlap().
|
static |
References spu_area_t::x.
Referenced by SpuAreaFixOverlap().
|
static |
void spu_Attach | ( | spu_t * | spu, |
vlc_object_t * | input, | ||
bool | 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 |
void spu_ChangeMargin | ( | spu_t * | spu, |
int | margin | ||
) |
References spu_private_t::filter_chain_current, spu_private_t::filter_chain_update, and strdup().
|
static |
< Unspecified error
|
static |
References SCALE_UNIT, and spu_scale_t::w.
Referenced by SpuRenderRegion().
|
static |
References spu_scale_t::h, and SCALE_UNIT.
void spu_OffsetSubtitleDate | ( | spu_t * | spu, |
vlc_tick_t | duration | ||
) |
This function will apply an offset on subtitle subpicture.
int spu_ProcessMouse | ( | spu_t * | spu, |
const vlc_mouse_t * | mouse, | ||
const video_format_t * | fmt | ||
) |
|
static |
Referenced by spu_scale_createq(), and spu_scale_w().
|
static |
References SCALE_UNIT, and spu_scale_create().
|
static |
References SCALE_UNIT, and spu_scale_t::w.
Referenced by SpuRenderRegion().
|
static |
Referenced by SpuRenderRegion().
|
static |
References SCALE_UNIT, and spu_scale_create().
Referenced by SpuRenderRegion().
|
static |
Referenced by SpuRenderRegion().
|
static |
Avoid area overlapping.
References spu_area_t::height, spu_area_overlap(), spu_area_scaled(), SUBPICTURE_ALIGN_BOTTOM, SUBPICTURE_ALIGN_TOP, and spu_area_t::y.
Referenced by SpuRenderRegion().
|
static |
|
static |
Referenced by SpuSelectSubpictures().
|
static |
|
static |
References spu_heap_t::entry, spu_heap_entry_t::subpicture, and VOUT_MAX_SUBPICTURES.
Referenced by spu_Create().
|
static |
< No error
< Unspecified error
|
static |
Place a region.
References subpicture_t::b_absolute, subpicture_region_t::fmt, subpicture_region_t::i_align, subpicture_t::i_original_picture_height, subpicture_t::i_original_picture_width, video_format_t::i_visible_height, video_format_t::i_visible_width, subpicture_region_t::i_x, subpicture_region_t::i_y, SUBPICTURE_ALIGN_BOTTOM, SUBPICTURE_ALIGN_LEFT, SUBPICTURE_ALIGN_RIGHT, and SUBPICTURE_ALIGN_TOP.
Referenced by SpuRenderRegion().
|
static |
Referenced by spu_Create().
Referenced by spu_Create().
|
static |
It will transform the provided region into another region suitable for rendering.
References subpicture_t::b_absolute, subpicture_t::b_fade, subpicture_t::b_subtitle, COLOR_PRIMARIES_SRGB, COLOR_PRIMARIES_UNDEF, COLOR_SPACE_SRGB, COLOR_SPACE_UNDEF, spu_private_t::crop, subpicture_region_private_t::fmt, subpicture_region_t::fmt, filter_t::fmt_in, filter_t::fmt_out, spu_private_t::force_crop, spu_private_t::force_palette, picture_t::format, spu_scale_t::h, spu_private_t::height, subpicture_region_t::i_align, subpicture_region_t::i_alpha, subpicture_t::i_alpha, video_format_t::i_chroma, es_format_t::i_codec, video_palette_t::i_entries, video_format_t::i_height, subpicture_region_t::i_max_height, subpicture_region_t::i_max_width, subpicture_t::i_start, subpicture_t::i_stop, video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_width, subpicture_region_t::i_x, video_format_t::i_x_offset, subpicture_region_t::i_y, video_format_t::i_y_offset, spu_private_t::margin, msg_Err, msg_Warn, spu_t::p, filter_t::p_module, video_format_t::p_palette, subpicture_region_private_t::p_picture, subpicture_region_t::p_picture, subpicture_region_t::p_private, video_palette_t::palette, spu_private_t::palette, filter_t::pf_video_filter, picture_Hold(), picture_Release(), video_format_t::primaries, spu_private_t::scale, spu_area_t::scale, SCALE_UNIT, spu_private_t::scale_yuvp, video_format_t::space, spu_area_create(), spu_invscale_h(), spu_scale_h(), spu_scale_unit(), spu_scale_w(), SpuAreaFitInside(), SpuAreaFixOverlap(), SpuRegionPlace(), SpuRenderText(), subpicture_region_New(), subpicture_region_private_Delete(), subpicture_region_private_New(), video_format_t::transfer, TRANSFER_FUNC_SRGB, TRANSFER_FUNC_UNDEF, es_format_t::video, video_format_AdjustColorSpace(), VLC_CODEC_TEXT, VLC_CODEC_YUVP, spu_scale_t::w, spu_private_t::width, spu_private_t::x, spu_area_t::x, spu_private_t::y, and spu_area_t::y.
|
static |
This function renders all sub picture units in the list.
|
static |
Referenced by SpuRenderRegion().
|
static |
References subpicture_t::b_ephemer, subpicture_t::b_subtitle, spu_heap_t::entry, spu_private_t::heap, subpicture_t::i_channel, subpicture_t::i_order, subpicture_t::i_start, subpicture_t::i_stop, spu_private_t::last_sort_date, spu_t::p, SpuHeapDeleteAt(), SpuHeapDeleteSubpicture(), VOUT_MAX_SUBPICTURES, and VOUT_SPU_CHANNEL_INVALID.
|
static |
Referenced by SubSourceClean().
|
static |
< No error
References VLC_UNUSED, and vout_ControlChangeSubFilters().
|
static |
< No error
|
static |
This function compares 2 subpictures using the following properties (ordered by priority)
It can be used by qsort.
XXX spu_RenderSubpictures depends heavily on this order.
References subpicture_t::b_absolute, subpicture_t::i_channel, subpicture_t::i_order, subpicture_t::i_start, and IntegerCmp().
|
static |
< No error
|
static |
< No error
References filter_t::owner, spu_RegisterChannel(), filter_owner_t::sub, sub_new_buffer(), filter_owner_t::sys, and VLC_SUCCESS.
|
static |
< No error
|
static |
< No error
References subpicture_t::i_channel, filter_t::owner, subpicture_New(), and filter_owner_t::sys.
|
static |
< No error
References vlc_value_t::b_bool, spu_private_t::crop, spu_private_t::force_crop, spu_private_t::force_palette, spu_private_t::height, spu_private_t::lock, msg_Dbg, spu_t::p, vlc_value_t::p_address, spu_private_t::palette, var_Get, var_GetInteger, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, spu_private_t::width, spu_private_t::x, and spu_private_t::y.