summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux.h13
-rw-r--r--src/demuxers/demux_asf.c8
-rw-r--r--src/demuxers/demux_avi.c9
-rw-r--r--src/demuxers/demux_elem.c8
-rw-r--r--src/demuxers/demux_mpeg.c10
-rw-r--r--src/demuxers/demux_mpeg_block.c41
-rw-r--r--src/demuxers/demux_mpgaudio.c9
-rw-r--r--src/demuxers/demux_ogg.c11
-rw-r--r--src/demuxers/demux_pes.c10
-rw-r--r--src/demuxers/demux_qt.c9
-rw-r--r--src/demuxers/demux_ts.c8
11 files changed, 55 insertions, 81 deletions
diff --git a/src/demuxers/demux.h b/src/demuxers/demux.h
index 7a52364d8..c020b2e79 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.10 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux.h,v 1.11 2001/10/20 02:01:51 guenter Exp $
*/
#ifndef HAVE_DEMUX_H
@@ -35,7 +35,7 @@ extern "C" {
#include "input_plugin.h"
#endif
-#define DEMUXER_PLUGIN_IFACE_VERSION 4
+#define DEMUXER_PLUGIN_IFACE_VERSION 5
#define DEMUX_OK 0
#define DEMUX_FINISHED 1
@@ -51,11 +51,6 @@ extern "C" {
#define STAGE_BY_CONTENT 1
#define STAGE_BY_EXTENSION 2
-/* called when xine tries to branch seamlessly to the next mrl */
-typedef char* (*gui_get_next_mrl_cb_t) (void);
-/* called when xine branched successfully to the next mrl */
-typedef void (*gui_branched_cb_t) (void);
-
/*
* a demux plugin must implement these functions
*/
@@ -95,9 +90,7 @@ struct demux_plugin_s
void (*start) (demux_plugin_t *this, fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb) ;
+ off_t start_pos, int start_time);
/*
* stop & kill demux thread, free resources associated with current
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 1f9f53c8c..5ef3ae971 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.2 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_asf.c,v 1.3 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for asf streams
*
@@ -943,9 +943,7 @@ static int demux_asf_get_status (demux_plugin_t *this_gen) {
static void demux_asf_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb) {
+ off_t start_pos, int start_time) {
demux_asf_t *this = (demux_asf_t *) this_gen;
buf_element_t *buf;
@@ -1081,7 +1079,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_asf_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 52b3f06cf..ceb544497 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.45 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_avi.c,v 1.46 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -865,10 +865,7 @@ 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,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
buf_element_t *buf;
demux_avi_t *this = (demux_avi_t *) this_gen;
uint32_t video_pts = 0;
@@ -1200,7 +1197,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_avi_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index d316639a9..4416c072f 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.23 2001/10/19 14:35:52 guenter Exp $
+ * $Id: demux_elem.c,v 1.24 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -180,9 +180,7 @@ 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,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb) {
+ off_t start_pos, int start_time) {
demux_mpeg_elem_t *this = (demux_mpeg_elem_t *) this_gen;
buf_element_t *buf;
@@ -329,7 +327,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_elem_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index a3d0f5939..832340f52 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.37 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_mpeg.c,v 1.38 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -660,10 +660,8 @@ 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,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
+
demux_mpeg_t *this = (demux_mpeg_t *) this_gen;
buf_element_t *buf;
int err;
@@ -852,7 +850,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 38c051dfb..b49d5cec1 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.55 2001/10/18 14:29:44 jkeil Exp $
+ * $Id: demux_mpeg_block.c,v 1.56 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -46,6 +46,8 @@ static uint32_t xine_debug;
typedef struct demux_mpeg_block_s {
demux_plugin_t demux_plugin;
+ xine_t *xine;
+
fifo_buffer_t *audio_fifo;
fifo_buffer_t *video_fifo;
@@ -61,9 +63,6 @@ typedef struct demux_mpeg_block_s {
int send_end_buffers;
int warned; /* encryption warning */
- gui_get_next_mrl_cb_t next_mrl_cb;
- gui_branched_cb_t branched_cb;
-
char cur_mrl[256];
uint8_t *scratch;
@@ -84,7 +83,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
buf = this->input->read_block (this->input, this->video_fifo, this->blocksize);
if (buf==NULL) {
- char *next_mrl;
+ xine_next_mrl_event_t event;
printf ("demux_mpeg_block: read_block failed\n");
@@ -92,8 +91,14 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
* check if seamless branching is possible
*/
- if (this->next_mrl_cb
- && (next_mrl = this->next_mrl_cb () )) {
+ event.event.type = XINE_EVENT_NEED_NEXT_MRL;
+ event.handled = 0;
+ xine_send_event (this->xine, &event.event);
+
+ if (event.handled) {
+
+ char *next_mrl = event.mrl;
+
printf ("demux_mpeg_block: checking if we can branch to %s\n", next_mrl);
if (this->input->is_branch_possible
@@ -103,10 +108,10 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m
this->input->close (this->input);
this->input->open (this->input, next_mrl);
-
- if (this->branched_cb)
- this->branched_cb ();
+ event.event.type = XINE_EVENT_BRANCHED;
+ xine_send_event (this->xine, &event.event);
+
buf = this->input->read_block (this->input, this->video_fifo, this->blocksize);
if (!buf) {
this->status = DEMUX_FINISHED;
@@ -711,10 +716,7 @@ 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,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
demux_mpeg_block_t *this = (demux_mpeg_block_t *) this_gen;
buf_element_t *buf;
@@ -722,8 +724,6 @@ static void demux_mpeg_block_start (demux_plugin_t *this_gen,
this->video_fifo = video_fifo;
this->audio_fifo = audio_fifo;
- this->next_mrl_cb = next_mrl_cb;
- this->branched_cb = branched_cb;
/*
* send start buffer
@@ -947,15 +947,16 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpeg_block_t *this;
config_values_t *config;
- if (iface != 4) {
- 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",
+ if (iface != 5) {
+ 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",
iface);
return NULL;
}
this = xmalloc (sizeof (demux_mpeg_block_t));
+ this->xine = xine;
config = xine->config;
xine_debug = config->lookup_int (config, "xine_debug", 0);
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 94c0cb30e..da4421b99 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.23 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_mpgaudio.c,v 1.24 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -299,9 +299,8 @@ static uint32_t demux_mpgaudio_read_head(input_plugin_t *input)
static void demux_mpgaudio_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb) {
+ off_t start_pos, int start_time) {
+
demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen;
buf_element_t *buf;
int err;
@@ -425,7 +424,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_mpgaudio_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index ea9a73578..0a56e4555 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.4 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_ogg.c,v 1.5 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for ogg streams
*
@@ -269,10 +269,7 @@ static int demux_ogg_get_status (demux_plugin_t *this_gen) {
static void demux_ogg_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
demux_ogg_t *this = (demux_ogg_t *) this_gen;
buf_element_t *buf;
@@ -386,7 +383,7 @@ static char *demux_ogg_get_id(void) {
static int demux_ogg_get_stream_length (demux_plugin_t *this_gen) {
- demux_ogg_t *this = (demux_ogg_t *) this_gen;
+ /* demux_ogg_t *this = (demux_ogg_t *) this_gen; */
return 0;
}
@@ -396,7 +393,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_ogg_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c
index 25075b389..0a9e9abee 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.9 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_pes.c,v 1.10 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -400,10 +400,8 @@ static int demux_pes_get_status (demux_plugin_t *this_gen) {
static void demux_pes_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
+
demux_pes_t *this = (demux_pes_t *) this_gen;
buf_element_t *buf;
int err;
@@ -564,7 +562,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_pes_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 1c4cd67d1..0380d142b 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.7 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_qt.c,v 1.8 2001/10/20 02:01:51 guenter Exp $
*
* demultiplexer for quicktime streams, based on:
*
@@ -4206,10 +4206,7 @@ static int demux_qt_detect_compressors (demux_qt_t *this) {
static void demux_qt_start (demux_plugin_t *this_gen,
fifo_buffer_t *video_fifo,
fifo_buffer_t *audio_fifo,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb)
-{
+ off_t start_pos, int start_time) {
demux_qt_t *this = (demux_qt_t *) this_gen;
buf_element_t *buf;
@@ -4382,7 +4379,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
demux_qt_t *this;
config_values_t *config;
- if (iface != 4) {
+ if (iface != 5) {
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",
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 982e466a4..65d9e7a9a 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.18 2001/10/17 20:33:09 guenter Exp $
+ * $Id: demux_ts.c,v 1.19 2001/10/20 02:01:51 guenter Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -877,9 +877,7 @@ static int demux_ts_open(demux_plugin_t *this_gen, input_plugin_t *input,
static void demux_ts_start(demux_plugin_t *this_gen,
fifo_buffer_t *fifoVideo,
fifo_buffer_t *fifoAudio,
- off_t start_pos, int start_time,
- gui_get_next_mrl_cb_t next_mrl_cb,
- gui_branched_cb_t branched_cb) {
+ off_t start_pos, int start_time) {
demux_ts *this = (demux_ts *)this_gen;
buf_element_t *buf;
@@ -973,7 +971,7 @@ demux_plugin_t *init_demuxer_plugin(int iface, xine_t *xine) {
config_values_t *config;
int i;
- if (iface != 4) {
+ if (iface != 5) {
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",