Commit b95cac1c authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Update NEWS and interface string about the latest parsing for the subtitles.

Some comments about the naming of the subtitles (mplayer doesn't name as gnome-subtitles does, and none of them respect the main conventions)
Most of the subtitles format are now parsed. However, some styles are still discarded.
parent 0b00646d
...@@ -105,8 +105,11 @@ Subtitles: ...@@ -105,8 +105,11 @@ Subtitles:
* MPSub subtitles support * MPSub subtitles support
* JacoSub subtitles basic support * JacoSub subtitles basic support
* MPL2 subtitles support * MPL2 subtitles support
* Rewrite of ASS/SSA scripts and subtitles support. * Rewrite of ASS/SSA scripts and subtitles support
* PowerDivx (.psb) Subtitles support * PowerDivx (.psb) Subtitles support
* Realtext subtitle support
* DKS subtitle support
* SubViewer 1.0 (SubRip09) subtitles support
Encoders: Encoders:
* Flash Screen Video support * Flash Screen Video support
......
...@@ -203,7 +203,7 @@ typedef enum vlc_dialog { ...@@ -203,7 +203,7 @@ typedef enum vlc_dialog {
EXTENSIONS_PLAYLIST EXTENSIONS_PLAYLIST
#define EXTENSIONS_SUBTITLE "*.cdg;*.idx;*.srt;*.sub;*.utf;*.ass;*.ssa;*.aqt;" \ #define EXTENSIONS_SUBTITLE "*.cdg;*.idx;*.srt;*.sub;*.utf;*.ass;*.ssa;*.aqt;" \
"*.jss;*.psb" "*.jss;*.psb;*.rt;*.smi"
/** \defgroup vlc_interaction Interaction /** \defgroup vlc_interaction Interaction
* \ingroup vlc_interface * \ingroup vlc_interface
......
...@@ -57,16 +57,17 @@ static void Close( vlc_object_t *p_this ); ...@@ -57,16 +57,17 @@ static void Close( vlc_object_t *p_this );
"This will only work with MicroDVD and SubRIP (SRT) subtitles.") "This will only work with MicroDVD and SubRIP (SRT) subtitles.")
#define SUB_TYPE_LONGTEXT \ #define SUB_TYPE_LONGTEXT \
N_("Force the subtiles format. Valid values are : \"microdvd\", " \ N_("Force the subtiles format. Valid values are : \"microdvd\", " \
"\"subrip\", \"ssa1\", \"ssa2-4\", \"ass\", \"vplayer\" " \ "\"subrip\", \"subviewer\", \"ssa1\", \"ssa2-4\", \"ass\", \"vplayer\", " \
"\"sami\", \"dvdsubtitle\", \"mpl2\", \"aqt\", \"pjs\" "\ "\"sami\", \"dvdsubtitle\", \"mpl2\", \"aqt\", \"pjs\", "\
"\"mpsub\" \"jacosub\" \"psb\" \"realtext\" \"dks\" and \"auto\" " \ "\"mpsub\", \"jacosub\", \"psb\", \"realtext\", \"dks\", \"subviewer1\", " \
"(meaning autodetection, this should always work).") " and \"auto\" (meaning autodetection, this should always work).")
static const char *ppsz_sub_type[] = static const char *ppsz_sub_type[] =
{ {
"auto", "microdvd", "subrip", "subviewer", "ssa1", "auto", "microdvd", "subrip", "subviewer", "ssa1",
"ssa2-4", "ass", "vplayer", "sami", "dvdsubtitle", "mpl2", "ssa2-4", "ass", "vplayer", "sami", "dvdsubtitle", "mpl2",
"aqt", "pjs", "mpsub", "jacosub", "psb", "rt", "dks" "aqt", "pjs", "mpsub", "jacosub", "psb", "realtext", "dks",
"subviewer1"
}; };
vlc_module_begin(); vlc_module_begin();
...@@ -102,8 +103,8 @@ enum ...@@ -102,8 +103,8 @@ enum
SUB_TYPE_ASS, SUB_TYPE_ASS,
SUB_TYPE_VPLAYER, SUB_TYPE_VPLAYER,
SUB_TYPE_SAMI, SUB_TYPE_SAMI,
SUB_TYPE_SUBVIEWER, //SUBVIEWER 2! SUB_TYPE_SUBVIEWER, /* SUBVIEWER 2 */
SUB_TYPE_DVDSUBTITLE, SUB_TYPE_DVDSUBTITLE, /* Mplayer calls it subviewer2 */
SUB_TYPE_MPL2, SUB_TYPE_MPL2,
SUB_TYPE_AQT, SUB_TYPE_AQT,
SUB_TYPE_PJS, SUB_TYPE_PJS,
...@@ -111,8 +112,9 @@ enum ...@@ -111,8 +112,9 @@ enum
SUB_TYPE_JACOSUB, SUB_TYPE_JACOSUB,
SUB_TYPE_PSB, SUB_TYPE_PSB,
SUB_TYPE_RT, SUB_TYPE_RT,
SUB_TYPE_SUBVIEW1, SUB_TYPE_DKS,
SUB_TYPE_DKS SUB_TYPE_SUBVIEW1 /* SUBVIEWER 1 - mplayer calls it subrip09,
and Gnome subtitles SubViewer 1.0 */
}; };
typedef struct typedef struct
...@@ -166,7 +168,7 @@ static int ParseJSS ( demux_t *, subtitle_t *, int ); ...@@ -166,7 +168,7 @@ static int ParseJSS ( demux_t *, subtitle_t *, int );
static int ParsePSB ( demux_t *, subtitle_t *, int ); static int ParsePSB ( demux_t *, subtitle_t *, int );
static int ParseRealText ( demux_t *, subtitle_t *, int ); static int ParseRealText ( demux_t *, subtitle_t *, int );
static int ParseDKS ( demux_t *, subtitle_t *, int ); static int ParseDKS ( demux_t *, subtitle_t *, int );
static int ParseSub1 ( demux_t *, subtitle_t *, int ); static int ParseSubViewer1 ( demux_t *, subtitle_t *, int );
static struct static struct
{ {
...@@ -193,7 +195,7 @@ static struct ...@@ -193,7 +195,7 @@ static struct
{ "psb", SUB_TYPE_PSB, "PowerDivx", ParsePSB }, { "psb", SUB_TYPE_PSB, "PowerDivx", ParsePSB },
{ "realtext", SUB_TYPE_RT, "RealText", ParseRealText }, { "realtext", SUB_TYPE_RT, "RealText", ParseRealText },
{ "dks", SUB_TYPE_DKS, "DKS", ParseDKS }, { "dks", SUB_TYPE_DKS, "DKS", ParseDKS },
{ "subviewer1", SUB_TYPE_SUBVIEW1, "Subviewer 1", ParseSub1 }, { "subviewer1", SUB_TYPE_SUBVIEW1, "Subviewer 1", ParseSubViewer1 },
{ NULL, SUB_TYPE_UNKNOWN, "Unknown", NULL } { NULL, SUB_TYPE_UNKNOWN, "Unknown", NULL }
}; };
...@@ -913,7 +915,7 @@ static int ParseSubRipSubViewer( demux_t *p_demux, subtitle_t *p_subtitle, ...@@ -913,7 +915,7 @@ static int ParseSubRipSubViewer( demux_t *p_demux, subtitle_t *p_subtitle,
if( b_replace_br ) if( b_replace_br )
{ {
char *p; char *p;
while( ( p = strstr( psz_text, "[br]" ) ) ) while( ( p = strstr( psz_text, "[br]" ) ) )
{ {
*p++ = '\n'; *p++ = '\n';
...@@ -1949,7 +1951,7 @@ static int ParseDKS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx ) ...@@ -1949,7 +1951,7 @@ static int ParseDKS( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
return VLC_SUCCESS; return VLC_SUCCESS;
} }
static int ParseSub1( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx ) static int ParseSubViewer1( demux_t *p_demux, subtitle_t *p_subtitle, int i_idx )
{ {
VLC_UNUSED( i_idx ); VLC_UNUSED( i_idx );
......
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