diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-05-16 17:58:16 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2004-05-16 17:58:16 +0000 |
commit | c3f652ce281a3276a0930e9e0a3db4a13d5ed12e (patch) | |
tree | f917e91a2f0f6d15d9c2564b56735c018f55b772 /src | |
parent | 7464c31461168cf48dc1de6d6b8b61200ff272d3 (diff) | |
download | xine-lib-c3f652ce281a3276a0930e9e0a3db4a13d5ed12e.tar.gz xine-lib-c3f652ce281a3276a0930e9e0a3db4a13d5ed12e.tar.bz2 |
Priority support for demuxer and input plugins (engine part).
CVS patchset: 6552
CVS date: 2004/05/16 17:58:16
Diffstat (limited to 'src')
-rw-r--r-- | src/xine-engine/load_plugins.c | 39 | ||||
-rw-r--r-- | src/xine-engine/xine_plugin.h | 12 |
2 files changed, 49 insertions, 2 deletions
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index 03cc5bb64..70e7961d9 100644 --- a/src/xine-engine/load_plugins.c +++ b/src/xine-engine/load_plugins.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: load_plugins.c,v 1.175 2004/04/26 17:50:12 mroi Exp $ + * $Id: load_plugins.c,v 1.176 2004/05/16 17:58:16 tmattern Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -300,6 +300,8 @@ static void _insert_plugin (xine_t *this, ao_info_t *ao_new, *ao_old; decoder_info_t *decoder_new, *decoder_old; post_info_t *post_new, *post_old; + demuxer_info_t *demux_new, *demux_old; + input_info_t *input_new, *input_old; uint32_t *types; int priority = 0; char key[80]; @@ -382,6 +384,41 @@ static void _insert_plugin (xine_t *this, post_new = xine_xmalloc(sizeof(post_info_t)); post_new->type = post_old->type; entry->info->special_info = post_new; + break; + + case PLUGIN_DEMUX: + demux_old = info->special_info; + demux_new = xine_xmalloc(sizeof(demuxer_info_t)); + + if (demux_old) { + priority = demux_new->priority = demux_old->priority; + lprintf("demux: %s, priority: %d\n", info->id, priority); + } else { + xprintf(this, XINE_VERBOSITY_LOG, + _("load_plugins: demuxer plugin %s does not provide a priority," + " xine-lib will use the default priority.\n"), + info->id); + priority = demux_new->priority = 0; + } + entry->info->special_info = demux_new; + break; + + case PLUGIN_INPUT: + input_old = info->special_info; + input_new = xine_xmalloc(sizeof(input_info_t)); + + if (input_old) { + priority = input_new->priority = input_old->priority; + lprintf("input: %s, priority: %d\n", info->id, priority); + } else { + xprintf(this, XINE_VERBOSITY_LOG, + _("load_plugins: input plugin %s does not provide a priority," + " xine-lib will use the default priority.\n"), + info->id); + priority = input_new->priority = 0; + } + entry->info->special_info = input_new; + break; } xine_list_append_priority_content (list, entry, priority); diff --git a/src/xine-engine/xine_plugin.h b/src/xine-engine/xine_plugin.h index fca4c8aed..87662595f 100644 --- a/src/xine-engine/xine_plugin.h +++ b/src/xine-engine/xine_plugin.h @@ -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: xine_plugin.h,v 1.12 2003/12/09 00:02:38 f1rmb Exp $ + * $Id: xine_plugin.h,v 1.13 2004/05/16 17:58:16 tmattern Exp $ * * generic plugin definitions * @@ -75,4 +75,14 @@ typedef struct { uint32_t type; /* type of the post plugin, use one of XINE_POST_TYPE_* */ } post_info_t; +/* special info for a demuxer plugin */ +typedef struct { + int priority; +} demuxer_info_t; + +/* special info for an input plugin */ +typedef struct { + int priority; +} input_info_t; + #endif |