Commit 9b88e0d6 authored by François Cartegnie's avatar François Cartegnie 🤞
Browse files

demux: subtitle: refactor without refs to demux

parent 49d373ff
......@@ -138,27 +138,13 @@ typedef struct
char *psz_text;
} subtitle_t;
struct demux_sys_t
typedef struct
{
int i_type;
text_t txt;
es_out_id_t *es;
int64_t i_next_demux_date;
int64_t i_microsecperframe;
char *psz_header;
struct
{
subtitle_t *p_array;
size_t i_count;
size_t i_current;
} subtitles;
int64_t i_length;
char *psz_header; /* SSA */
/* */
struct
{
bool b_inited;
......@@ -167,6 +153,7 @@ struct demux_sys_t
int i_time_resolution;
int i_time_shift;
} jss;
struct
{
bool b_inited;
......@@ -174,32 +161,53 @@ struct demux_sys_t
float f_total;
float f_factor;
} mpsub;
} subs_properties_t;
struct demux_sys_t
{
text_t txt;
es_out_id_t *es;
int64_t i_next_demux_date;
struct
{
subtitle_t *p_array;
size_t i_count;
size_t i_current;
} subtitles;
int64_t i_length;
/* */
subs_properties_t props;
};
static int ParseMicroDvd ( demux_t *, subtitle_t *, int );
static int ParseSubRip ( demux_t *, subtitle_t *, int );
static int ParseSubViewer ( demux_t *, subtitle_t *, int );
static int ParseSSA ( demux_t *, subtitle_t *, int );
static int ParseVplayer ( demux_t *, subtitle_t *, int );
static int ParseSami ( demux_t *, subtitle_t *, int );
static int ParseDVDSubtitle( demux_t *, subtitle_t *, int );
static int ParseMPL2 ( demux_t *, subtitle_t *, int );
static int ParseAQT ( demux_t *, subtitle_t *, int );
static int ParsePJS ( demux_t *, subtitle_t *, int );
static int ParseMPSub ( demux_t *, subtitle_t *, int );
static int ParseJSS ( demux_t *, subtitle_t *, int );
static int ParsePSB ( demux_t *, subtitle_t *, int );
static int ParseRealText ( demux_t *, subtitle_t *, int );
static int ParseDKS ( demux_t *, subtitle_t *, int );
static int ParseSubViewer1 ( demux_t *, subtitle_t *, int );
static int ParseCommonVTTSBV( demux_t *, subtitle_t *, int );
static int ParseMicroDvd ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseSubRip ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseSubViewer ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseSSA ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseVplayer ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseSami ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseDVDSubtitle( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseMPL2 ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseAQT ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParsePJS ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseMPSub ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseJSS ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParsePSB ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseRealText ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseDKS ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseSubViewer1 ( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static int ParseCommonVTTSBV( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t *, size_t );
static const struct
{
const char *psz_type_name;
int i_type;
const char *psz_name;
int (*pf_read)( demux_t *, subtitle_t*, int );
int (*pf_read)( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t*, size_t );
} sub_read_subtitle_function [] =
{
{ "microdvd", SUB_TYPE_MICRODVD, "MicroDVD", ParseMicroDvd },
......@@ -244,7 +252,7 @@ static int Open ( vlc_object_t *p_this )
es_format_t fmt;
float f_fps;
char *psz_type;
int (*pf_read)( demux_t *, subtitle_t*, int );
int (*pf_read)( vlc_object_t *, subs_properties_t *, text_t *, subtitle_t*, size_t );
int i;
if( !p_demux->obj.force )
......@@ -259,19 +267,19 @@ static int Open ( vlc_object_t *p_this )
if( p_sys == NULL )
return VLC_ENOMEM;
p_sys->psz_header = NULL;
p_sys->subtitles.i_current= 0;
p_sys->subtitles.i_count = 0;
p_sys->subtitles.p_array = NULL;
p_sys->i_microsecperframe = 40000;
p_sys->jss.b_inited = false;
p_sys->mpsub.b_inited = false;
p_sys->props.psz_header = NULL;
p_sys->props.i_microsecperframe = 40000;
p_sys->props.jss.b_inited = false;
p_sys->props.mpsub.b_inited = false;
/* Get the FPS */
f_fps = var_CreateGetFloat( p_demux, "sub-original-fps" ); /* FIXME */
if( f_fps >= 1.f )
p_sys->i_microsecperframe = llroundf( 1000000.f / f_fps );
p_sys->props.i_microsecperframe = llroundf( 1000000.f / f_fps );
msg_Dbg( p_demux, "Movie fps: %f", (double) f_fps );
......@@ -279,12 +287,12 @@ static int Open ( vlc_object_t *p_this )
f_fps = var_CreateGetFloat( p_demux, "sub-fps" );
if( f_fps >= 1.f )
{
p_sys->i_microsecperframe = llroundf( 1000000.f / f_fps );
p_sys->props.i_microsecperframe = llroundf( 1000000.f / f_fps );
msg_Dbg( p_demux, "Override subtitle fps %f", (double) f_fps );
}
/* Get or probe the type */
p_sys->i_type = SUB_TYPE_UNKNOWN;
p_sys->props.i_type = SUB_TYPE_UNKNOWN;
psz_type = var_CreateGetString( p_demux, "sub-type" );
if( psz_type && *psz_type )
{
......@@ -298,7 +306,7 @@ static int Open ( vlc_object_t *p_this )
if( !strcmp( sub_read_subtitle_function[i].psz_type_name,
psz_type ) )
{
p_sys->i_type = sub_read_subtitle_function[i].i_type;
p_sys->props.i_type = sub_read_subtitle_function[i].i_type;
break;
}
}
......@@ -322,7 +330,7 @@ static int Open ( vlc_object_t *p_this )
}
/* Probe if unknown type */
if( p_sys->i_type == SUB_TYPE_UNKNOWN )
if( p_sys->props.i_type == SUB_TYPE_UNKNOWN )
{
int i_try;
char *s = NULL;
......@@ -338,13 +346,13 @@ static int Open ( vlc_object_t *p_this )
if( strcasestr( s, "<SAMI>" ) )
{
p_sys->i_type = SUB_TYPE_SAMI;
p_sys->props.i_type = SUB_TYPE_SAMI;
break;
}
else if( sscanf( s, "{%d}{%d}", &i_dummy, &i_dummy ) == 2 ||
sscanf( s, "{%d}{}", &i_dummy ) == 1)
{
p_sys->i_type = SUB_TYPE_MICRODVD;
p_sys->props.i_type = SUB_TYPE_MICRODVD;
break;
}
else if( sscanf( s, "%d:%d:%d,%d --> %d:%d:%d,%d",
......@@ -369,37 +377,37 @@ static int Open ( vlc_object_t *p_this )
&i_dummy,&i_dummy,&i_dummy,
&i_dummy,&i_dummy,&i_dummy ) == 6 )
{
p_sys->i_type = SUB_TYPE_SUBRIP;
p_sys->props.i_type = SUB_TYPE_SUBRIP;
break;
}
else if( !strncasecmp( s, "!: This is a Sub Station Alpha v1", 33 ) )
{
p_sys->i_type = SUB_TYPE_SSA1;
p_sys->props.i_type = SUB_TYPE_SSA1;
break;
}
else if( !strncasecmp( s, "ScriptType: v4.00+", 18 ) )
{
p_sys->i_type = SUB_TYPE_ASS;
p_sys->props.i_type = SUB_TYPE_ASS;
break;
}
else if( !strncasecmp( s, "ScriptType: v4.00", 17 ) )
{
p_sys->i_type = SUB_TYPE_SSA2_4;
p_sys->props.i_type = SUB_TYPE_SSA2_4;
break;
}
else if( !strncasecmp( s, "Dialogue: Marked", 16 ) )
{
p_sys->i_type = SUB_TYPE_SSA2_4;
p_sys->props.i_type = SUB_TYPE_SSA2_4;
break;
}
else if( !strncasecmp( s, "Dialogue:", 9 ) )
{
p_sys->i_type = SUB_TYPE_ASS;
p_sys->props.i_type = SUB_TYPE_ASS;
break;
}
else if( strcasestr( s, "[INFORMATION]" ) )
{
p_sys->i_type = SUB_TYPE_SUBVIEWER; /* I hope this will work */
p_sys->props.i_type = SUB_TYPE_SUBVIEWER; /* I hope this will work */
break;
}
else if( sscanf( s, "%d:%d:%d.%d %d:%d:%d",
......@@ -407,76 +415,76 @@ static int Open ( vlc_object_t *p_this )
&i_dummy, &i_dummy, &i_dummy ) == 7 ||
sscanf( s, "@%d @%d", &i_dummy, &i_dummy) == 2)
{
p_sys->i_type = SUB_TYPE_JACOSUB;
p_sys->props.i_type = SUB_TYPE_JACOSUB;
break;
}
else if( sscanf( s, "%d:%d:%d.%d,%d:%d:%d.%d",
&i_dummy, &i_dummy, &i_dummy, &i_dummy,
&i_dummy, &i_dummy, &i_dummy, &i_dummy ) == 8 )
{
p_sys->i_type = SUB_TYPE_SBV;
p_sys->props.i_type = SUB_TYPE_SBV;
break;
}
else if( sscanf( s, "%d:%d:%d:", &i_dummy, &i_dummy, &i_dummy ) == 3 ||
sscanf( s, "%d:%d:%d ", &i_dummy, &i_dummy, &i_dummy ) == 3 )
{
p_sys->i_type = SUB_TYPE_VPLAYER;
p_sys->props.i_type = SUB_TYPE_VPLAYER;
break;
}
else if( sscanf( s, "{T %d:%d:%d:%d", &i_dummy, &i_dummy,
&i_dummy, &i_dummy ) == 4 )
{
p_sys->i_type = SUB_TYPE_DVDSUBTITLE;
p_sys->props.i_type = SUB_TYPE_DVDSUBTITLE;
break;
}
else if( sscanf( s, "[%d:%d:%d]%c",
&i_dummy, &i_dummy, &i_dummy, &p_dummy ) == 4 )
{
p_sys->i_type = SUB_TYPE_DKS;
p_sys->props.i_type = SUB_TYPE_DKS;
break;
}
else if( strstr( s, "*** START SCRIPT" ) )
{
p_sys->i_type = SUB_TYPE_SUBVIEW1;
p_sys->props.i_type = SUB_TYPE_SUBVIEW1;
break;
}
else if( sscanf( s, "[%d][%d]", &i_dummy, &i_dummy ) == 2 ||
sscanf( s, "[%d][]", &i_dummy ) == 1)
{
p_sys->i_type = SUB_TYPE_MPL2;
p_sys->props.i_type = SUB_TYPE_MPL2;
break;
}
else if( sscanf (s, "FORMAT=%d", &i_dummy) == 1 ||
( sscanf (s, "FORMAT=TIM%c", &p_dummy) == 1
&& p_dummy =='E' ) )
{
p_sys->i_type = SUB_TYPE_MPSUB;
p_sys->props.i_type = SUB_TYPE_MPSUB;
break;
}
else if( sscanf( s, "-->> %d", &i_dummy) == 1 )
{
p_sys->i_type = SUB_TYPE_AQT;
p_sys->props.i_type = SUB_TYPE_AQT;
break;
}
else if( sscanf( s, "%d,%d,", &i_dummy, &i_dummy ) == 2 )
{
p_sys->i_type = SUB_TYPE_PJS;
p_sys->props.i_type = SUB_TYPE_PJS;
break;
}
else if( sscanf( s, "{%d:%d:%d}",
&i_dummy, &i_dummy, &i_dummy ) == 3 )
{
p_sys->i_type = SUB_TYPE_PSB;
p_sys->props.i_type = SUB_TYPE_PSB;
break;
}
else if( strcasestr( s, "<time" ) )
{
p_sys->i_type = SUB_TYPE_RT;
p_sys->props.i_type = SUB_TYPE_RT;
break;
}
else if( !strncasecmp( s, "WEBVTT",6 ) )
{
p_sys->i_type = SUB_TYPE_VTT;
p_sys->props.i_type = SUB_TYPE_VTT;
break;
}
......@@ -488,7 +496,7 @@ static int Open ( vlc_object_t *p_this )
}
/* Quit on unknown subtitles */
if( p_sys->i_type == SUB_TYPE_UNKNOWN )
if( p_sys->props.i_type == SUB_TYPE_UNKNOWN )
{
#ifndef NDEBUG
/* Ensure it will work with non seekable streams */
......@@ -501,7 +509,7 @@ static int Open ( vlc_object_t *p_this )
for( i = 0; ; i++ )
{
if( sub_read_subtitle_function[i].i_type == p_sys->i_type )
if( sub_read_subtitle_function[i].i_type == p_sys->props.i_type )
{
msg_Dbg( p_demux, "detected %s format",
sub_read_subtitle_function[i].psz_name );
......@@ -534,7 +542,8 @@ static int Open ( vlc_object_t *p_this )
p_sys->subtitles.p_array = p_realloc;
}
if( pf_read( p_demux, &p_sys->subtitles.p_array[p_sys->subtitles.i_count],
if( pf_read( VLC_OBJECT(p_demux), &p_sys->props, &p_sys->txt,
&p_sys->subtitles.p_array[p_sys->subtitles.i_count],
p_sys->subtitles.i_count ) )
break;
......@@ -557,9 +566,9 @@ static int Open ( vlc_object_t *p_this )
}
/* *** add subtitle ES *** */
if( p_sys->i_type == SUB_TYPE_SSA1 ||
p_sys->i_type == SUB_TYPE_SSA2_4 ||
p_sys->i_type == SUB_TYPE_ASS )
if( p_sys->props.i_type == SUB_TYPE_SSA1 ||
p_sys->props.i_type == SUB_TYPE_SSA2_4 ||
p_sys->props.i_type == SUB_TYPE_ASS )
{
Fix( p_demux );
es_format_Init( &fmt, SPU_ES, VLC_CODEC_SSA );
......@@ -584,10 +593,10 @@ static int Open ( vlc_object_t *p_this )
fmt.psz_description = psz_description;
else
free( psz_description );
if( p_sys->psz_header != NULL )
if( p_sys->props.psz_header != NULL )
{
fmt.i_extra = strlen( p_sys->psz_header ) + 1;
fmt.p_extra = strdup( p_sys->psz_header );
fmt.i_extra = strlen( p_sys->props.psz_header ) + 1;
fmt.p_extra = strdup( p_sys->props.psz_header );
}
p_sys->es = es_out_Add( p_demux->out, &fmt );
es_format_Clean( &fmt );
......@@ -606,7 +615,7 @@ static void Close( vlc_object_t *p_this )
for( size_t i = 0; i < p_sys->subtitles.i_count; i++ )
free( p_sys->subtitles.p_array[i].psz_text );
free( p_sys->subtitles.p_array );
free( p_sys->psz_header );
free( p_sys->props.psz_header );
free( p_sys );
}
......@@ -856,12 +865,11 @@ static void TextPreviousLine( text_t *txt )
* {n1}{n2}Line1|Line2|Line3....
* where n1 and n2 are the video frame number (n2 can be empty)
*/
static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseMicroDvd( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
size_t i_idx )
{
VLC_UNUSED( i_idx );
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
char *psz_text;
int i_start;
int i_stop;
......@@ -888,8 +896,8 @@ static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle,
/* We found a possible setting of the framerate "{1}{1}23.976" */
/* Check if it's usable, and if the sub-fps is not set */
float f_fps = us_strtof( psz_text, NULL );
if( f_fps > 0.f && var_GetFloat( p_demux, "sub-fps" ) <= 0.f )
p_sys->i_microsecperframe = llroundf(1000000.f / f_fps);
if( f_fps > 0.f && var_GetFloat( p_obj, "sub-fps" ) <= 0.f )
p_props->i_microsecperframe = llroundf(1000000.f / f_fps);
}
free( psz_text );
}
......@@ -902,8 +910,8 @@ static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle,
}
/* */
p_subtitle->i_start = i_start * p_sys->i_microsecperframe;
p_subtitle->i_stop = i_stop >= 0 ? (i_stop * p_sys->i_microsecperframe) : -1;
p_subtitle->i_start = i_start * p_props->i_microsecperframe;
p_subtitle->i_stop = i_stop >= 0 ? (i_stop * p_props->i_microsecperframe) : -1;
p_subtitle->psz_text = psz_text;
return VLC_SUCCESS;
}
......@@ -924,12 +932,13 @@ static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle,
* [empty line]
* We ignore line number for SubRip
*/
static int ParseSubRipSubViewer( demux_t *p_demux, subtitle_t *p_subtitle,
static int ParseSubRipSubViewer( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
int (* pf_parse_timing)(subtitle_t *, const char *),
bool b_replace_br )
{
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);
char *psz_text;
for( ;; )
......@@ -1038,11 +1047,12 @@ static int subtitle_ParseSubRipTiming( subtitle_t *p_subtitle,
}
/* ParseSubRip
*/
static int ParseSubRip( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseSubRip( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
size_t i_idx )
{
VLC_UNUSED( i_idx );
return ParseSubRipSubViewer( p_demux, p_subtitle,
return ParseSubRipSubViewer( p_obj, p_props, txt, p_subtitle,
&subtitle_ParseSubRipTiming,
false );
}
......@@ -1074,23 +1084,24 @@ static int subtitle_ParseSubViewerTiming( subtitle_t *p_subtitle,
/* ParseSubViewer
*/
static int ParseSubViewer( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseSubViewer( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
size_t i_idx )
{
VLC_UNUSED( i_idx );
return ParseSubRipSubViewer( p_demux, p_subtitle,
return ParseSubRipSubViewer( p_obj, p_props, txt, p_subtitle,
&subtitle_ParseSubViewerTiming,
true );
}
/* ParseSSA
*/
static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseSSA( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
size_t i_idx )
{
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
VLC_UNUSED(p_obj);
size_t header_len = 0;
for( ;; )
......@@ -1129,7 +1140,7 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
{
/* The dec expects: ReadOrder, Layer, Style, Name, MarginL, MarginR, MarginV, Effect, Text */
/* (Layer comes from ASS specs ... it's empty for SSA.) */
if( p_sys->i_type == SUB_TYPE_SSA1 )
if( p_props->i_type == SUB_TYPE_SSA1 )
{
/* SSA1 has only 8 commas before the text starts, not 9 */
memmove( &psz_text[1], psz_text, strlen(psz_text)+1 );
......@@ -1137,10 +1148,10 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
}
else
{
int i_layer = ( p_sys->i_type == SUB_TYPE_ASS ) ? atoi( temp ) : 0;
int i_layer = ( p_props->i_type == SUB_TYPE_ASS ) ? atoi( temp ) : 0;
/* ReadOrder, Layer, %s(rest of fields) */
if( asprintf( &psz_temp, "%d,%d,%s", i_idx, i_layer, psz_text ) == -1 )
if( asprintf( &psz_temp, "%zu,%d,%s", i_idx, i_layer, psz_text ) == -1 )
{
free( psz_text );
return VLC_ENOMEM;
......@@ -1164,14 +1175,14 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
free( psz_text );
/* All the other stuff we add to the header field */
if( header_len == 0 && p_sys->psz_header )
header_len = strlen( p_sys->psz_header );
if( header_len == 0 && p_props->psz_header )
header_len = strlen( p_props->psz_header );
size_t s_len = strlen( s );
p_sys->psz_header = realloc_or_free( p_sys->psz_header, header_len + s_len + 2 );
if( !p_sys->psz_header )
p_props->psz_header = realloc_or_free( p_props->psz_header, header_len + s_len + 2 );
if( !p_props->psz_header )
return VLC_ENOMEM;
snprintf( p_sys->psz_header + header_len, s_len + 2, "%s\n", s );
snprintf( p_props->psz_header + header_len, s_len + 2, "%s\n", s );
header_len += s_len + 1;
}
}
......@@ -1182,13 +1193,13 @@ static int ParseSSA( demux_t *p_demux, subtitle_t *p_subtitle,
* or
* h:m:s Line1|Line2|Line3....
*/
static int ParseVplayer( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseVplayer( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle,
size_t i_idx )
{
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);
VLC_UNUSED( i_idx );
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
char *psz_text;
int i;
......@@ -1250,12 +1261,12 @@ static char *ParseSamiSearch( text_t *txt,
}
}
}
static int ParseSami( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
static int ParseSami( vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle, size_t i_idx )
{
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);
VLC_UNUSED( i_idx );
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
char *s;
int64_t i_start;
......@@ -1348,13 +1359,12 @@ static int ParseSami( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
* LANG support would be cool
* CODEPAGE is probably mandatory FIXME
*/
static int ParseDVDSubtitle( demux_t *p_demux, subtitle_t *p_subtitle,
int i_idx )
static int ParseDVDSubtitle(vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle, size_t i_idx )
{
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);
VLC_UNUSED( i_idx );
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
char *psz_text;
for( ;; )
......@@ -1415,12 +1425,12 @@ static int ParseDVDSubtitle( demux_t *p_demux, subtitle_t *p_subtitle,
* [n1][n2]Line1|Line2|Line3...
* where n1 and n2 are the video frame number (n2 can be empty)
*/
static int ParseMPL2( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
static int ParseMPL2(vlc_object_t *p_obj, subs_properties_t *p_props,
text_t *txt, subtitle_t *p_subtitle, size_t i_idx )
{
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);
VLC_UNUSED( i_idx );
demux_sys_t *p_sys = p_demux->p_sys;
text_t *txt = &p_sys->txt;
char *psz_text;
int i;
......@@ -1465,12 +1475,12 @@ static int ParseMPL2( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
return VLC_SUCCESS;
}
static int ParseAQT( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
static int ParseAQT(vlc_object_t *p_obj, subs_properties_t *p_props, text_t *txt, subtitle_t *p_subtitle, size_t i_idx )
{
VLC_UNUSED(p_obj);
VLC_UNUSED(p_props);