summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acconfig.h3
-rw-r--r--configure.in5
-rw-r--r--doc/Makefile.am2
-rw-r--r--src/demuxers/Makefile.am39
-rw-r--r--src/demuxers/demux.h23
-rw-r--r--src/demuxers/demux_avi.c35
-rw-r--r--src/demuxers/demux_mpeg.c36
-rw-r--r--src/demuxers/demux_mpeg_block.c40
-rw-r--r--src/input/Makefile.am41
-rw-r--r--src/input/input_file.c4
-rw-r--r--src/input/input_plugin.h8
-rw-r--r--src/libw32dll/Makefile.am30
-rw-r--r--src/xine-engine/Makefile.am17
-rw-r--r--src/xine-engine/load_plugins.c100
-rw-r--r--src/xine-engine/xine.c11
-rw-r--r--src/xine-engine/xine_internal.h43
16 files changed, 265 insertions, 172 deletions
diff --git a/acconfig.h b/acconfig.h
index bf01ee913..37dcbb455 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -25,8 +25,5 @@
/* Define this to plugins directory location */
#undef XINE_PLUGINDIR
-/* Define this to demuxers plugins directory location */
-#undef XINE_DEMUXDIR
-
/* Define this to skins directory location */
#undef XINE_SKINDIR
diff --git a/configure.in b/configure.in
index 998b80c81..fcc58e22d 100644
--- a/configure.in
+++ b/configure.in
@@ -294,11 +294,6 @@ XINE_PLUGINDIR="$libdir/xine/plugins"
eval XINE_PLUGINPATH=`eval echo "$XINE_PLUGINDIR"`
AC_DEFINE_UNQUOTED(XINE_PLUGINDIR,"$XINE_PLUGINPATH")
-
-XINE_DEMUXDIR="$libdir/xine/plugins"
-eval XINE_DEMUXPATH=`eval echo "$XINE_DEMUXDIR"`
-AC_DEFINE_UNQUOTED(XINE_DEMUXDIR,"$XINE_DEMUXPATH")
-
XINE_SKINDIR="${datadir}/xine/skins"
eval XINE_SKINPATH="$XINE_SKINDIR"
AC_DEFINE_UNQUOTED(XINE_SKINDIR,"$XINE_SKINPATH")
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 4d2a502d2..1b34c7b9c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -43,7 +43,7 @@ docs:
erase-docs:
@rm -rf xine-lib-API/html
- @rm xine-lib-API/xine_header.html xine-lib-API/xine_logo.png
+ @rm -f xine-lib-API/xine_header.html xine-lib-API/xine_logo.png
debug:
diff --git a/src/demuxers/Makefile.am b/src/demuxers/Makefile.am
index 46e5bc8b6..e7a64cd6d 100644
--- a/src/demuxers/Makefile.am
+++ b/src/demuxers/Makefile.am
@@ -1,17 +1,36 @@
-CFLAGS = @BUILD_LIB_STATIC@ @GLOBAL_CFLAGS@
+CFLAGS = @GLOBAL_CFLAGS@
-noinst_LTLIBRARIES = libdemux.la
+LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
-#libdemux_la_SOURCES = demux_avi.c demux_mpeg_block.c demux_mpeg.c \
-# demux_mpgaudio.c demux_elem.c
-libdemux_la_SOURCES = demux_avi.c demux_mpeg_block.c demux_mpeg.c
-#libdemux_la_DEPENDENCIES = libsdeps
-#libdemux_la_LIBADD = $(top_builddir)/libmpg123/libmpg123.la
+libdir = $(XINE_PLUGINDIR)
-include_HEADERS = demux.h
+##
+# IMPORTANT:
+# ---------
+# All of xine demuxer plugins should be named like the scheme "xineplug_dmx_"
+#
+#lib_LTLIBRARIES = xineplug_dmx_avi.la xineplug_dmx_mpeg_block.la \
+# xineplug_dmx_mpeg.la xineplug_dmx_mpeg_audio.la \
+# xineplug_dmx_mpeg_elem.la
+lib_LTLIBRARIES = xineplug_dmx_avi.la xineplug_dmx_mpeg_block.la \
+ xineplug_dmx_mpeg.la
+
+xineplug_dmx_avi_la_SOURCES = demux_avi.c
+xineplug_dmx_avi_la_LDFLAGS = -avoid-version -module
+
+xineplug_dmx_mpeg_block_la_SOURCES = demux_mpeg_block.c
+xineplug_dmx_mpeg_block_la_LDFLAGS = -avoid-version -module
-#libsdeps:
-# @cd $(top_builddir)/libmpg123 && $(MAKE) libmpg123.la
+xineplug_dmx_mpeg_la_SOURCES = demux_mpeg.c
+xineplug_dmx_mpeg_la_LDFLAGS = -avoid-version -module
+
+#xineplug_dmx_mpeg_audio_la_SOURCES = demux_mpgaudio.c
+#xineplug_dmx_mpeg_audio_la_LDFLAGS = -avoid-version -module
+
+#xineplug_dmx_mpeg_elem_la_SOURCES = demux_elem.c
+#xineplug_dmx_mpeg_elem_la_LDFLAGS = -avoid-version -module
+
+include_HEADERS = demux.h
##
## Install header files (default=$includedir/xine)
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h
index a7e6f8292..59a132917 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.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: demux.h,v 1.3 2001/04/21 00:14:40 f1rmb Exp $
*/
#ifndef HAVE_DEMUX_H
@@ -31,6 +31,8 @@
#include "input_plugin.h"
#endif
+#define DEMUXER_PLUGIN_IFACE_VERSION 1
+
#define DEMUX_OK 0
#define DEMUX_FINISHED 1
@@ -55,6 +57,11 @@ typedef struct demux_plugin_s demux_plugin_t;
struct demux_plugin_s
{
/*
+ * plugin interface version, lower versions _may_ be supported
+ */
+ int interface_version;
+
+ /*
* ask demuxer to open the given stream (input-plugin)
* using the content-detection method specified in <stage>
*
@@ -98,7 +105,7 @@ struct demux_plugin_s
* return human readable identifier for this plugin
*/
- char* (*get_identifier) (demux_plugin_t *this);
+ char* (*get_identifier) (void);
} ;
@@ -107,19 +114,9 @@ struct demux_plugin_s
*
* make sure you provide this (and only this!) function call:
*
- * demux_plugin_t *init_demux_plugin (config_values_t *cfg, uint32_t xd);
+ * demux_plugin_t *init_demux_plugin (int iface_version, config_values_t *cfg);
*
*/
-demux_plugin_t *init_demux_mpeg (config_values_t *cfg, uint32_t xd);
-
-demux_plugin_t *init_demux_mpeg_block (config_values_t *cfg, uint32_t xd);
-
-demux_plugin_t *init_demux_avi (config_values_t *cfg, uint32_t xd);
-
-demux_plugin_t *init_demux_mpeg_audio (config_values_t *cfg, uint32_t xd);
-
-demux_plugin_t *init_demux_mpeg_elem(config_values_t *cfg, uint32_t xd);
-
#endif
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index cfa4307e0..3469467ad 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.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: demux_avi.c,v 1.3 2001/04/21 00:14:40 f1rmb Exp $
*
* demultiplexer for avi streams
*
@@ -960,23 +960,36 @@ static int demux_avi_open(demux_plugin_t *this_gen, input_plugin_t *input, int s
return DEMUX_CANNOT_HANDLE;
}
-static char *demux_avi_get_id(demux_plugin_t *this) {
+static char *demux_avi_get_id(void) {
return "AVI";
}
-demux_plugin_t *init_demux_avi(config_values_t *cfg, uint32_t xd) {
+demux_plugin_t *init_demux_plugin(int iface, config_values_t *config) {
demux_avi_t *this = xmalloc (sizeof (demux_avi_t));
- xine_debug = xd;
+ switch (iface) {
- this->demux_plugin.open = demux_avi_open;
- this->demux_plugin.start = demux_avi_start;
- this->demux_plugin.stop = demux_avi_stop;
- this->demux_plugin.close = demux_avi_close;
- this->demux_plugin.get_status = demux_avi_get_status;
- this->demux_plugin.get_identifier = demux_avi_get_id;
+ case 1:
+ //FIXME xine_debug = xd;
+ this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION;
+ this->demux_plugin.open = demux_avi_open;
+ this->demux_plugin.start = demux_avi_start;
+ this->demux_plugin.stop = demux_avi_stop;
+ this->demux_plugin.close = demux_avi_close;
+ this->demux_plugin.get_status = demux_avi_get_status;
+ this->demux_plugin.get_identifier = demux_avi_get_id;
+ return (demux_plugin_t *) this;
+ break;
- return (demux_plugin_t *) this;
+ default:
+ fprintf(stderr,
+ "Demuxer plugin doesn't support plugin API version %d.\n"
+ "PLUGIN DISABLED.\n"
+ "This means there's a version mismatch between xine and this "
+ "demuxer plugin.\nInstalling current input plugins should help.\n",
+ iface);
+ return NULL;
+ }
}
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index b373b4f93..5cc08817c 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.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: demux_mpeg.c,v 1.3 2001/04/21 00:14:40 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -600,7 +600,7 @@ static int demux_mpeg_open(demux_plugin_t *this_gen, input_plugin_t *ip, int sta
static void demux_mpeg_select_spu_channel (int nChannel) {
}
-static char *demux_mpeg_get_id(demux_plugin_t *this) {
+static char *demux_mpeg_get_id(void) {
return "MPEG";
}
@@ -608,19 +608,33 @@ static void demux_mpeg_close (demux_plugin_t *this) {
/* nothing */
}
-demux_plugin_t *init_demux_mpeg(config_values_t *cfg, uint32_t xd) {
+demux_plugin_t *init_demux_plugin(int iface, config_values_t *config) {
demux_mpeg_t *this = xmalloc (sizeof (demux_mpeg_t));
- xine_debug = xd;
+ switch (iface) {
- this->demux_plugin.open = demux_mpeg_open;
- this->demux_plugin.start = demux_mpeg_start;
- this->demux_plugin.stop = demux_mpeg_stop;
- this->demux_plugin.close = demux_mpeg_close;
- this->demux_plugin.get_status = demux_mpeg_get_status;
- this->demux_plugin.get_identifier = demux_mpeg_get_id;
+ case 1:
+ // FIXME xine_debug = xd;
+ this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION;
+ this->demux_plugin.open = demux_mpeg_open;
+ this->demux_plugin.start = demux_mpeg_start;
+ this->demux_plugin.stop = demux_mpeg_stop;
+ this->demux_plugin.close = demux_mpeg_close;
+ this->demux_plugin.get_status = demux_mpeg_get_status;
+ this->demux_plugin.get_identifier = demux_mpeg_get_id;
+
+ return (demux_plugin_t *) this;
+ break;
- return (demux_plugin_t *) this;
+ default:
+ fprintf(stderr,
+ "Demuxer plugin doesn't support plugin API version %d.\n"
+ "PLUGIN DISABLED.\n"
+ "This means there's a version mismatch between xine and this "
+ "demuxer plugin.\nInstalling current input plugins should help.\n",
+ iface);
+ return NULL;
+ }
}
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index d3bf96519..bcdd003f6 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.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: demux_mpeg_block.c,v 1.3 2001/04/21 00:14:40 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -494,7 +494,7 @@ static int demux_mpeg_block_open(demux_plugin_t *this_gen,
return DEMUX_CANNOT_HANDLE;
}
-static char *demux_mpeg_block_get_id(demux_plugin_t *this) {
+static char *demux_mpeg_block_get_id(void) {
return "MPEG_BLOCK";
}
@@ -502,18 +502,32 @@ static void demux_mpeg_block_close (demux_plugin_t *this) {
/* nothing */
}
-demux_plugin_t *init_demux_mpeg_block(config_values_t *cfg, uint32_t xd) {
+demux_plugin_t *init_demux_mpeg_block(int iface, config_values_t *config) {
demux_mpeg_block_t *this = xmalloc (sizeof (demux_mpeg_block_t));
- xine_debug = xd;
-
- this->demux_plugin.open = demux_mpeg_block_open;
- this->demux_plugin.start = demux_mpeg_block_start;
- this->demux_plugin.stop = demux_mpeg_block_stop;
- this->demux_plugin.close = demux_mpeg_block_close;
- this->demux_plugin.get_status = demux_mpeg_block_get_status;
- this->demux_plugin.get_identifier = demux_mpeg_block_get_id;
-
- return (demux_plugin_t *) this;
+ switch (iface) {
+
+ case 1:
+ // FIXME xine_debug = xd;
+ this->demux_plugin.interface_version = DEMUXER_PLUGIN_IFACE_VERSION;
+ this->demux_plugin.open = demux_mpeg_block_open;
+ this->demux_plugin.start = demux_mpeg_block_start;
+ this->demux_plugin.stop = demux_mpeg_block_stop;
+ this->demux_plugin.close = demux_mpeg_block_close;
+ this->demux_plugin.get_status = demux_mpeg_block_get_status;
+ this->demux_plugin.get_identifier = demux_mpeg_block_get_id;
+
+ return (demux_plugin_t *) this;
+ break;
+
+ default:
+ fprintf(stderr,
+ "Demuxer plugin doesn't support plugin API version %d.\n"
+ "PLUGIN DISABLED.\n"
+ "This means there's a version mismatch between xine and this "
+ "demuxer plugin.\nInstalling current input plugins should help.\n",
+ iface);
+ return NULL;
+ }
}
diff --git a/src/input/Makefile.am b/src/input/Makefile.am
index b30549404..db9224a44 100644
--- a/src/input/Makefile.am
+++ b/src/input/Makefile.am
@@ -3,35 +3,40 @@
##
#CFLAGS += @GLOBAL_CFLAGS@
-CFLAGS += -D_FILE_OFFSET_BITS=64 -Wall -DXINE_COMPILE
+CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64 -Wall -DXINE_COMPILE
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
libdir = $(XINE_PLUGINDIR)
-#lib_LTLIBRARIES = input_file.la input_net.la input_dvd.la input_vcd.la \
-# input_stdin_fifo.la
-lib_LTLIBRARIES = input_file.la
+##
+# IMPORTANT:
+# ---------
+# All of xine input plugins should be named like the scheme "xineplug_inp_"
+#
+
+#lib_LTLIBRARIES = xineplug_inp_net.la xineplug_inp_dvd.la \
+# xineplug_inp_vcd.la xineplug_inp_stdin_fifo.la \
+# xineplug_inp_rtp.la
+lib_LTLIBRARIES = xineplug_inp_file.la
-#input_dvd_la_SOURCES = input_dvd.c dvd_udf.c
-#input_dvd_la_LDFLAGS = -avoid-version -module -Wl,-soname,input_dvd.so
-#input_dvd_la_LIBADD =
+xineplug_inp_file_la_SOURCES = input_file.c
+xineplug_inp_file_la_LDFLAGS = -avoid-version -module
-input_file_la_SOURCES = input_file.c
-input_file_la_LDFLAGS = -avoid-version -module -Wl,-soname,input_file.so
-input_file_la_LIBADD =
+#xineplug_inp_dvd_la_SOURCES = input_dvd.c dvd_udf.c
+#xineplug_inp_dvd_la_LDFLAGS = -avoid-version -module
-#input_net_la_SOURCES = input_net.c
-#input_net_la_LDFLAGS = -avoid-version -module -Wl,-soname,input_net.so
-#input_net_la_LIBADD =
+#xineplug_inp_net_la_SOURCES = input_net.c
+#xineplug_inp_net_la_LDFLAGS = -avoid-version -module
-#input_vcd_la_SOURCES = input_vcd.c
-#input_vcd_la_LDFLAGS = -avoid-version -module -Wl,-soname,input_vcd.so
-#input_vcd_la_LIBADD =
+#xineplug_inp_vcd_la_SOURCES = input_vcd.c
+#xineplug_inp_vcd_la_LDFLAGS = -avoid-version -module
-#input_stdin_fifo_la_SOURCES = input_stdin_fifo.c
-#input_stdin_fifo_la_LDFLAGS = -avoid-version -module -Wl,-soname,input_stdin_fifo.so
+#xineplug_inp_stdin_fifo_la_SOURCES = input_stdin_fifo.c
+#xineplug_inp_stdin_fifo_la_LDFLAGS = -avoid-version -module
+#xineplug_inp_rtp_la_SOURCES = input_rtp.c
+#xineplug_inp_rtp_la_LDFLAGS = -avoid-version -module
include_HEADERS = input_plugin.h
noinst_HEADERS = dvd_udf.h
diff --git a/src/input/input_file.c b/src/input/input_file.c
index 28741e437..782127961 100644
--- a/src/input/input_file.c
+++ b/src/input/input_file.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: input_file.c,v 1.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: input_file.c,v 1.3 2001/04/21 00:14:40 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -150,7 +150,7 @@ static char *file_plugin_get_identifier (void) {
static input_plugin_t plugin_info = {
- INPUT_INTERFACE_VERSION,
+ INPUT_PLUGIN_IFACE_VERSION,
file_plugin_get_capabilities,
file_plugin_open,
file_plugin_read,
diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h
index 002c1b650..718fe6226 100644
--- a/src/input/input_plugin.h
+++ b/src/input/input_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: input_plugin.h,v 1.1 2001/04/18 22:34:05 f1rmb Exp $
+ * $Id: input_plugin.h,v 1.2 2001/04/21 00:14:41 f1rmb Exp $
*/
#ifndef HAVE_INPUT_PLUGIN_H
@@ -28,7 +28,7 @@
#include "buffer.h"
#include "configfile.h"
-#define INPUT_INTERFACE_VERSION 1
+#define INPUT_PLUGIN_IFACE_VERSION 1
#ifndef CLUT_T
#define CLUT_T
@@ -170,9 +170,5 @@ typedef struct input_plugin_s
* try to initialize the plugin with given interface version
* and configuration options
*/
-input_plugin_t *get_input_plugin (int requested_interface,
- config_values_t *config);
-
-
#endif
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am
index 48c7ee604..80f1329ae 100644
--- a/src/libw32dll/Makefile.am
+++ b/src/libw32dll/Makefile.am
@@ -1,26 +1,36 @@
+
+EXTRA_DIST = stubs.s
+
# CFLAGS = @BUILD_LIB_STATIC@ -I wine -D__WINE__ -Ddbg_printf=__vprintf -DTRACE=__vprintf -fno-omit-frame-pointer
# CFLAGS = -I wine -D__WINE__ -Ddbg_printf=__vprintf -DTRACE=__vprintf -fno-omit-frame-pointer @X_CFLAGS@
-
-CFLAGS = @BUILD_LIB_STATIC@ -I wine -fno-omit-frame-pointer \
+CFLAGS = -I wine -fno-omit-frame-pointer \
-DWIN32_PATH=\"@w32_path@\" -pipe
SUBDIRS = wine
if HAVE_W32DLL
-w32dll_lib = libw32dll.la
+w32dll_codec = xineplug_codec_w32dll.la
endif
-noinst_LTLIBRARIES = $(w32dll_lib)
+LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
-libw32dll_la_SOURCES = afl.c elfdll.c module.c pe_resource.c \
- resource.c win32.c driver.c ext.c \
- pe_image.c registry.c vfl.c ##w32codec.c
+libdir = $(XINE_PLUGINDIR)
-libw32dll_la_LIBADD = stubs.lo
+##
+# IMPORTANT:
+# ---------
+# All of xine codecs should be named like the scheme "xineplug_codec_"
+#
+lib_LTLIBRARIES = $(w32dll_codec)
-noinst_HEADERS = loader.h registry.h win32.h wineacm.h w32codec.h
+xineplug_codec_w32dll_la_SOURCES = afl.c elfdll.c module.c \
+ pe_resource.c resource.c win32.c driver.c ext.c \
+ pe_image.c registry.c vfl.c ##FIXME: w32codec.c
+xineplug_codec_w32dll_la_LDFLAGS = -avoid-version -module
+xineplug_codec_w32dll_la_LIBADD = stubs.lo
+
+noinst_HEADERS = loader.h registry.h win32.h wineacm.h w32codec.h
-EXTRA_DIST = stubs.s
stubs.lo: stubs.s
$(CC) -c $(top_srcdir)/src/libw32dll/stubs.s -o stubs.lo
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index 993659dc1..8608b16b5 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -6,20 +6,15 @@ CFLAGS = @GLOBAL_CFLAGS@
lib_LTLIBRARIES = libxine.la
-if HAVE_W32DLL
-W32_LIBS = $(top_srcdir)/src/libw32dll/libw32dll.la
-endif
-
##libxine_la_SOURCES = xine.c buffer.c metronom.c configfile.c \
## monitor.c utils.c audio_decoder.c video_decoder.c load_plugins.c
-libxine_la_SOURCES = metronom.c configfile.c monitor.c utils.c cpu_accel.c
+libxine_la_SOURCES = metronom.c configfile.c monitor.c utils.c cpu_accel.c \
+ load_plugins.c
libxine_la_DEPENDENCIES = libsdeps
libxine_la_LIBADD = \
- $(top_srcdir)/src/demuxers/libdemux.la \
$(top_srcdir)/src/libmpeg2/libmpeg2.la \
$(top_srcdir)/src/libac3/libac3.la \
$(top_srcdir)/src/libmpg123/libmpg123.la \
- $(W32_LIBS) \
## $(top_srcdir)/src/libspudec/libspudec.la \
$(THREAD_LIBS) \
$(DYNAMIC_LD_LIBS)
@@ -41,11 +36,9 @@ debug:
libsdeps:
-## @cd $(top_builddir)/src/demuxers && $(MAKE) libdemux.la
-## @cd $(top_builddir)/src/libmpeg2 && $(MAKE) libmpeg2.la
-## @cd $(top_builddir)/src/libac3 && $(MAKE) libac3.la
-## @cd $(top_builddir)/src/libmpg123 && $(MAKE) libmpg123.la
-##@W32DLL_DEP@ @cd $(top_builddir)/src/libw32dll && $(MAKE) libw32dll.la
+ @cd $(top_builddir)/src/libmpeg2 && $(MAKE) libmpeg2.la
+ @cd $(top_builddir)/src/libac3 && $(MAKE) libac3.la
+ @cd $(top_builddir)/src/libmpg123 && $(MAKE) libmpg123.la
## @cd $(top_builddir)/src/libspudec && $(MAKE) libspudec.la
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index ebd94bec2..29d18bf44 100644
--- a/src/xine-engine/load_plugins.c
+++ b/src/xine-engine/load_plugins.c
@@ -17,10 +17,10 @@
* 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.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: load_plugins.c,v 1.3 2001/04/21 00:14:41 f1rmb Exp $
*
*
- * Load input/demux/audio_out/video_out plugins
+ * Load input/demux/audio_out/video_out/codec plugins
*
*/
@@ -33,6 +33,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include <dlfcn.h>
+#include <string.h>
#include "xine_internal.h"
#include "demuxers/demux.h"
@@ -41,23 +42,16 @@
#include "configfile.h"
#include "monitor.h"
-/* debugging purposes only */
-extern uint32_t xine_debug;
-
/*
*
*/
-void xine_load_demux_plugins (xine_t *this) {
+void load_demux_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
DIR *dir;
- this->demuxer_plugins[0] = *(init_demux_mpeg (xine_debug));
- this->demuxer_plugins[1] = *(init_demux_mpeg_block (xine_debug));
- this->demuxer_plugins[2] = *(init_demux_avi (xine_debug));
- this->demuxer_plugins[3] = *(init_demux_mpeg_audio (xine_debug));
- this->demuxer_plugins[4] = *(init_demux_mpeg_elem (xine_debug));
- this->num_demuxer_plugins = 5;
+ this->num_demuxer_plugins = 0;
- dir = opendir (XINE_DEMUXDIR) ;
+ dir = opendir (XINE_PLUGINDIR) ;
if (dir) {
struct dirent *pEntry;
@@ -68,7 +62,9 @@ void xine_load_demux_plugins (xine_t *this) {
int nLen = strlen (pEntry->d_name);
- if ((strncasecmp(pEntry->d_name, "demux_", 6) == 0) &&
+ 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'))) {
@@ -77,7 +73,7 @@ void xine_load_demux_plugins (xine_t *this) {
* demux plugin found => load it
*/
- sprintf (str, "%s/%s", XINE_DEMUXDIR, pEntry->d_name);
+ sprintf (str, "%s/%s", XINE_PLUGINDIR, pEntry->d_name);
if(!(plugin = dlopen (str, RTLD_LAZY))) {
fprintf(stderr, "%s(%d): %s doesn't seem to be installed (%s)\n",
@@ -85,21 +81,19 @@ void xine_load_demux_plugins (xine_t *this) {
exit(1);
}
else {
- void *(*getinfo) (fifobuf_functions_t *, uint32_t);
+ void *(*initplug) (int, config_values_t *);
- if((getinfo = dlsym(plugin, "demux_plugin_getinfo")) != NULL) {
- demux_functions_t *dxp;
+ if((initplug = dlsym(plugin, "init_demuxer_plugin")) != NULL) {
+ demux_plugin_t *dxp;
- dxp = (demux_functions_t *) getinfo(this->fifo_funcs, xine_debug);
- dxp->handle = plugin;
- dxp->filename = str;
+ dxp = (demux_plugin_t *) initplug(iface_version, config);
this->demuxer_plugins[this->num_demuxer_plugins] = *dxp;
-
- printf("demux plugin found : %s(%s)\n",
- this->demuxer_plugins[this->num_demuxer_plugins].filename,
- pEntry->d_name);
-
+ printf("demux plugin found : %s(ID: %s, iface: %d)\n",
+ str,
+ this->demuxer_plugins[this->num_demuxer_plugins].get_identifier(),
+ this->demuxer_plugins[this->num_demuxer_plugins].interface_version);
+
this->num_demuxer_plugins++;
}
@@ -113,9 +107,6 @@ void xine_load_demux_plugins (xine_t *this) {
}
}
- if (this->num_demuxer_plugins == 5)
- printf ("No extra demux plugins found in %s\n", XINE_DEMUXDIR);
-
/*
* init demuxer
*/
@@ -126,7 +117,8 @@ void xine_load_demux_plugins (xine_t *this) {
/*
*
*/
-void xine_load_input_plugins (xine_t *this) {
+void load_input_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
DIR *dir;
this->num_input_plugins = 0;
@@ -143,7 +135,9 @@ void xine_load_input_plugins (xine_t *this) {
int nLen = strlen (pEntry->d_name);
- if ((strncasecmp(pEntry->d_name, "input_", 6) == 0) &&
+ if ((strncasecmp(pEntry->d_name,
+ XINE_INPUT_PLUGIN_PREFIXNAME,
+ XINE_INPUT_PLUGIN_PREFIXNAME_LENGTH) == 0) &&
((pEntry->d_name[nLen-3]=='.')
&& (pEntry->d_name[nLen-2]=='s')
&& (pEntry->d_name[nLen-1]=='o'))) {
@@ -160,24 +154,20 @@ void xine_load_input_plugins (xine_t *this) {
exit(1);
}
else {
- void *(*getinfo) (uint32_t);
+ void *(*initplug) (int, config_values_t *);
- if((getinfo = dlsym(plugin, "input_plugin_getinfo")) != NULL) {
- input_plugin_t *ipp;
-
- ipp = (input_plugin_t *) getinfo(xine_debug);
- ipp->handle = plugin;
- ipp->filename = str;
- this->input_plugins[this->num_input_plugins] = *ipp;
-
- this->input_plugins[this->num_input_plugins].init();
-
- printf("input plugin found : %s(%s)\n",
- this->input_plugins[this->num_input_plugins].filename,
- pEntry->d_name);
+ if((initplug = dlsym(plugin, "init_demuxer_plugin")) != NULL) {
+ input_plugin_t *ip;
+
+ ip = (input_plugin_t *) initplug(iface_version, config);
+ this->input_plugins[this->num_input_plugins] = *ip;
+ printf("input plugin found : %s(ID: %s, iface: %d)\n",
+ str,
+ this->input_plugins[this->num_input_plugins].get_identifier(),
+ this->input_plugins[this->num_input_plugins].interface_version);
+
this->num_input_plugins++;
-
}
if(this->num_input_plugins > INPUT_PLUGIN_MAX) {
@@ -197,3 +187,21 @@ void xine_load_input_plugins (xine_t *this) {
}
}
+
+void load_video_out_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
+
+ // Not implemented yet.
+}
+
+void load_audio_out_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
+
+ // Not implemented yet.
+}
+
+void load_codec_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
+
+ // Not implemented yet.
+}
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index daad7cbf4..17cec6014 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.2 2001/04/19 09:46:57 f1rmb Exp $
+ * $Id: xine.c,v 1.3 2001/04/21 00:14:41 f1rmb Exp $
*
* top-level xine functions
*
@@ -442,9 +442,10 @@ static void xine_pause (xine_t *this) {
/*
*
*/
-xine_t *xine_init (vo_instance_t *vo, ao_instance_t *ao,
+xine_t *xine_init (vo_instance_t *vo,
+ ao_functions_t *ao,
gui_status_callback_func_t gui_status_callback,
- int demux_strategy, uint32_t debug_lvl) {
+ config_values_t *config, int demux_strategy, uint32_t debug_lvl) {
xine_t *this = xmalloc (sizeof (xine_t));
int err;
@@ -474,7 +475,7 @@ xine_t *xine_init (vo_instance_t *vo, ao_instance_t *ao,
* init demuxer
*/
- xine_load_demux_plugins();
+ load_demux_plugins(this, config, DEMUXER_PLUGIN_IFACE_VERSION);
this->audio_channel = 0;
this->spu_channel = -1;
@@ -508,7 +509,7 @@ xine_t *xine_init (vo_instance_t *vo, ao_instance_t *ao,
* load input plugins
*/
- xine_load_input_plugins ();
+ load_input_plugins (this, config, INPUT_PLUGIN_IFACE_VERSION);
printf ("xine_init: plugins loaded\n");
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 6ed35a91b..6df6a99e8 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.3 2001/04/20 18:01:55 guenter Exp $
+ * $Id: xine_internal.h,v 1.4 2001/04/21 00:14:41 f1rmb Exp $
*
*/
@@ -31,8 +31,14 @@
#include "audio_out.h"
#include "metronom.h"
-#define INPUT_PLUGIN_MAX 50
-#define DEMUXER_PLUGIN_MAX 50
+#define INPUT_PLUGIN_MAX 50
+#define DEMUXER_PLUGIN_MAX 50
+#define CODEC_PLUGIN_IFACE_VERSION 1
+#define CODEC_PLUGIN_MAX 50
+#define AUDIO_OUT_PLUGIN_IFACE_VERSION 1
+#define AUDIO_OUT_PLUGIN_MAX 50
+#define VIDEO_OUT_PLUGIN_IFACE_VERSIO 1
+#define VIDEO_OUT_PLUGIN_MAX 50
/* nStatus : current xine status */
typedef void (*gui_status_callback_func_t)(int nStatus);
@@ -202,11 +208,36 @@ char **xine_get_autoplay_input_plugin_ids (xine_t *this) ;
*/
char **xine_get_autoplay_mrls (xine_t *this, char *plugin_id);
+
/*
* Load input/demux/audio_out/video_out plugins
- * prototypes of load_plugins.c functions.
*/
-void xine_load_demux_plugins (xine_t *this);
-void xine_load_input_plugins (xine_t *this);
+/* plugin names scheme */
+#define XINE_INPUT_PLUGIN_PREFIXNAME "xineplug_inp_"
+#define XINE_INPUT_PLUGIN_PREFIXNAME_LENGTH 13
+
+#define XINE_DEMUXER_PLUGIN_PREFIXNAME "xineplug_dmx_"
+#define XINE_DEMUXER_PLUGIN_PREFIXNAME_LENGTH 13
+
+#define XINE_VIDEO_OUT_PLUGIN_PREFIXNAME "xineplug_vo_out_"
+#define XINE_VIDEO_OUT_PLUGIN_PREFIXNAME_LENGTH 16
+
+#define XINE_AUDIO_OUT_PLUGIN_PREFIXNAME "xineplug_ao_out_"
+#define XINE_AUDIO_OUT_PLUGIN_PREFIXNAME_LENGTH 16
+
+#define XINE_CODEC_PLUGIN_PREFIXNAME "xineplug_codec_"
+#define XINE_CODEC_PLUGIN_PREFIXNAME_LENGTH 15
+
+/* prototypes of load_plugins.c functions. */
+void load_demux_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
+void load_input_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
+void load_video_out_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
+void load_audio_out_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
+void load_codec_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
#endif