diff options
author | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2001-11-30 00:53:50 +0000 |
---|---|---|
committer | Daniel Caujolle-Bert <f1rmb@users.sourceforge.net> | 2001-11-30 00:53:50 +0000 |
commit | 873578a7965683e3e76420731c1d571908b54848 (patch) | |
tree | cd8153e478f39f9aac7c851672996a8e58ace71e /src/demuxers/demux_ogg.c | |
parent | ad5f52afbed82f29ba0816255edf1ff63533a2ff (diff) | |
download | xine-lib-873578a7965683e3e76420731c1d571908b54848.tar.gz xine-lib-873578a7965683e3e76420731c1d571908b54848.tar.bz2 |
Valid mrls are no more static (except few ones), like file suffix too.
First draft of compat.h (almost empty for now).
CVS patchset: 1139
CVS date: 2001/11/30 00:53:50
Diffstat (limited to 'src/demuxers/demux_ogg.c')
-rw-r--r-- | src/demuxers/demux_ogg.c | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index f9d44e3ad..250cace76 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ogg.c,v 1.10 2001/11/18 03:53:23 guenter Exp $ + * $Id: demux_ogg.c,v 1.11 2001/11/30 00:53:51 f1rmb Exp $ * * demultiplexer for ogg streams * @@ -44,9 +44,13 @@ #define MAX_STREAMS 16 +#define VALID_ENDS "ogg" + typedef struct demux_ogg_s { demux_plugin_t demux_plugin; + config_values_t *config; + fifo_buffer_t *audio_fifo; fifo_buffer_t *video_fifo; @@ -352,6 +356,7 @@ static int demux_ogg_open(demux_plugin_t *this_gen, case STAGE_BY_EXTENSION: { char *ending; char *MRL; + char *m, *valid_ends; MRL = input->get_mrl (input); @@ -364,9 +369,18 @@ static int demux_ogg_open(demux_plugin_t *this_gen, if(!ending) return DEMUX_CANNOT_HANDLE; - if(!strcasecmp(ending, ".ogg")) { - this->input = input; - return DEMUX_CAN_HANDLE; + xine_strdupa(valid_ends, (this->config->register_string(this->config, + "mrl.ends_ogg", VALID_ENDS, + "valid mrls ending for ogg demuxer", + NULL, NULL, NULL))); + while((m = xine_strsep(&valid_ends, ",")) != NULL) { + + while(*m == ' ' || *m == '\t') m++; + + if(!strcasecmp((ending + 1), m)) { + this->input = input; + return DEMUX_CAN_HANDLE; + } } } break; @@ -393,7 +407,6 @@ static int demux_ogg_get_stream_length (demux_plugin_t *this_gen) { demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_ogg_t *this; - config_values_t *config; if (iface != 6) { printf( "demux_ogg: plugin doesn't support plugin API version %d.\n" @@ -403,8 +416,13 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { return NULL; } - this = xine_xmalloc (sizeof (demux_ogg_t)); - config = xine->config; + this = xine_xmalloc (sizeof (demux_ogg_t)); + this->config = xine->config; + + (void*) this->config->register_string(this->config, + "mrl.ends_ogg", VALID_ENDS, + "valid mrls ending for ogg demuxer", + NULL, NULL, NULL); this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; this->demux_plugin.open = demux_ogg_open; |