summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2002-10-26 22:00:49 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2002-10-26 22:00:49 +0000
commitbf501e53fd241877e00cfb6031435884fc9364be (patch)
treedc0d48592c68487bf39e937aec67f84ef8a2a033 /src
parentb730835d1d0ba82856b6c70d83d5572f06dad839 (diff)
downloadxine-lib-bf501e53fd241877e00cfb6031435884fc9364be.tar.gz
xine-lib-bf501e53fd241877e00cfb6031435884fc9364be.tar.bz2
make demuxers return their status so xine engine can check if demuxers fail to send headers
CVS patchset: 3026 CVS date: 2002/10/26 22:00:49
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_asf.c23
-rw-r--r--src/demuxers/demux_avi.c4
-rw-r--r--src/demuxers/demux_cda.c4
-rw-r--r--src/demuxers/demux_elem.c4
-rw-r--r--src/demuxers/demux_film.c4
-rw-r--r--src/demuxers/demux_fli.c4
-rw-r--r--src/demuxers/demux_idcin.c4
-rw-r--r--src/demuxers/demux_mpeg.c4
-rw-r--r--src/demuxers/demux_mpeg_block.c4
-rw-r--r--src/demuxers/demux_mpgaudio.c4
-rw-r--r--src/demuxers/demux_ogg.c4
-rw-r--r--src/demuxers/demux_pes.c4
-rw-r--r--src/demuxers/demux_qt.c4
-rw-r--r--src/demuxers/demux_roq.c4
-rw-r--r--src/demuxers/demux_ts.c4
-rw-r--r--src/demuxers/demux_wav.c4
-rw-r--r--src/demuxers/demux_wc3movie.c4
17 files changed, 44 insertions, 43 deletions
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index fc6af91df..2cbb790d9 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.70 2002/10/23 20:26:32 guenter Exp $
+ * $Id: demux_asf.c,v 1.71 2002/10/26 22:00:49 guenter Exp $
*
* demultiplexer for asf streams
*
@@ -239,9 +239,7 @@ static uint8_t get_byte (demux_asf_t *this) {
/* printf ("%02x ", buf); */
if (i != 1) {
-#ifdef LOG
printf ("demux_asf: end of data\n");
-#endif
this->status = DEMUX_FINISHED;
}
@@ -1215,7 +1213,7 @@ static void demux_asf_dispose (demux_plugin_t *this_gen) {
static int demux_asf_get_status (demux_plugin_t *this_gen) {
demux_asf_t *this = (demux_asf_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static void demux_asf_send_headers (demux_plugin_t *this_gen) {
@@ -1233,11 +1231,6 @@ static void demux_asf_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- /*
- * send start buffer
- */
- xine_demux_control_start(this->stream);
-
/* will get overridden later */
this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
@@ -1264,9 +1257,17 @@ static void demux_asf_send_headers (demux_plugin_t *this_gen) {
printf ("demux_asf: asf_read_header failed.\n");
- this->status = DEMUX_FINISHED;
+ this->status = DEMUX_FINISHED;
+ pthread_mutex_unlock (&this->mutex);
return;
} else {
+
+ /*
+ * send start buffer
+ */
+ xine_demux_control_start(this->stream);
+
+
this->header_size = this->input->get_current_pos (this->input);
this->stream->meta_info[XINE_META_INFO_TITLE] =
@@ -1290,7 +1291,7 @@ static void demux_asf_send_headers (demux_plugin_t *this_gen) {
sum_rate += bitrate;
- printf("demux_asf: stream: %d, bitrate %d bps, ", stream_id, bitrate);
+ printf("demux_asf: stream: %d, bitrate %d bps\n", stream_id, bitrate);
if ((buf_type == BUF_VIDEO_BASE) &&
(bitrate > max_vrate || this->video_stream_id == 0)) {
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 40cdabce5..896f054ca 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.127 2002/10/23 20:26:32 guenter Exp $
+ * $Id: demux_avi.c,v 1.128 2002/10/26 22:00:50 guenter Exp $
*
* demultiplexer for avi streams
*
@@ -1236,7 +1236,7 @@ static void demux_avi_dispose (demux_plugin_t *this_gen) {
static int demux_avi_get_status (demux_plugin_t *this_gen) {
demux_avi_t *this = (demux_avi_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static void demux_avi_send_headers (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_cda.c b/src/demuxers/demux_cda.c
index 993d011ab..8bb747684 100644
--- a/src/demuxers/demux_cda.c
+++ b/src/demuxers/demux_cda.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_cda.c,v 1.26 2002/10/12 17:11:58 jkeil Exp $
+ * $Id: demux_cda.c,v 1.27 2002/10/26 22:00:50 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -166,7 +166,7 @@ static void demux_cda_stop (demux_plugin_t *this_gen) {
static int demux_cda_get_status (demux_plugin_t *this_gen) {
demux_cda_t *this = (demux_cda_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
/*
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 387078b17..da500d6a5 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.53 2002/10/12 17:11:58 jkeil Exp $
+ * $Id: demux_elem.c,v 1.54 2002/10/26 22:00:51 guenter Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -166,7 +166,7 @@ static void demux_mpeg_elem_stop (demux_plugin_t *this_gen) {
static int demux_mpeg_elem_get_status (demux_plugin_t *this_gen) {
demux_mpeg_elem_t *this = (demux_mpeg_elem_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c
index 28d9af15e..02f5e9063 100644
--- a/src/demuxers/demux_film.c
+++ b/src/demuxers/demux_film.c
@@ -21,7 +21,7 @@
* For more information on the FILM file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_film.c,v 1.37 2002/10/24 22:48:25 guenter Exp $
+ * $Id: demux_film.c,v 1.38 2002/10/26 22:00:51 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -723,7 +723,7 @@ static void demux_film_dispose (demux_plugin_t *this_gen) {
static int demux_film_get_status (demux_plugin_t *this_gen) {
demux_film_t *this = (demux_film_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_film_get_stream_length (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c
index 7fe88ee49..51ea2b0e5 100644
--- a/src/demuxers/demux_fli.c
+++ b/src/demuxers/demux_fli.c
@@ -22,7 +22,7 @@
* avoid while programming a FLI decoder, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_fli.c,v 1.19 2002/10/24 22:48:25 guenter Exp $
+ * $Id: demux_fli.c,v 1.20 2002/10/26 22:00:51 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -351,7 +351,7 @@ static void demux_fli_dispose (demux_plugin_t *this) {
static int demux_fli_get_status (demux_plugin_t *this_gen) {
demux_fli_t *this = (demux_fli_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_fli_get_stream_length (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c
index 68e41dde7..6d279a63c 100644
--- a/src/demuxers/demux_idcin.c
+++ b/src/demuxers/demux_idcin.c
@@ -63,7 +63,7 @@
* - if any bytes exceed 63, do not shift the bytes at all before
* transmitting them to the video decoder
*
- * $Id: demux_idcin.c,v 1.19 2002/10/23 02:29:02 tmmm Exp $
+ * $Id: demux_idcin.c,v 1.20 2002/10/26 22:00:51 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -500,7 +500,7 @@ static void demux_idcin_dispose (demux_plugin_t *this) {
static int demux_idcin_get_status (demux_plugin_t *this_gen) {
demux_idcin_t *this = (demux_idcin_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_idcin_get_stream_length (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index 890aba2c1..b71d094d4 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.89 2002/10/25 02:05:27 guenter Exp $
+ * $Id: demux_mpeg.c,v 1.90 2002/10/26 22:00:51 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -851,7 +851,7 @@ static void demux_mpeg_stop (demux_plugin_t *this_gen) {
static int demux_mpeg_get_status (demux_plugin_t *this_gen) {
demux_mpeg_t *this = (demux_mpeg_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static void demux_mpeg_send_headers (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 98bbceafd..480f34650 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.129 2002/10/26 21:47:29 mroi Exp $
+ * $Id: demux_mpeg_block.c,v 1.130 2002/10/26 22:00:52 guenter Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -857,7 +857,7 @@ static void demux_mpeg_block_dispose (demux_plugin_t *this_gen) {
static int demux_mpeg_block_get_status (demux_plugin_t *this_gen) {
demux_mpeg_block_t *this = (demux_mpeg_block_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_mpeg_detect_blocksize(demux_mpeg_block_t *this,
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index d3471e245..11cda2bd7 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.70 2002/10/21 22:25:50 tmattern Exp $
+ * $Id: demux_mpgaudio.c,v 1.71 2002/10/26 22:00:53 guenter Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -396,7 +396,7 @@ static void demux_mpgaudio_stop (demux_plugin_t *this_gen) {
static int demux_mpgaudio_get_status (demux_plugin_t *this_gen) {
demux_mpgaudio_t *this = (demux_mpgaudio_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static uint32_t demux_mpgaudio_read_head(input_plugin_t *input) {
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index bdeb50b4e..7a349f1d5 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.46 2002/10/19 17:42:52 guenter Exp $
+ * $Id: demux_ogg.c,v 1.47 2002/10/26 22:00:53 guenter Exp $
*
* demultiplexer for ogg streams
*
@@ -900,7 +900,7 @@ static void demux_ogg_stop (demux_plugin_t *this_gen) {
static int demux_ogg_get_status (demux_plugin_t *this_gen) {
demux_ogg_t *this = (demux_ogg_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int send_headers (demux_ogg_t *this) {
diff --git a/src/demuxers/demux_pes.c b/src/demuxers/demux_pes.c
index bce7d5fa8..250366000 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.39 2002/10/12 17:11:58 jkeil Exp $
+ * $Id: demux_pes.c,v 1.40 2002/10/26 22:00:53 guenter Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -384,7 +384,7 @@ static void demux_pes_stop (demux_plugin_t *this_gen) {
static int demux_pes_get_status (demux_plugin_t *this_gen) {
demux_pes_t *this = (demux_pes_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_pes_start (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 74df2900a..9714a324d 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -30,7 +30,7 @@
* build_frame_table
* free_qt_info
*
- * $Id: demux_qt.c,v 1.102 2002/10/26 02:32:52 guenter Exp $
+ * $Id: demux_qt.c,v 1.103 2002/10/26 22:00:53 guenter Exp $
*
*/
@@ -1890,7 +1890,7 @@ static void demux_qt_dispose (demux_plugin_t *this_gen) {
static int demux_qt_get_status (demux_plugin_t *this_gen) {
demux_qt_t *this = (demux_qt_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_qt_get_stream_length (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c
index 75dcc482a..57e18c012 100644
--- a/src/demuxers/demux_roq.c
+++ b/src/demuxers/demux_roq.c
@@ -21,7 +21,7 @@
* For more information regarding the RoQ file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: demux_roq.c,v 1.23 2002/10/23 21:49:41 guenter Exp $
+ * $Id: demux_roq.c,v 1.24 2002/10/26 22:00:54 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -467,7 +467,7 @@ static void demux_roq_dispose (demux_plugin_t *this) {
static int demux_roq_get_status (demux_plugin_t *this_gen) {
demux_roq_t *this = (demux_roq_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_roq_get_stream_length (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 2c56b1fbc..c6f316adc 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.57 2002/10/12 17:11:59 jkeil Exp $
+ * $Id: demux_ts.c,v 1.58 2002/10/26 22:00:54 guenter Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -1408,7 +1408,7 @@ static int demux_ts_get_status(demux_plugin_t *this_gen) {
demux_ts *this = (demux_ts *)this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_ts_open(demux_plugin_t *this_gen, input_plugin_t *input,
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c
index dc58f5f9a..95916710c 100644
--- a/src/demuxers/demux_wav.c
+++ b/src/demuxers/demux_wav.c
@@ -20,7 +20,7 @@
* MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net)
* based on WAV specs that are available far and wide
*
- * $Id: demux_wav.c,v 1.20 2002/10/23 04:58:16 tmmm Exp $
+ * $Id: demux_wav.c,v 1.21 2002/10/26 22:00:55 guenter Exp $
*
*/
@@ -395,7 +395,7 @@ static void demux_wav_dispose (demux_plugin_t *this_gen) {
static int demux_wav_get_status (demux_plugin_t *this_gen) {
demux_wav_t *this = (demux_wav_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
/* return the approximate length in seconds */
diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c
index 8a8cc9a35..2d38bbb13 100644
--- a/src/demuxers/demux_wc3movie.c
+++ b/src/demuxers/demux_wc3movie.c
@@ -22,7 +22,7 @@
* For more information on the MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_wc3movie.c,v 1.18 2002/10/23 01:32:27 tmmm Exp $
+ * $Id: demux_wc3movie.c,v 1.19 2002/10/26 22:00:55 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -734,7 +734,7 @@ static void demux_mve_dispose (demux_plugin_t *this_gen) {
static int demux_mve_get_status (demux_plugin_t *this_gen) {
demux_mve_t *this = (demux_mve_t *) this_gen;
- return (this->thread_running?DEMUX_OK:DEMUX_FINISHED);
+ return this->status;
}
static int demux_mve_get_stream_length (demux_plugin_t *this_gen) {