diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2001-10-25 00:46:58 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2001-10-25 00:46:58 +0000 |
commit | a5049f8fa3fe56454a2763d383af2a568c82d964 (patch) | |
tree | 017bf986554075767c72d917bbe8d9273ee2d982 | |
parent | dfed82cc1d1805f1a1f10df88bae0d8549344223 (diff) | |
download | xine-lib-a5049f8fa3fe56454a2763d383af2a568c82d964.tar.gz xine-lib-a5049f8fa3fe56454a2763d383af2a568c82d964.tar.bz2 |
demux api change to report supported mimetypes
CVS patchset: 882
CVS date: 2001/10/25 00:46:58
-rw-r--r-- | src/demuxers/demux.h | 9 | ||||
-rw-r--r-- | src/demuxers/demux_asf.c | 9 | ||||
-rw-r--r-- | src/demuxers/demux_avi.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_elem.c | 9 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 9 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 14 | ||||
-rw-r--r-- | src/demuxers/demux_ogg.c | 9 | ||||
-rw-r--r-- | src/demuxers/demux_pes.c | 11 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 9 | ||||
-rw-r--r-- | src/xine-engine/load_plugins.c | 63 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 10 |
13 files changed, 156 insertions, 26 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h index c020b2e79..a8228cd1b 100644 --- a/src/demuxers/demux.h +++ b/src/demuxers/demux.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: demux.h,v 1.11 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux.h,v 1.12 2001/10/25 00:46:58 miguelfreitas Exp $ */ #ifndef HAVE_DEMUX_H @@ -35,7 +35,7 @@ extern "C" { #include "input_plugin.h" #endif -#define DEMUXER_PLUGIN_IFACE_VERSION 5 +#define DEMUXER_PLUGIN_IFACE_VERSION 6 #define DEMUX_OK 0 #define DEMUX_FINISHED 1 @@ -116,7 +116,12 @@ struct demux_plugin_s */ char* (*get_identifier) (void); + + /* + * return MIME types supported for this plugin + */ + char* (*get_mimetypes) (void); /* * estimate stream length in seconds * may return 0 for non-seekable streams diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c index 5ef3ae971..9b307c5fa 100644 --- a/src/demuxers/demux_asf.c +++ b/src/demuxers/demux_asf.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_asf.c,v 1.3 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_asf.c,v 1.4 2001/10/25 00:46:58 miguelfreitas Exp $ * * demultiplexer for asf streams * @@ -1067,6 +1067,10 @@ static char *demux_asf_get_id(void) { return "ASF"; } +static char *demux_asf_get_mimetypes(void) { + return ""; +} + static int demux_asf_get_stream_length (demux_plugin_t *this_gen) { demux_asf_t *this = (demux_asf_t *) this_gen; @@ -1079,7 +1083,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_asf_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_asf: plugin doesn't support plugin API version %d.\n" "demux_asf: this means there's a version mismatch between xine and this " "demux_asf: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -1099,6 +1103,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_asf_get_status; this->demux_plugin.get_identifier = demux_asf_get_id; this->demux_plugin.get_stream_length = demux_asf_get_stream_length; + this->demux_plugin.get_mimetypes = demux_asf_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index ceb544497..14ce27f6b 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.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_avi.c,v 1.46 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_avi.c,v 1.47 2001/10/25 00:46:58 miguelfreitas Exp $ * * demultiplexer for avi streams * @@ -1181,6 +1181,11 @@ static char *demux_avi_get_id(void) { return "AVI"; } +static char *demux_avi_get_mimetypes(void) { + return "video/msvideo: avi: AVI animation;" + "video/x-msvideo: avi: AVI animation;"; +} + static int demux_avi_get_stream_length (demux_plugin_t *this_gen) { demux_avi_t *this = (demux_avi_t *) this_gen; @@ -1197,7 +1202,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_avi_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_avi: this plugin doesn't support plugin API version %d.\n" "demux_avi: this means there's a version mismatch between xine and this " "demux_avi: demuxer plugin.\nInstalling current demuxer plugins should help.\n", @@ -1217,6 +1222,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_avi_get_status; this->demux_plugin.get_identifier = demux_avi_get_id; this->demux_plugin.get_stream_length = demux_avi_get_stream_length; + this->demux_plugin.get_mimetypes = demux_avi_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index 4416c072f..a1f1e0517 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.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_elem.c,v 1.24 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_elem.c,v 1.25 2001/10/25 00:46:58 miguelfreitas Exp $ * * demultiplexer for elementary mpeg streams * @@ -312,6 +312,10 @@ static char *demux_mpeg_elem_get_id(void) { return "MPEG_ELEM"; } +static char *demux_mpeg_elem_get_mimetypes(void) { + return ""; +} + static void demux_mpeg_elem_close (demux_plugin_t *this) { /* nothing */ } @@ -327,7 +331,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpeg_elem_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_elem: plugin doesn't support plugin API version %d.\n" "demux_elem: this means there's a version mismatch between xine and this " "demux_elem: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -347,6 +351,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_mpeg_elem_get_status; this->demux_plugin.get_identifier = demux_mpeg_elem_get_id; this->demux_plugin.get_stream_length = demux_mpeg_elem_get_stream_length; + this->demux_plugin.get_mimetypes = demux_mpeg_elem_get_mimetypes; return &this->demux_plugin; } diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index e3f11195f..4c2d5aca6 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.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_mpeg.c,v 1.39 2001/10/22 23:24:34 guenter Exp $ + * $Id: demux_mpeg.c,v 1.40 2001/10/25 00:46:59 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -829,6 +829,11 @@ static char *demux_mpeg_get_id(void) { return "MPEG"; } +static char *demux_mpeg_get_mimetypes(void) { + return "video/mpeg: mpeg, mpg, mpe: MPEG animation;" + "video/x-mpeg: mpeg, mpg, mpe: MPEG animation;"; +} + static void demux_mpeg_close (demux_plugin_t *this) { /* nothing */ } @@ -849,7 +854,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpeg_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" "demux_mpeg: this means there's a version mismatch between xine and this " "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -869,6 +874,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_mpeg_get_status; this->demux_plugin.get_identifier = demux_mpeg_get_id; this->demux_plugin.get_stream_length = demux_mpeg_get_stream_length; + this->demux_plugin.get_mimetypes = demux_mpeg_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index b8d0fc7ea..5aeffe3be 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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_mpeg_block.c,v 1.58 2001/10/22 22:50:01 richwareham Exp $ + * $Id: demux_mpeg_block.c,v 1.59 2001/10/25 00:46:59 miguelfreitas Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -933,6 +933,10 @@ static char *demux_mpeg_block_get_id(void) { return "MPEG_BLOCK"; } +static char *demux_mpeg_block_get_mimetypes(void) { + return ""; +} + static int demux_mpeg_block_get_stream_length (demux_plugin_t *this_gen) { demux_mpeg_block_t *this = (demux_mpeg_block_t *) this_gen; @@ -949,7 +953,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpeg_block_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_mpeg_block: plugin doesn't support plugin API version %d.\n" "demux_mpeg_block: this means there's a version mismatch between xine and this " "demux_mpeg_block: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -970,6 +974,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_mpeg_block_get_status; this->demux_plugin.get_identifier = demux_mpeg_block_get_id; this->demux_plugin.get_stream_length = demux_mpeg_block_get_stream_length; + this->demux_plugin.get_mimetypes = demux_mpeg_block_get_mimetypes; this->scratch = xmalloc_aligned (512, 4096); diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index dafcc1e35..097b8344a 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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_mpgaudio.c,v 1.25 2001/10/22 23:24:34 guenter Exp $ + * $Id: demux_mpgaudio.c,v 1.26 2001/10/25 00:46:59 miguelfreitas Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -405,6 +405,15 @@ static char *demux_mpgaudio_get_id(void) { return "MPGAUDIO"; } +static char *demux_mpgaudio_get_mimetypes(void) { + return "audio/mpeg2: mp2: MPEG audio;" + "audio/x-mpeg2: mp2: MPEG audio;" + "audio/mpeg3: mp3: MPEG audio;" + "audio/x-mpeg3: mp3: MPEG audio;" + "audio/mpeg: mpa,abs,mpega: MPEG audio;" + "audio/x-mpeg: mpa,abs,mpega: MPEG audio;"; +} + static void demux_mpgaudio_close (demux_plugin_t *this) { /* nothing */ } @@ -426,7 +435,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_mpgaudio_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_mpeg: plugin doesn't support plugin API version %d.\n" "demux_mpeg: this means there's a version mismatch between xine and this " "demux_mpeg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -446,6 +455,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_mpgaudio_get_status; this->demux_plugin.get_identifier = demux_mpgaudio_get_id; this->demux_plugin.get_stream_length = demux_mpgaudio_get_stream_length; + this->demux_plugin.get_mimetypes = demux_mpgaudio_get_mimetypes; return &this->demux_plugin; } diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index 0a56e4555..a9df5c4ac 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.5 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_ogg.c,v 1.6 2001/10/25 00:46:59 miguelfreitas Exp $ * * demultiplexer for ogg streams * @@ -381,6 +381,10 @@ static char *demux_ogg_get_id(void) { return "OGG"; } +static char *demux_ogg_get_mimetypes(void) { + return ""; +} + static int demux_ogg_get_stream_length (demux_plugin_t *this_gen) { /* demux_ogg_t *this = (demux_ogg_t *) this_gen; */ @@ -393,7 +397,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_ogg_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_ogg: plugin doesn't support plugin API version %d.\n" "demux_ogg: this means there's a version mismatch between xine and this " "demux_ogg: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -413,6 +417,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_ogg_get_status; this->demux_plugin.get_identifier = demux_ogg_get_id; this->demux_plugin.get_stream_length = demux_ogg_get_stream_length; + this->demux_plugin.get_mimetypes = demux_ogg_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c index 0a9e9abee..868cec381 100644 --- a/src/demuxers/demux_pes.c +++ b/src/demuxers/demux_pes.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_pes.c,v 1.10 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_pes.c,v 1.11 2001/10/25 00:46:59 miguelfreitas Exp $ * * demultiplexer for mpeg 2 PES (Packetized Elementary Streams) * reads streams of variable blocksizes @@ -546,6 +546,10 @@ static char *demux_pes_get_id(void) { return "MPEG_PES"; } +static char *demux_pes_get_mimetypes(void) { + return ""; +} + static void demux_pes_close (demux_plugin_t *this) { /* nothing */ } @@ -562,7 +566,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_pes_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_pes: plugin doesn't support plugin API version %d.\n" "demux_pes: this means there's a version mismatch between xine and this " "demux_pes: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -574,7 +578,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { config = xine->config; xine_debug = config->lookup_int (config, "xine_debug", 0); - this->demux_plugin.interface_version = 3; + this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION; this->demux_plugin.open = demux_pes_open; this->demux_plugin.start = demux_pes_start; this->demux_plugin.stop = demux_pes_stop; @@ -582,6 +586,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_pes_get_status; this->demux_plugin.get_identifier = demux_pes_get_id; this->demux_plugin.get_stream_length = demux_pes_get_stream_length; + this->demux_plugin.get_mimetypes = demux_pes_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 0380d142b..8e5b3fe78 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.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_qt.c,v 1.8 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_qt.c,v 1.9 2001/10/25 00:47:00 miguelfreitas Exp $ * * demultiplexer for quicktime streams, based on: * @@ -4367,6 +4367,11 @@ static char *demux_qt_get_id(void) { return "QUICKTIME"; } +static char *demux_qt_get_mimetypes(void) { + return "video/quicktime: mov,qt: Quicktime animation;" + "video/x-quicktime: mov,qt: Quicktime animation;"; +} + static int demux_qt_get_stream_length (demux_plugin_t *this_gen) { demux_qt_t *this = (demux_qt_t *) this_gen; @@ -4379,7 +4384,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { demux_qt_t *this; config_values_t *config; - if (iface != 5) { + if (iface != 6) { printf( "demux_qt: plugin doesn't support plugin API version %d.\n" "demux_qt: this means there's a version mismatch between xine and this " "demux_qt: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -4399,6 +4404,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->demux_plugin.get_status = demux_qt_get_status; this->demux_plugin.get_identifier = demux_qt_get_id; this->demux_plugin.get_stream_length = demux_qt_get_stream_length; + this->demux_plugin.get_mimetypes = demux_qt_get_mimetypes; return (demux_plugin_t *) this; } diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 65d9e7a9a..b7720494d 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.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_ts.c,v 1.19 2001/10/20 02:01:51 guenter Exp $ + * $Id: demux_ts.c,v 1.20 2001/10/25 00:47:01 miguelfreitas Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -824,6 +824,10 @@ static char *demux_ts_get_id(void) { return "MPEG_TS"; } +static char *demux_ts_get_mimetypes(void) { + return ""; +} + static int demux_ts_get_status(demux_plugin_t *this_gen) { demux_ts *this = (demux_ts *)this_gen; @@ -971,7 +975,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { config_values_t *config; int i; - if (iface != 5) { + if (iface != 6) { printf("demux_ts: plugin doesn't support plugin API version %d.\n" "demux_ts: this means there's a version mismatch between xine and this " "demux_ts: demuxer plugin.\nInstalling current demux plugins should help.\n", @@ -993,6 +997,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) { this->plugin.get_status = demux_ts_get_status; this->plugin.get_identifier = demux_ts_get_id; this->plugin.get_stream_length = demux_ts_get_stream_length; + this->plugin.get_mimetypes = demux_ts_get_mimetypes; /* * Initialise our specialised data. diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c index a49d0d6e8..1f6392c90 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.49 2001/10/23 21:51:11 jcdutton Exp $ + * $Id: load_plugins.c,v 1.50 2001/10/25 00:47:02 miguelfreitas Exp $ * * * Load input/demux/audio_out/video_out/codec plugins @@ -129,6 +129,67 @@ void load_demux_plugins (xine_t *this, this->cur_demuxer_plugin = NULL; } +void xine_list_demux_plugins (config_values_t *config, + char **identifiers, char **mimetypes) { + DIR *dir; + xine_t *this = xmalloc (sizeof (xine_t)); + + *identifiers = xmalloc (1024); + *mimetypes = xmalloc (8192); + + this->config = config; + xine_debug = config->lookup_int (config, "xine_debug", 0); + + dir = opendir (XINE_PLUGINDIR) ; + + if (dir) { + struct dirent *pEntry; + + while ((pEntry = readdir (dir)) != NULL) { + char str[1024]; + void *plugin; + + int nLen = strlen (pEntry->d_name); + + if ((strncasecmp(pEntry->d_name, + XINE_DEMUXER_PLUGIN_PREFIXNAME, + XINE_DEMUXER_PLUGIN_PREFIXNAME_LENGTH) == 0) && + ((pEntry->d_name[nLen-3]=='.') + && (pEntry->d_name[nLen-2]=='s') + && (pEntry->d_name[nLen-1]=='o'))) { + + /* + * demux plugin found => load it + */ + + sprintf (str, "%s/%s", XINE_PLUGINDIR, pEntry->d_name); + + if(!(plugin = dlopen (str, RTLD_LAZY))) { + fprintf(stderr, "load_plugins: cannot open demux plugin %s:\n%s\n", + str, dlerror()); + } + else { + void *(*initplug) (int, xine_t *); + + if((initplug = dlsym(plugin, "init_demuxer_plugin")) != NULL) { + demux_plugin_t *dxp; + + dxp = (demux_plugin_t *) initplug(DEMUXER_PLUGIN_IFACE_VERSION, this); + if (dxp) { + strcat(*identifiers,dxp->get_identifier()); + strcat(*identifiers,"\n"); + strcat(*mimetypes,dxp->get_mimetypes()); + } + } + dlclose(plugin); + } + } + } + } + + free(this); +} + /** *************************************************************** * Input plugins section */ diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 9985d521e..9c4783617 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.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_internal.h,v 1.52 2001/10/22 17:10:21 guenter Exp $ + * $Id: xine_internal.h,v 1.53 2001/10/25 00:47:03 miguelfreitas Exp $ * */ @@ -432,7 +432,13 @@ void audio_decoder_shutdown (xine_t *this); */ void load_demux_plugins (xine_t *this, config_values_t *config, int iface_version); - + +/* + * list (open and close) all available demuxer plugins + */ +void xine_list_demux_plugins (config_values_t *config, + char **identifiers, char **mimetypes); + /* * load all available input plugins */ |