summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-07-14 12:50:33 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-07-14 12:50:33 +0000
commitdfd980788abf3d0905a24204bf8d0554dc4d8a77 (patch)
tree3e63c268028cbe158efee41dc36f8089afaa0e4c /src/demuxers
parent85eb608c7a602f971f779106c812b48f6c2cd030 (diff)
downloadxine-lib-dfd980788abf3d0905a24204bf8d0554dc4d8a77.tar.gz
xine-lib-dfd980788abf3d0905a24204bf8d0554dc4d8a77.tar.bz2
cleaned up and finished spu_thread removal
CVS patchset: 275 CVS date: 2001/07/14 12:50:33
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux.h6
-rw-r--r--src/demuxers/demux_avi.c45
-rw-r--r--src/demuxers/demux_elem.c45
-rw-r--r--src/demuxers/demux_mpeg.c45
-rw-r--r--src/demuxers/demux_mpeg_block.c65
-rw-r--r--src/demuxers/demux_mpgaudio.c51
6 files changed, 104 insertions, 153 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h
index 247425ea7..8518b6f81 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.5 2001/06/16 18:03:22 guenter Exp $
+ * $Id: demux.h,v 1.6 2001/07/14 12:50:34 guenter Exp $
*/
#ifndef HAVE_DEMUX_H
@@ -31,7 +31,7 @@
#include "input_plugin.h"
#endif
-#define DEMUXER_PLUGIN_IFACE_VERSION 1
+#define DEMUXER_PLUGIN_IFACE_VERSION 2
#define DEMUX_OK 0
#define DEMUX_FINISHED 1
@@ -85,7 +85,7 @@ struct demux_plugin_s
*/
void (*start) (demux_plugin_t *this, fifo_buffer_t *video_fifo,
- fifo_buffer_t *audio_fifo, fifo_buffer_t *spu_fifo,
+ fifo_buffer_t *audio_fifo,
off_t pos, gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb) ;
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index cee6babee..c1edff642 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.22 2001/07/04 14:13:47 uid56437 Exp $
+ * $Id: demux_avi.c,v 1.23 2001/07/14 12:50:34 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -901,7 +901,6 @@ static int demux_avi_get_status (demux_plugin_t *this_gen) {
static void demux_avi_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- fifo_buffer_t *spu_fifo,
off_t pos,
gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb)
@@ -1072,32 +1071,26 @@ static char *demux_avi_get_id(void) {
demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) {
- demux_avi_t *this = xmalloc (sizeof (demux_avi_t));
+ demux_avi_t *this;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- switch (iface) {
-
- case 1:
-
- 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;
-
- 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",
+ if (iface != 2) {
+ 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 input plugins should help.\n",
iface);
return NULL;
}
+
+ this = xmalloc (sizeof (demux_avi_t));
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
+ 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;
}
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 121d92bb0..a1022be17 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.13 2001/06/21 17:34:23 guenter Exp $
+ * $Id: demux_elem.c,v 1.14 2001/07/14 12:50:34 guenter Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -176,7 +176,6 @@ static int demux_mpeg_elem_get_status (demux_plugin_t *this_gen) {
static void demux_mpeg_elem_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- fifo_buffer_t *spu_fifo,
off_t pos,
gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb) {
@@ -313,33 +312,27 @@ static void demux_mpeg_elem_close (demux_plugin_t *this) {
*/
demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) {
- demux_mpeg_elem_t *this = malloc (sizeof (demux_mpeg_elem_t));
+ demux_mpeg_elem_t *this;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- switch (iface) {
-
- case 1:
-
- this->demux_plugin.interface_version = DEMUX_MPEG_ELEM_IFACE_VERSION;
- this->demux_plugin.open = demux_mpeg_elem_open;
- this->demux_plugin.start = demux_mpeg_elem_start;
- this->demux_plugin.stop = demux_mpeg_elem_stop;
- this->demux_plugin.close = demux_mpeg_elem_close;
- this->demux_plugin.get_status = demux_mpeg_elem_get_status;
- this->demux_plugin.get_identifier = demux_mpeg_elem_get_id;
-
- return &this->demux_plugin;
- 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",
+ if (iface != 2) {
+ 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 input plugins should help.\n",
iface);
return NULL;
}
+
+ this = malloc (sizeof (demux_mpeg_elem_t));
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
+ this->demux_plugin.interface_version = DEMUX_MPEG_ELEM_IFACE_VERSION;
+ this->demux_plugin.open = demux_mpeg_elem_open;
+ this->demux_plugin.start = demux_mpeg_elem_start;
+ this->demux_plugin.stop = demux_mpeg_elem_stop;
+ this->demux_plugin.close = demux_mpeg_elem_close;
+ this->demux_plugin.get_status = demux_mpeg_elem_get_status;
+ this->demux_plugin.get_identifier = demux_mpeg_elem_get_id;
+
+ return &this->demux_plugin;
}
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index bc17bb9bc..09fe6a23d 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.24 2001/07/04 17:10:24 uid32519 Exp $
+ * $Id: demux_mpeg.c,v 1.25 2001/07/14 12:50:34 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -590,7 +590,6 @@ static int demux_mpeg_get_status (demux_plugin_t *this_gen) {
static void demux_mpeg_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- fifo_buffer_t *spu_fifo,
off_t pos,
gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb)
@@ -760,32 +759,26 @@ static void demux_mpeg_close (demux_plugin_t *this) {
demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) {
- demux_mpeg_t *this = xmalloc (sizeof (demux_mpeg_t));
+ demux_mpeg_t *this;
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- switch (iface) {
-
- case 1:
-
- 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;
-
- 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",
+ if (iface != 2) {
+ 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 input plugins should help.\n",
iface);
return NULL;
}
+
+ this = xmalloc (sizeof (demux_mpeg_t));
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
+ 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;
}
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 5120c4683..e66b06560 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.25 2001/07/13 23:43:12 jcdutton Exp $
+ * $Id: demux_mpeg_block.c,v 1.26 2001/07/14 12:50:34 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -47,7 +47,6 @@ typedef struct demux_mpeg_block_s {
fifo_buffer_t *audio_fifo;
fifo_buffer_t *video_fifo;
- fifo_buffer_t *spu_fifo;
input_plugin_t *input;
@@ -372,10 +371,6 @@ static void *demux_mpeg_block_loop (void *this_gen) {
this->audio_fifo->put (this->audio_fifo, buf);
}
-/* buf = this->spu_fifo->buffer_pool_alloc (this->spu_fifo); */
- buf->type = BUF_CONTROL_END;
- buf->decoder_info[0] = 0; /* stream finished */
-/* this->spu_fifo->put (this->spu_fifo, buf); */
}
pthread_exit(NULL);
@@ -416,12 +411,6 @@ static void demux_mpeg_block_stop (demux_plugin_t *this_gen) {
this->audio_fifo->put (this->audio_fifo, buf);
}
-/* buf = this->spu_fifo->buffer_pool_alloc (this->spu_fifo); */
- buf->type = BUF_CONTROL_END;
- buf->decoder_info[0] = 1; /* forced */
-
-/* this->spu_fifo->put (this->spu_fifo, buf); */
-
}
static int demux_mpeg_block_get_status (demux_plugin_t *this_gen) {
@@ -433,7 +422,6 @@ static int demux_mpeg_block_get_status (demux_plugin_t *this_gen) {
static void demux_mpeg_block_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- fifo_buffer_t *spu_fifo,
off_t pos,
gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb)
@@ -444,7 +432,6 @@ static void demux_mpeg_block_start (demux_plugin_t *this_gen,
this->video_fifo = video_fifo;
this->audio_fifo = audio_fifo;
- this->spu_fifo = spu_fifo;
this->next_mrl_cb = next_mrl_cb;
this->branched_cb = branched_cb;
@@ -465,10 +452,6 @@ static void demux_mpeg_block_start (demux_plugin_t *this_gen,
this->audio_fifo->put (this->audio_fifo, buf);
}
-/* buf = this->spu_fifo->buffer_pool_alloc (this->spu_fifo); */
- buf->type = BUF_CONTROL_START;
-/* this->spu_fifo->put (this->spu_fifo, buf); */
-
if((this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) != 0) {
int num_buffers = NUM_PREVIEW_BUFFERS;
@@ -612,34 +595,28 @@ static void demux_mpeg_block_close (demux_plugin_t *this) {
demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) {
- demux_mpeg_block_t *this = xmalloc (sizeof (demux_mpeg_block_t));
-
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- switch (iface) {
+ demux_mpeg_block_t *this;
- case 1:
-
- 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;
-
- this->scratch = xmalloc_aligned (512, 4096);
-
- 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",
+ if (iface != 2) {
+ 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 input plugins should help.\n",
iface);
return NULL;
}
+
+ this = xmalloc (sizeof (demux_mpeg_block_t));
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
+ 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;
+
+ this->scratch = xmalloc_aligned (512, 4096);
+
+ return (demux_plugin_t *) this;
}
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 15825aa86..7da1e26cf 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.14 2001/07/03 21:30:38 guenter Exp $
+ * $Id: demux_mpgaudio.c,v 1.15 2001/07/14 12:50:34 guenter Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -177,10 +177,9 @@ static int demux_mpgaudio_get_status (demux_plugin_t *this_gen) {
}
static void demux_mpgaudio_start (demux_plugin_t *this_gen,
- fifo_buffer_t *video_fifo,
- fifo_buffer_t *audio_fifo,
- fifo_buffer_t *spu_fifo,
- off_t pos,
+ fifo_buffer_t *video_fifo,
+ fifo_buffer_t *audio_fifo,
+ off_t pos,
gui_get_next_mrl_cb_t next_mrl_cb,
gui_branched_cb_t branched_cb) {
demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen;
@@ -290,32 +289,28 @@ static void demux_mpgaudio_close (demux_plugin_t *this) {
}
demux_plugin_t *init_demuxer_plugin(int iface, config_values_t *config) {
- demux_mpgaudio_t *this = malloc (sizeof (demux_mpgaudio_t));
- xine_debug = config->lookup_int (config, "xine_debug", 0);
-
- switch (iface) {
-
- case 1:
-
- this->demux_plugin.interface_version = DEMUX_MPGAUDIO_IFACE_VERSION;
- this->demux_plugin.open = demux_mpgaudio_open;
- this->demux_plugin.start = demux_mpgaudio_start;
- this->demux_plugin.stop = demux_mpgaudio_stop;
- this->demux_plugin.close = demux_mpgaudio_close;
- this->demux_plugin.get_status = demux_mpgaudio_get_status;
- this->demux_plugin.get_identifier = demux_mpgaudio_get_id;
-
- return &this->demux_plugin;
- break;
+ demux_mpgaudio_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",
+ if (iface != 2) {
+ 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 input plugins should help.\n",
iface);
return NULL;
}
+
+ this = malloc (sizeof (demux_mpgaudio_t));
+ xine_debug = config->lookup_int (config, "xine_debug", 0);
+
+ this->demux_plugin.interface_version = DEMUX_MPGAUDIO_IFACE_VERSION;
+ this->demux_plugin.open = demux_mpgaudio_open;
+ this->demux_plugin.start = demux_mpgaudio_start;
+ this->demux_plugin.stop = demux_mpgaudio_stop;
+ this->demux_plugin.close = demux_mpgaudio_close;
+ this->demux_plugin.get_status = demux_mpgaudio_get_status;
+ this->demux_plugin.get_identifier = demux_mpgaudio_get_id;
+
+ return &this->demux_plugin;
}
+