summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-04-24 15:47:32 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-04-24 15:47:32 +0000
commit1cc52e26e9d712583e2c1ea23ee5bfbb87e25255 (patch)
treebd398cdf464a4aa45c26a6750886f626b60f596d
parentdbd6a0cfee0d90385cccbf7e6a6d28534918b8a0 (diff)
downloadxine-lib-1cc52e26e9d712583e2c1ea23ee5bfbb87e25255.tar.gz
xine-lib-1cc52e26e9d712583e2c1ea23ee5bfbb87e25255.tar.bz2
fixed buffer.c and more cleanups
CVS patchset: 19 CVS date: 2001/04/24 15:47:32
-rw-r--r--m4/xine.m42
-rw-r--r--src/libmpeg2/Makefile.am6
-rw-r--r--src/libw32dll/Makefile.am10
-rw-r--r--src/xine-engine/Makefile.am2
-rw-r--r--src/xine-engine/audio_decoder.c19
-rw-r--r--src/xine-engine/buffer.c189
-rw-r--r--src/xine-engine/buffer.h28
-rw-r--r--src/xine-engine/load_plugins.c99
-rw-r--r--src/xine-engine/video_decoder.c17
-rw-r--r--src/xine-engine/xine.c13
-rw-r--r--src/xine-engine/xine_internal.h13
11 files changed, 165 insertions, 233 deletions
diff --git a/m4/xine.m4 b/m4/xine.m4
index 3194429d8..f89d46a99 100644
--- a/m4/xine.m4
+++ b/m4/xine.m4
@@ -169,7 +169,7 @@ main ()
CFLAGS="$CFLAGS $XINE_CFLAGS"
LIBS="$LIBS $XINE_LIBS"
AC_TRY_LINK([
-#include <xine/xine.h>
+#include <xine.h>
#include <stdio.h>
], [ return ((XINE_MAJOR_VERSION) || (XINE_MINOR_VERSION) || (XINE_SUB_VERSION)); ],
[ echo "*** The test program compiled, but did not run. This usually means"
diff --git a/src/libmpeg2/Makefile.am b/src/libmpeg2/Makefile.am
index 8eadd03a0..3faea8fc9 100644
--- a/src/libmpeg2/Makefile.am
+++ b/src/libmpeg2/Makefile.am
@@ -6,14 +6,14 @@ LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
libdir = $(XINE_PLUGINDIR)
-lib_LTLIBRARIES = xineplug_vo_dec_mpeg2.la
+lib_LTLIBRARIES = xineplug_decode_mpeg2.la
#libmpeg2_la_SOURCES = slice.c header.c stats.c idct.c motion_comp.c\
# decode.c idct_mmx.c motion_comp_mmx.c
-xineplug_vo_dec_mpeg2_la_SOURCES = slice.c header.c stats.c idct.c \
+xineplug_decode_mpeg2_la_SOURCES = slice.c header.c stats.c idct.c \
motion_comp.c decode.c idct_mmx.c motion_comp_mmx.c xine_decoder.c
-xineplug_vo_dec_mpeg2_la_LDFLAGS = -avoid-version -module
+xineplug_decode_mpeg2_la_LDFLAGS = -avoid-version -module
noinst_HEADERS = vlc.h mpeg2.h mpeg2_internal.h
diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am
index 80f1329ae..a825428c0 100644
--- a/src/libw32dll/Makefile.am
+++ b/src/libw32dll/Makefile.am
@@ -9,7 +9,7 @@ CFLAGS = -I wine -fno-omit-frame-pointer \
SUBDIRS = wine
if HAVE_W32DLL
-w32dll_codec = xineplug_codec_w32dll.la
+w32dll_codec = xineplug_decode_w32dll.la
endif
LIBTOOL = $(SHELL) $(top_builddir)/libtool-nofpic
@@ -19,15 +19,15 @@ libdir = $(XINE_PLUGINDIR)
##
# IMPORTANT:
# ---------
-# All of xine codecs should be named like the scheme "xineplug_codec_"
+# All of xine codecs should be named like the scheme "xineplug_decode_"
#
lib_LTLIBRARIES = $(w32dll_codec)
-xineplug_codec_w32dll_la_SOURCES = afl.c elfdll.c module.c \
+xineplug_decode_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
+xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module
+xineplug_decode_w32dll_la_LIBADD = stubs.lo
noinst_HEADERS = loader.h registry.h win32.h wineacm.h w32codec.h
diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am
index b07b728ee..a58623dce 100644
--- a/src/xine-engine/Makefile.am
+++ b/src/xine-engine/Makefile.am
@@ -8,7 +8,7 @@ lib_LTLIBRARIES = libxine.la
##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 buffer.c monitor.c utils.c cpu_accel.c \
load_plugins.c video_decoder.c audio_decoder.c
libxine_la_DEPENDENCIES = libsdeps
libxine_la_LIBADD = \
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index 13b21d0ab..691e68c3b 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/audio_decoder.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: audio_decoder.c,v 1.3 2001/04/23 22:43:59 f1rmb Exp $
+ * $Id: audio_decoder.c,v 1.4 2001/04/24 15:47:32 guenter Exp $
*
*
* functions that implement audio decoding
@@ -117,20 +117,7 @@ void *audio_decoder_loop (void *this_gen) {
void audio_decoder_init (xine_t *this) {
- int i;
-
- this->cur_audio_decoder_plugin = NULL;
- for (i=0; i<AUDIO_OUT_PLUGIN_MAX; i++)
- this->audio_decoder_plugins[i] = NULL;
-
- /* FIXME: dynamically load these
- this->audio_decoders[BUF_AC3AUDIO] = init_audio_decoder_ac3dec ();
- this->audio_decoders[BUF_MPEGAUDIO] = init_audio_decoder_mpg123 ();
- this->audio_decoders[BUF_MSAUDIO] = init_audio_decoder_msaudio ();
- this->audio_decoders[BUF_LINEARPCM] = init_audio_decoder_linearpcm ();
- */
-
- this->audio_fifo = fifo_buffer_new ();
+ this->audio_fifo = fifo_buffer_new (1500, 4096);
pthread_create (&this->audio_thread, NULL, audio_decoder_loop, this) ;
@@ -144,7 +131,7 @@ void audio_decoder_shutdown (xine_t *this) {
this->audio_fifo->clear(this->audio_fifo);
- buf = this->audio_fifo->buffer_pool_alloc ();
+ buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
buf->type = BUF_CONTROL_QUIT;
this->audio_fifo->put (this->audio_fifo, buf);
diff --git a/src/xine-engine/buffer.c b/src/xine-engine/buffer.c
index c45a93cb6..c8795e9e4 100644
--- a/src/xine-engine/buffer.c
+++ b/src/xine-engine/buffer.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: buffer.c,v 1.1 2001/04/18 22:36:01 f1rmb Exp $
+ * $Id: buffer.c,v 1.2 2001/04/24 15:47:32 guenter Exp $
*
*
* contents:
@@ -41,185 +41,168 @@
#include "utils.h"
/*
- * global variables
- */
-
-buf_element_t *gBufferPoolTop; /* a stack actually */
-pthread_mutex_t gBufferPoolMutex;
-pthread_cond_t gBufferPoolCondNotEmpty;
-int gBufferPoolNumFree;
-
-/*
* put a previously allocated buffer element back into the buffer pool
*/
-static void buffer_pool_free (buf_element_t *pBufElement) {
+static void buffer_pool_free (buf_element_t *element) {
- pthread_mutex_lock (&gBufferPoolMutex);
+ fifo_buffer_t *this = (fifo_buffer_t *) element->source;
- pBufElement->next = gBufferPoolTop;
- gBufferPoolTop = pBufElement;
+ pthread_mutex_lock (&this->buffer_pool_mutex);
- gBufferPoolNumFree++;
+ element->next = this->buffer_pool_top;
+ this->buffer_pool_top = element;
- pthread_cond_signal (&gBufferPoolCondNotEmpty);
+ this->buffer_pool_num_free++;
- pthread_mutex_unlock (&gBufferPoolMutex);
-}
+ pthread_cond_signal (&this->buffer_pool_cond_not_empty);
-/*
- * check if there are no more free elements
- */
-static int buffer_pool_isempty (void) {
- return gBufferPoolNumFree<7;
+ pthread_mutex_unlock (&this->buffer_pool_mutex);
}
/*
* check if there are no more free elements
*/
-static buf_element_t *buffer_pool_alloc (void) {
+static buf_element_t *buffer_pool_alloc (fifo_buffer_t *this) {
- buf_element_t *pBuf;
+ buf_element_t *buf;
- pthread_mutex_lock (&gBufferPoolMutex);
+ pthread_mutex_lock (&this->buffer_pool_mutex);
- while (!gBufferPoolTop) {
- pthread_cond_wait (&gBufferPoolCondNotEmpty, &gBufferPoolMutex);
+ while (!this->buffer_pool_top) {
+ pthread_cond_wait (&this->buffer_pool_cond_not_empty, &this->buffer_pool_mutex);
}
- pBuf = gBufferPoolTop;
- gBufferPoolTop = gBufferPoolTop->next;
- gBufferPoolNumFree--;
+ buf = this->buffer_pool_top;
+ this->buffer_pool_top = this->buffer_pool_top->next;
+ this->buffer_pool_num_free--;
- pthread_mutex_unlock (&gBufferPoolMutex);
+ pthread_mutex_unlock (&this->buffer_pool_mutex);
- return pBuf;
+ return buf;
}
/*
* append buffer element to fifo buffer
*/
-static void fifo_buffer_put (fifo_buffer_t *pFifo, buf_element_t *pBufElement) {
+static void fifo_buffer_put (fifo_buffer_t *fifo, buf_element_t *element) {
- pthread_mutex_lock (&pFifo->mMutex);
+ pthread_mutex_lock (&fifo->mutex);
- if (pFifo->mpLast)
- pFifo->mpLast->next = pBufElement;
+ if (fifo->last)
+ fifo->last->next = element;
else
- pFifo->mpFirst = pBufElement;
+ fifo->first = element;
- pFifo->mpLast = pBufElement;
- pBufElement->next = NULL;
+ fifo->last = element;
+ element->next = NULL;
- pthread_cond_signal (&pFifo->mNotEmpty);
+ pthread_cond_signal (&fifo->not_empty);
- pthread_mutex_unlock (&pFifo->mMutex);
+ pthread_mutex_unlock (&fifo->mutex);
}
/*
* get element from fifo buffer
*/
-static buf_element_t *fifo_buffer_get (fifo_buffer_t *pFifo) {
+static buf_element_t *fifo_buffer_get (fifo_buffer_t *fifo) {
- buf_element_t *pBuf;
+ buf_element_t *buf;
- pthread_mutex_lock (&pFifo->mMutex);
+ pthread_mutex_lock (&fifo->mutex);
- while (pFifo->mpFirst==NULL) {
- pthread_cond_wait (&pFifo->mNotEmpty, &pFifo->mMutex);
+ while (fifo->first==NULL) {
+ pthread_cond_wait (&fifo->not_empty, &fifo->mutex);
}
- pBuf = pFifo->mpFirst;
+ buf = fifo->first;
- pFifo->mpFirst = pFifo->mpFirst->next;
- if (pFifo->mpFirst==NULL)
- pFifo->mpLast = NULL;
+ fifo->first = fifo->first->next;
+ if (fifo->first==NULL)
+ fifo->last = NULL;
- pthread_mutex_unlock (&pFifo->mMutex);
+ pthread_mutex_unlock (&fifo->mutex);
- return pBuf;
+ return buf;
}
/*
* clear buffer (put all contained buffer elements back into buffer pool)
*/
-static void fifo_buffer_clear (fifo_buffer_t *pFifo) {
+static void fifo_buffer_clear (fifo_buffer_t *fifo) {
- buf_element_t *pBuf;
+ buf_element_t *buf;
- pthread_mutex_lock (&pFifo->mMutex);
+ pthread_mutex_lock (&fifo->mutex);
- while (pFifo->mpFirst != NULL) {
+ while (fifo->first != NULL) {
- pBuf = pFifo->mpFirst;
+ buf = fifo->first;
- pFifo->mpFirst = pFifo->mpFirst->next;
- if (pFifo->mpFirst==NULL)
- pFifo->mpLast = NULL;
+ fifo->first = fifo->first->next;
+ if (fifo->first==NULL)
+ fifo->last = NULL;
- buffer_pool_free (pBuf);
+ buffer_pool_free (buf);
}
- pthread_mutex_unlock (&pFifo->mMutex);
+ pthread_mutex_unlock (&fifo->mutex);
}
/*
* allocate and initialize new (empty) fifo buffer
*/
-static fifo_buffer_t *fifo_buffer_new (void) {
+fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size) {
- fifo_buffer_t *pFifo;
+ fifo_buffer_t *this;
+ int i;
+ int alignment = 2048;
+ char *multi_buffer = NULL;
- pFifo = xmalloc (sizeof (fifo_buffer_t));
+ this = xmalloc (sizeof (fifo_buffer_t));
- pFifo->mpFirst = NULL;
- pFifo->mpLast = NULL;
- pFifo->fifo_buffer_put = fifo_buffer_put;
- pFifo->fifo_buffer_get = fifo_buffer_get;
- pFifo->fifo_buffer_clear = fifo_buffer_clear;
+ this->first = NULL;
+ this->last = NULL;
+ this->put = fifo_buffer_put;
+ this->get = fifo_buffer_get;
+ this->clear = fifo_buffer_clear;
- pthread_mutex_init (&pFifo->mMutex, NULL);
- pthread_cond_init (&pFifo->mNotEmpty, NULL);
+ pthread_mutex_init (&this->mutex, NULL);
+ pthread_cond_init (&this->not_empty, NULL);
- return pFifo;
-}
+ /*
+ * init buffer pool, allocate nNumBuffers of buf_size bytes each
+ */
-/*
- * init buffer pool, allocate nNumBuffers of buf_size bytes each
- */
-fifobuf_functions_t *buffer_pool_init (int nNumBuffers, uint32_t buf_size) {
- int i;
- const int alignment = 2048;
- char *pMultiBuffer = NULL;
+ buf_size += buf_size % alignment;
- if ((buf_size % alignment) == 0) {
- printf ("Allocating %d buffers of %ld bytes in one chunk (alignment = %d)\n", nNumBuffers, (long int)buf_size, alignment);
- pMultiBuffer = xmalloc_aligned (alignment, nNumBuffers * buf_size);
- }
+ printf ("Allocating %d buffers of %ld bytes in one chunk (alignment = %d)\n",
+ num_buffers, (long int) buf_size, alignment);
+ multi_buffer = xmalloc_aligned (alignment, num_buffers * buf_size);
- gBufferPoolTop = NULL;
+ this->buffer_pool_top = NULL;
- pthread_mutex_init (&gBufferPoolMutex, NULL);
- pthread_cond_init (&gBufferPoolCondNotEmpty, NULL);
+ pthread_mutex_init (&this->buffer_pool_mutex, NULL);
+ pthread_cond_init (&this->buffer_pool_cond_not_empty, NULL);
- for (i = 0; i<nNumBuffers; i++) {
- buf_element_t *pBuf;
+ for (i = 0; i<num_buffers; i++) {
+ buf_element_t *buf;
- pBuf = xmalloc (sizeof (buf_element_t));
+ buf = xmalloc (sizeof (buf_element_t));
- if (pMultiBuffer != NULL) {
- pBuf->pMem = pMultiBuffer;
- pMultiBuffer += buf_size;
- }
- else
- pBuf->pMem = malloc_aligned (buf_size, alignment);
+ buf->mem = multi_buffer;
+ multi_buffer += buf_size;
- pBuf->nMaxSize = buf_size;
- pBuf->free_buffer = buffer_pool_free;
+ buf->max_size = buf_size;
+ buf->free_buffer = buffer_pool_free;
+ buf->source = this;
- buffer_pool_free (pBuf);
+ buffer_pool_free (buf);
}
- gBufferPoolNumFree = nNumBuffers;
+ this->buffer_pool_num_free = num_buffers;
- return &fifobuf_op;
+ return this;
}
+
+
+
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index a57d219ba..a82995eba 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.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: buffer.h,v 1.1 2001/04/18 22:36:05 f1rmb Exp $
+ * $Id: buffer.h,v 1.2 2001/04/24 15:47:32 guenter Exp $
*
*
* contents:
@@ -100,6 +100,9 @@ struct buf_element_s {
void (*free_buffer) (buf_element_t *buf);
+ void *source; /* pointer to source of this buffer for */
+ /* free_buffer */
+
} ;
typedef struct fifo_buffer_s fifo_buffer_t;
@@ -127,21 +130,24 @@ struct fifo_buffer_s
* buffer allocation functions
*/
- buf_element_t *(*buffer_pool_alloc) (void);
-
-} ;
+ buf_element_t *(*buffer_pool_alloc) (fifo_buffer_t *this);
-/*
- * allocate and initialize new (empty) fifo buffer
- */
+ /*
+ * private variables for buffer pool management
+ */
-fifo_buffer_t *fifo_buffer_new (void);
+ buf_element_t *buffer_pool_top; /* a stack actually */
+ pthread_mutex_t buffer_pool_mutex;
+ pthread_cond_t buffer_pool_cond_not_empty;
+ int buffer_pool_num_free;
+} ;
/*
- * init global buffer pool,
- * allocate nNumBuffers of buf_size bytes each
+ * allocate and initialize new (empty) fifo buffer,
+ * init buffer pool for it:
+ * allocate num_buffers of buf_size bytes each
*/
-void buffer_pool_init (int num_buffers, uint32_t buf_size);
+fifo_buffer_t *fifo_buffer_new (int num_buffers, uint32_t buf_size);
#endif
diff --git a/src/xine-engine/load_plugins.c b/src/xine-engine/load_plugins.c
index 4d274fb93..3321fb4c4 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.4 2001/04/23 22:43:59 f1rmb Exp $
+ * $Id: load_plugins.c,v 1.5 2001/04/24 15:47:32 guenter Exp $
*
*
* Load input/demux/audio_out/video_out/codec plugins
@@ -188,12 +188,31 @@ void load_input_plugins (xine_t *this,
}
-
-void load_video_decoder_plugins (xine_t *this,
- config_values_t *config, int iface_version) {
+/*
+ * load audio and video decoder plugins
+ */
+void load_decoder_plugins (xine_t *this,
+ config_values_t *config, int iface_version) {
DIR *dir;
+ int i;
+
+ /*
+ * clean up first
+ */
this->num_video_decoder_plugins = 0;
+ this->cur_video_decoder_plugin = NULL;
+ for (i=0; i<DECODER_PLUGIN_MAX; i++)
+ this->video_decoder_plugins[i] = NULL;
+
+ this->num_audio_decoder_plugins = 0;
+ this->cur_audio_decoder_plugin = NULL;
+ for (i=0; i<AUDIO_OUT_PLUGIN_MAX; i++)
+ this->audio_decoder_plugins[i] = NULL;
+
+ /*
+ * now scan for decoder plugins
+ */
dir = opendir (XINE_PLUGINDIR) ;
@@ -207,14 +226,14 @@ void load_video_decoder_plugins (xine_t *this,
int nLen = strlen (pEntry->d_name);
if ((strncasecmp(pEntry->d_name,
- XINE_VIDEO_DECODER_PLUGIN_PREFIXNAME,
- XINE_VIDEO_DECODER_PLUGIN_PREFIXNAME_LENGTH) == 0) &&
+ XINE_DECODER_PLUGIN_PREFIXNAME,
+ XINE_DECODER_PLUGIN_PREFIXNAME_LENGTH) == 0) &&
((pEntry->d_name[nLen-3]=='.')
&& (pEntry->d_name[nLen-2]=='s')
&& (pEntry->d_name[nLen-1]=='o'))) {
/*
- * video decoder plugin found => load it
+ * decoder plugin found => load it
*/
sprintf (str, "%s/%s", XINE_PLUGINDIR, pEntry->d_name);
@@ -227,6 +246,10 @@ void load_video_decoder_plugins (xine_t *this,
else {
void *(*initplug) (int, config_values_t *);
+ /*
+ * does this plugin provide an video decoder plugin?
+ */
+
if((initplug = dlsym(plugin, "init_video_decoder_plugin")) != NULL) {
video_decoder_t *vdp;
@@ -246,57 +269,16 @@ void load_video_decoder_plugins (xine_t *this,
" exiting.\n", __FILE__, __LINE__);
exit(1);
}
- }
- }
- }
- }
-
- this->cur_video_decoder_plugin = NULL;
-}
-
-void load_audio_decoder_plugins (xine_t *this,
- config_values_t *config, int iface_version) {
- DIR *dir;
- this->num_audio_decoder_plugins = 0;
+ /*
+ * does this plugin provide an audio decoder plugin?
+ */
- 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_AUDIO_DECODER_PLUGIN_PREFIXNAME,
- XINE_AUDIO_DECODER_PLUGIN_PREFIXNAME_LENGTH) == 0) &&
- ((pEntry->d_name[nLen-3]=='.')
- && (pEntry->d_name[nLen-2]=='s')
- && (pEntry->d_name[nLen-1]=='o'))) {
-
- /*
- * audio decoder plugin found => load it
- */
-
- 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",
- __FILE__, __LINE__, str, dlerror());
- exit(1);
- }
- else {
- void *(*initplug) (int, config_values_t *);
-
if((initplug = dlsym(plugin, "init_audio_decoder_plugin")) != NULL) {
- audio_decoder_t *vdp;
+ audio_decoder_t *adp;
- vdp = (audio_decoder_t *) initplug(iface_version, config);
- this->audio_decoder_plugins[this->num_audio_decoder_plugins] = vdp;
+ adp = (audio_decoder_t *) initplug(iface_version, config);
+ this->audio_decoder_plugins[this->num_audio_decoder_plugins] = adp;
printf("audio decoder plugin found : %s(ID: %s, iface: %d)\n",
str,
@@ -311,14 +293,18 @@ void load_audio_decoder_plugins (xine_t *this,
" exiting.\n", __FILE__, __LINE__);
exit(1);
}
+
+
}
}
}
}
+ this->cur_video_decoder_plugin = NULL;
this->cur_audio_decoder_plugin = NULL;
}
+
void load_video_out_plugins (xine_t *this,
config_values_t *config, int iface_version) {
@@ -329,11 +315,6 @@ void load_audio_out_plugins (xine_t *this,
}
-void load_codec_plugins (xine_t *this,
- config_values_t *config, int iface_version) {
-
-}
-
/*
vo_instance_t *load_video_output_plugin(char *filename, char *id) {
DIR *dir;
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 7112beec1..76a1807aa 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_decoder.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: video_decoder.c,v 1.6 2001/04/23 22:43:59 f1rmb Exp $
+ * $Id: video_decoder.c,v 1.7 2001/04/24 15:47:32 guenter Exp $
*
*/
@@ -110,18 +110,7 @@ void *video_decoder_loop (void *this_gen) {
void video_decoder_init (xine_t *this) {
- int i;
-
- this->cur_video_decoder_plugin = NULL;
- for (i=0; i<DECODER_PLUGIN_MAX; i++)
- this->video_decoder_plugins[i] = NULL;
-
- /* FIXME: load video decoder plugins
- this->video_decoders[0x00] = init_video_decoder_mpeg2dec ();
- this->video_decoders[0x03] = init_video_decoder_avi ();
- */
-
- this->video_fifo = fifo_buffer_new ();
+ this->video_fifo = fifo_buffer_new (1500, 4096);
pthread_create (&this->video_thread, NULL, video_decoder_loop, this) ;
@@ -135,7 +124,7 @@ void video_decoder_shutdown (xine_t *this) {
this->video_fifo->clear(this->video_fifo);
- buf = this->video_fifo->buffer_pool_alloc ();
+ buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
buf->type = BUF_CONTROL_QUIT;
this->video_fifo->put (this->video_fifo, buf);
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 63cdd01f0..178e93890 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.5 2001/04/23 00:34:59 guenter Exp $
+ * $Id: xine.c,v 1.6 2001/04/24 15:47:32 guenter Exp $
*
* top-level xine functions
*
@@ -59,17 +59,6 @@
/* debugging purposes only */
uint32_t xine_debug;
-/*
-#define TEST_FILE
-*/
-#ifdef TEST_FILE
-int gTestFile=-1;
-#endif
-
-/*
- * xine global variables
- */
-
void xine_notify_stream_finished (xine_t *this) {
printf ("xine_notify_stream_finished\n");
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 910f8be77..7357d25d3 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.8 2001/04/23 22:43:59 f1rmb Exp $
+ * $Id: xine_internal.h,v 1.9 2001/04/24 15:47:32 guenter Exp $
*
*/
@@ -336,11 +336,8 @@ void audio_decoder_shutdown (xine_t *this);
#define XINE_AUDIO_OUT_PLUGIN_PREFIXNAME "xineplug_ao_out_"
#define XINE_AUDIO_OUT_PLUGIN_PREFIXNAME_LENGTH 16
-#define XINE_AUDIO_DECODER_PLUGIN_PREFIXNAME "xineplug_ao_dec_"
-#define XINE_AUDIO_DECODER_PLUGIN_PREFIXNAME_LENGTH 16
-
-#define XINE_VIDEO_DECODER_PLUGIN_PREFIXNAME "xineplug_vo_dec_"
-#define XINE_VIDEO_DECODER_PLUGIN_PREFIXNAME_LENGTH 16
+#define XINE_DECODER_PLUGIN_PREFIXNAME "xineplug_decode_"
+#define XINE_DECODER_PLUGIN_PREFIXNAME_LENGTH 16
/* prototypes of load_plugins.c functions. */
void load_demux_plugins (xine_t *this,
@@ -351,7 +348,7 @@ 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);
+void load_decoder_plugins (xine_t *this,
+ config_values_t *config, int iface_version);
#endif