summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-20 02:25:34 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2008-06-20 02:25:34 +0100
commite8d0ebf629763d195cdc6675f952f479bcedb6c7 (patch)
tree9afc99780f0ebdb1b7c9dfed4d75209e8c009018 /src/xine-engine
parent3bd7a49bfcd82b129333b9433c3b9e21400b6d3c (diff)
downloadxine-lib-e8d0ebf629763d195cdc6675f952f479bcedb6c7.tar.gz
xine-lib-e8d0ebf629763d195cdc6675f952f479bcedb6c7.tar.bz2
Ask the input plugin which demuxer to use.
This overrides the normal content/extension detection, but can be overridden by the user. This is an input plugin API extension; ABI is unchanged. The version is not bumped (we can't bump it due to 1.2).
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/xine.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 984b6ade9..e4e36527f 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -1185,6 +1185,27 @@ static int open_internal (xine_stream_t *stream, const char *mrl) {
/* enable buffered input plugin (request optimizer) */
stream->input_plugin = _x_cache_plugin_get_instance(stream, 0);
+ /* Let the plugin request a specific demuxer (if the user hasn't).
+ * This overrides find-by-content & find-by-extension.
+ */
+ if (!stream->demux_plugin)
+ {
+ char *default_demux = NULL;
+ stream->input_plugin->get_optional_data (stream->input_plugin, &default_demux, INPUT_OPTIONAL_DATA_DEMUXER);
+ if (default_demux)
+ {
+ stream->demux_plugin = _x_find_demux_plugin_by_name (stream, default_demux, stream->input_plugin);
+ if (stream->demux_plugin)
+ {
+ lprintf ("demux and input plugin found\n");
+ _x_meta_info_set_utf8 (stream, XINE_META_INFO_SYSTEMLAYER,
+ stream->demux_plugin->demux_class->get_identifier (stream->demux_plugin->demux_class));
+ }
+ else
+ xine_log (stream->xine, XINE_LOG_MSG, _("xine: couldn't load plugin-specified demux %s for >%s<\n"), default_demux, mrl);
+ }
+ }
+
if (!stream->demux_plugin) {
/*