Commit 337ac422 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Video filters: move to text_segment

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 3f98a0ff
......@@ -364,7 +364,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
if( p_overlay->format.i_chroma == VLC_CODEC_TEXT )
{
p_region->psz_text = strdup( p_overlay->data.p_text );
p_region->p_text = text_segment_New( p_overlay->data.p_text );
p_region->p_style = text_style_Duplicate( p_overlay->p_fontstyle );
}
else
......
......@@ -310,7 +310,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
p_sys->last_time = date;
p_spu->p_region->psz_text = strdup( msg );
p_spu->p_region->p_text = text_segment_New( msg );
p_spu->i_start = date;
p_spu->i_stop = p_sys->i_timeout == 0 ? 0 : date + p_sys->i_timeout * 1000;
p_spu->b_ephemer = true;
......
......@@ -479,7 +479,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
free( a2 );
}
p_spu->p_region->psz_text = strdup(p_sys->psz_marquee);
p_spu->p_region->p_text = text_segment_New(p_sys->psz_marquee);
if( p_sys->p_style->i_font_size > 0 )
p_spu->p_region->fmt.i_visible_height = p_sys->p_style->i_font_size;
p_spu->i_start = date;
......
......@@ -1053,7 +1053,7 @@ static void SubpicLocalUpdate( subpicture_t* p_subpic, mtime_t i_ts )
if( p_entry->b_check_empty && p_subpic->p_region )
{
if( SubsdelayIsTextEmpty( p_subpic->p_region->psz_html ) ||
SubsdelayIsTextEmpty( p_subpic->p_region->psz_text ) )
SubsdelayIsTextEmpty( p_subpic->p_region->p_text->psz_text ) )
{
/* remove empty subtitle */
......@@ -1117,7 +1117,7 @@ static void SubpicLocalUpdate( subpicture_t* p_subpic, mtime_t i_ts )
static bool SubpicIsEmpty( subpicture_t* p_subpic )
{
return ( p_subpic->p_region && ( SubsdelayIsTextEmpty( p_subpic->p_region->psz_html ) ||
SubsdelayIsTextEmpty( p_subpic->p_region->psz_text ) ) );
SubsdelayIsTextEmpty( p_subpic->p_region->p_text->psz_text ) ) );
}
/*****************************************************************************
......@@ -1180,12 +1180,12 @@ static int64_t SubsdelayEstimateDelay( filter_t *p_filter, subsdelay_heap_entry_
if( i_mode == SUBSDELAY_MODE_RELATIVE_SOURCE_CONTENT )
{
if( p_entry->p_subpic && p_entry->p_subpic->p_region && ( p_entry->p_subpic->p_region->psz_text
if( p_entry->p_subpic && p_entry->p_subpic->p_region && ( p_entry->p_subpic->p_region->p_text->psz_text
|| p_entry->p_subpic->p_region->psz_html ) )
{
if( p_entry->p_subpic->p_region->psz_text )
if( p_entry->p_subpic->p_region->p_text->psz_text )
{
i_rank = SubsdelayGetTextRank( p_entry->p_subpic->p_region->psz_text );
i_rank = SubsdelayGetTextRank( p_entry->p_subpic->p_region->p_text->psz_text );
}
else
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment