summaryrefslogtreecommitdiff
path: root/src/libsputext
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-12 22:39:58 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-12 22:39:58 +0100
commit44234828cf17a0a302975dc3f5f8b671f86a8ac2 (patch)
tree43d3917bb441eb7b85d3d6bc443162406e7958ba /src/libsputext
parent6514a174a7036d285da2faae55d1e4cecb7ea310 (diff)
parent552c28241aa1e6820857f5bf8bd8bbb9ee99dd99 (diff)
downloadxine-lib-44234828cf17a0a302975dc3f5f8b671f86a8ac2.tar.gz
xine-lib-44234828cf17a0a302975dc3f5f8b671f86a8ac2.tar.bz2
Merge from 1.2 main.
Diffstat (limited to 'src/libsputext')
-rw-r--r--src/libsputext/demux_sputext.c41
-rw-r--r--src/libsputext/xine_sputext_decoder.c14
2 files changed, 12 insertions, 43 deletions
diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c
index 502ef6580..69eb28388 100644
--- a/src/libsputext/demux_sputext.c
+++ b/src/libsputext/demux_sputext.c
@@ -1400,7 +1400,7 @@ static demux_plugin_t *open_demux_plugin (demux_class_t *class_gen, xine_stream_
this->buflen = 0;
switch (stream->content_detection_method) {
- case METHOD_BY_EXTENSION:
+ case METHOD_BY_MRL:
{
const char *const mrl = input->get_mrl(input);
const char *const ending = strrchr(mrl, '.');
@@ -1448,31 +1448,6 @@ static demux_plugin_t *open_demux_plugin (demux_class_t *class_gen, xine_stream_
return NULL;
}
-static const char *get_demux_description (demux_class_t *this_gen) {
- return "sputext demuxer plugin";
-}
-
-static const char *get_demux_identifier (demux_class_t *this_gen) {
- return "sputext";
-}
-
-static const char *get_demux_extensions (demux_class_t *this_gen) {
- return "asc txt sub srt smi ssa";
-}
-
-static const char *get_demux_mimetypes (demux_class_t *this_gen) {
- return NULL;
-
- /* do not report this mimetype, it might confuse browsers. */
- /* "text/plain: asc txt sub srt: VIDEO subtitles;" */
-}
-
-static void demux_class_dispose (demux_class_t *this_gen) {
- demux_sputext_class_t *this = (demux_sputext_class_t *) this_gen;
-
- free (this);
-}
-
static void config_timeout_cb(void *this_gen, xine_cfg_entry_t *entry) {
demux_sputext_class_t *this = (demux_sputext_class_t *)this_gen;
@@ -1488,11 +1463,13 @@ static void *init_sputext_demux_class (xine_t *xine, void *data) {
this = xine_xmalloc (sizeof (demux_sputext_class_t));
this->demux_class.open_plugin = open_demux_plugin;
- this->demux_class.get_description = get_demux_description;
- this->demux_class.get_identifier = get_demux_identifier;
- this->demux_class.get_mimetypes = get_demux_mimetypes;
- this->demux_class.get_extensions = get_demux_extensions;
- this->demux_class.dispose = demux_class_dispose;
+ this->demux_class.description = N_("sputext demuxer plugin");
+ this->demux_class.identifier = "sputext";
+ /* do not report this mimetype, it might confuse browsers. */
+ /* "text/plain: asc txt sub srt: VIDEO subtitles;" */
+ this->demux_class.mimetypes = NULL;
+ this->demux_class.extensions = "asc txt sub srt smi ssa";
+ this->demux_class.dispose = default_demux_class_dispose;
/*
* Some subtitling formats, namely AQT and Subrip09, define the end of a
@@ -1512,6 +1489,6 @@ static void *init_sputext_demux_class (xine_t *xine, void *data) {
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_DEMUX, 26, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class },
+ { PLUGIN_DEMUX, 27, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libsputext/xine_sputext_decoder.c b/src/libsputext/xine_sputext_decoder.c
index dabb2dddc..f67fd7a7e 100644
--- a/src/libsputext/xine_sputext_decoder.c
+++ b/src/libsputext/xine_sputext_decoder.c
@@ -887,14 +887,6 @@ static void sputext_class_dispose (spu_decoder_class_t *class_gen) {
free (this);
}
-static char *sputext_class_get_identifier (spu_decoder_class_t *this) {
- return "sputext";
-}
-
-static char *sputext_class_get_description (spu_decoder_class_t *this) {
- return "external subtitle decoder plugin";
-}
-
static void update_src_encoding(void *class_gen, xine_cfg_entry_t *entry)
{
sputext_class_t *class = (sputext_class_t *)class_gen;
@@ -915,8 +907,8 @@ static void *init_spu_decoder_plugin (xine_t *xine, void *data) {
this = (sputext_class_t *) xine_xmalloc (sizeof (sputext_class_t));
this->class.open_plugin = sputext_class_open_plugin;
- this->class.get_identifier = sputext_class_get_identifier;
- this->class.get_description = sputext_class_get_description;
+ this->class.identifier = "sputext";
+ this->class.description = N_("external subtitle decoder plugin");
this->class.dispose = sputext_class_dispose;
this->xine = xine;
@@ -994,6 +986,6 @@ static const decoder_info_t spudec_info = {
const plugin_info_t xine_plugin_info[] EXPORTED = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_SPU_DECODER | PLUGIN_MUST_PRELOAD, 16, "sputext", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin },
+ { PLUGIN_SPU_DECODER | PLUGIN_MUST_PRELOAD, 17, "sputext", XINE_VERSION_CODE, &spudec_info, &init_spu_decoder_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};