Commit 1b214677 authored by Laurent Aimar's avatar Laurent Aimar

Removed VLC internal SSA decoder.

Use libass if you want SSA support.
Signed-off-by: default avatarLaurent Aimar <fenrir@videolan.org>
parent e86b8048
...@@ -33,7 +33,7 @@ SOURCES_kate = kate.c ...@@ -33,7 +33,7 @@ SOURCES_kate = kate.c
SOURCES_schroedinger = schroedinger.c SOURCES_schroedinger = schroedinger.c
SOURCES_libass = libass.c SOURCES_libass = libass.c
SOURCES_aes3 = aes3.c SOURCES_aes3 = aes3.c
SOURCES_subsdec = subsass.c subsdec.c subsdec.h SOURCES_subsdec = subsdec.c subsdec.h
SOURCES_subsusf = subsusf.c subsdec.h SOURCES_subsusf = subsusf.c subsdec.h
SOURCES_t140 = t140.c SOURCES_t140 = t140.c
SOURCES_crystalhd = crystalhd.c SOURCES_crystalhd = crystalhd.c
......
This diff is collapsed.
...@@ -162,31 +162,6 @@ static const char *const ppsz_encoding_names[] = { ...@@ -162,31 +162,6 @@ static const char *const ppsz_encoding_names[] = {
N_("Vietnamese (VISCII)"), N_("Vietnamese (VISCII)"),
N_("Vietnamese (Windows-1258)"), N_("Vietnamese (Windows-1258)"),
}; };
/*
SSA supports charset selection.
The following known charsets are used:
0 = Ansi - Western European
1 = default
2 = symbol
3 = invalid
77 = Mac
128 = Japanese (Shift JIS)
129 = Hangul
130 = Johab
134 = GB2312 Simplified Chinese
136 = Big5 Traditional Chinese
161 = Greek
162 = Turkish
163 = Vietnamese
177 = Hebrew
178 = Arabic
186 = Baltic
204 = Russian (Cyrillic)
222 = Thai
238 = Eastern European
254 = PC 437
*/
static const int pi_justification[] = { 0, 1, 2 }; static const int pi_justification[] = { 0, 1, 2 };
static const char *const ppsz_justification_text[] = { static const char *const ppsz_justification_text[] = {
...@@ -238,7 +213,6 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -238,7 +213,6 @@ static int OpenDecoder( vlc_object_t *p_this )
switch( p_dec->fmt_in.i_codec ) switch( p_dec->fmt_in.i_codec )
{ {
case VLC_CODEC_SUBT: case VLC_CODEC_SUBT:
case VLC_CODEC_SSA:
case VLC_CODEC_ITU_T140: case VLC_CODEC_ITU_T140:
break; break;
default: default:
...@@ -258,7 +232,6 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -258,7 +232,6 @@ static int OpenDecoder( vlc_object_t *p_this )
p_sys->i_align = 0; p_sys->i_align = 0;
p_sys->iconv_handle = (vlc_iconv_t)-1; p_sys->iconv_handle = (vlc_iconv_t)-1;
p_sys->b_autodetect_utf8 = false; p_sys->b_autodetect_utf8 = false;
p_sys->b_ass = false;
p_sys->i_original_height = -1; p_sys->i_original_height = -1;
p_sys->i_original_width = -1; p_sys->i_original_width = -1;
TAB_INIT( p_sys->i_ssa_styles, p_sys->pp_ssa_styles ); TAB_INIT( p_sys->i_ssa_styles, p_sys->pp_ssa_styles );
...@@ -337,13 +310,6 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -337,13 +310,6 @@ static int OpenDecoder( vlc_object_t *p_this )
p_sys->i_align = var_InheritInteger( p_dec, "subsdec-align" ); p_sys->i_align = var_InheritInteger( p_dec, "subsdec-align" );
if( p_dec->fmt_in.i_codec == VLC_CODEC_SSA
&& var_InheritBool( p_dec, "subsdec-formatted" ) )
{
if( p_dec->fmt_in.i_extra > 0 )
ParseSSAHeader( p_dec );
}
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -529,9 +495,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block ) ...@@ -529,9 +495,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
return NULL; return NULL;
} }
/* Decode and format the subpicture unit */
if( p_dec->fmt_in.i_codec != VLC_CODEC_SSA )
{
/* Normal text subs, easy markup */ /* Normal text subs, easy markup */
p_spu->p_region->i_align = SUBPICTURE_ALIGN_BOTTOM | p_sys->i_align; p_spu->p_region->i_align = SUBPICTURE_ALIGN_BOTTOM | p_sys->i_align;
p_spu->p_region->i_x = p_sys->i_align ? 20 : 0; p_spu->p_region->i_x = p_sys->i_align ? 20 : 0;
...@@ -549,19 +512,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block ) ...@@ -549,19 +512,6 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
p_spu->i_stop = p_block->i_pts + p_block->i_length; p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0); p_spu->b_ephemer = (p_block->i_length == 0);
p_spu->b_absolute = false; p_spu->b_absolute = false;
}
else
{
/* Decode SSA/USF strings */
ParseSSAString( p_dec, psz_subtitle, p_spu );
p_spu->i_start = p_block->i_pts;
p_spu->i_stop = p_block->i_pts + p_block->i_length;
p_spu->b_ephemer = (p_block->i_length == 0);
p_spu->b_absolute = false;
p_spu->i_original_picture_width = p_sys->i_original_width;
p_spu->i_original_picture_height = p_sys->i_original_height;
}
free( psz_subtitle ); free( psz_subtitle );
return p_spu; return p_spu;
......
...@@ -74,8 +74,6 @@ typedef struct ...@@ -74,8 +74,6 @@ typedef struct
*****************************************************************************/ *****************************************************************************/
struct decoder_sys_t struct decoder_sys_t
{ {
bool b_ass; /* The subs are ASS */
int i_original_height; int i_original_height;
int i_original_width; int i_original_width;
int i_align; /* Subtitles alignment on the vout */ int i_align; /* Subtitles alignment on the vout */
...@@ -93,7 +91,4 @@ struct decoder_sys_t ...@@ -93,7 +91,4 @@ struct decoder_sys_t
char *GotoNextLine( char *psz_text ); char *GotoNextLine( char *psz_text );
void ParseSSAHeader ( decoder_t * );
void ParseSSAString ( decoder_t *, char *, subpicture_t * );
#endif #endif
...@@ -81,7 +81,6 @@ static int OpenDecoder( vlc_object_t *p_this ) ...@@ -81,7 +81,6 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->fmt_out.i_codec = 0; p_dec->fmt_out.i_codec = 0;
/* Unused fields of p_sys - not needed for USF decoding */ /* Unused fields of p_sys - not needed for USF decoding */
p_sys->b_ass = false;
p_sys->iconv_handle = (vlc_iconv_t)-1; p_sys->iconv_handle = (vlc_iconv_t)-1;
p_sys->b_autodetect_utf8 = false; p_sys->b_autodetect_utf8 = false;
......
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