summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-05-24 23:15:40 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2001-05-24 23:15:40 +0000
commitcd60edea62f35966d0ce54cc51133f1d6ea3931d (patch)
tree4a9a3c8aaac73c215bd706faae3b8527eaa5639d
parentf2e7ffa88dedcd7ce06f89dc5eb96eb766af4bed (diff)
downloadxine-lib-cd60edea62f35966d0ce54cc51133f1d6ea3931d.tar.gz
xine-lib-cd60edea62f35966d0ce54cc51133f1d6ea3931d.tar.bz2
Add new gui_data_exchange property: GUI_DATA_EX_DRAWABLE_CHANGED, it
inform video driver about the new drawable to use. Use pthread_exit(NULL) at end of threads. Add extra checks in stream detection in demux_mpeg.c about mpeg1 support only. CVS patchset: 80 CVS date: 2001/05/24 23:15:40
-rw-r--r--configure.in2
-rw-r--r--src/demuxers/demux_avi.c4
-rw-r--r--src/demuxers/demux_elem.c4
-rw-r--r--src/demuxers/demux_mpeg.c48
-rw-r--r--src/demuxers/demux_mpeg_block.c4
-rw-r--r--src/demuxers/demux_mpgaudio.c4
-rw-r--r--src/video_out/video_out_x11.h6
-rw-r--r--src/video_out/video_out_xv.c6
-rw-r--r--src/xine-engine/audio_decoder.c4
-rw-r--r--src/xine-engine/video_decoder.c4
-rw-r--r--src/xine-engine/video_out.c4
11 files changed, 65 insertions, 25 deletions
diff --git a/configure.in b/configure.in
index 0504c3696..ede40b13b 100644
--- a/configure.in
+++ b/configure.in
@@ -214,7 +214,7 @@ AC_TRY_CFLAGS("-fschedule-insns2", f_si="-fschedule-insns2", f_si="")
AC_TRY_CFLAGS("-mwide-multiply", m_wm="-mwide-multiply", m_wm="")
dnl Common cflags for all platforms
-COMMON_CFLAGS="-Wall -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE"
+COMMON_CFLAGS="-Wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE"
enable_w32dll="no"
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 149fa13ce..6becaaa48 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.8 2001/05/02 12:25:42 guenter Exp $
+ * $Id: demux_avi.c,v 1.9 2001/05/24 23:15:40 f1rmb Exp $
*
* demultiplexer for avi streams
*
@@ -797,7 +797,7 @@ static void *demux_avi_loop (void *this_gen) {
xprintf (VERBOSE|DEMUX, "demux_avi: demux loop finished.\n");
- return NULL;
+ pthread_exit(NULL);
}
static void demux_avi_stop (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index a142ddd4d..dbd38b8e3 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.5 2001/04/29 23:22:32 f1rmb Exp $
+ * $Id: demux_elem.c,v 1.6 2001/05/24 23:15:40 f1rmb Exp $
*
* demultiplexer for elementary mpeg streams
*
@@ -109,7 +109,7 @@ static void *demux_mpeg_elem_loop (void *this_gen) {
buf->type = BUF_CONTROL_END;
this->audio_fifo->put (this->audio_fifo, buf);
- return NULL;
+ pthread_exit(NULL);
}
/*
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index 72ff2ca92..719be6886 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.10 2001/05/24 15:31:30 guenter Exp $
+ * $Id: demux_mpeg.c,v 1.11 2001/05/24 23:15:40 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -147,6 +147,10 @@ static void parse_mpeg2_packet (demux_mpeg_t *this, int nID) {
buf = this->input->read_block (this->input, this->audio_fifo, nLen-4);
+ if (buf == NULL) {
+ this->status = DEMUX_FINISHED;
+ return ;
+ }
buf->type = BUF_AUDIO_AC3 + track;
buf->PTS = pts;
buf->DTS = 0 ; /* FIXME */
@@ -186,6 +190,10 @@ static void parse_mpeg2_packet (demux_mpeg_t *this, int nID) {
buf = this->input->read_block (this->input, this->audio_fifo, nLen);
+ if (buf == NULL) {
+ this->status = DEMUX_FINISHED;
+ return ;
+ }
buf->type = BUF_AUDIO_MPEG + track;
buf->PTS = pts;
buf->DTS = 0; /* FIXME */
@@ -226,6 +234,10 @@ static void parse_mpeg2_packet (demux_mpeg_t *this, int nID) {
buf = this->input->read_block (this->input, this->audio_fifo, nLen);
+ if (buf == NULL) {
+ this->status = DEMUX_FINISHED;
+ return ;
+ }
buf->type = BUF_VIDEO_MPEG;
buf->PTS = pts;
buf->DTS = 0;
@@ -334,6 +346,10 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int nID)
buf = this->input->read_block (this->input, this->audio_fifo, nLen);
+ if (buf == NULL) {
+ this->status = DEMUX_FINISHED;
+ return ;
+ }
buf->type = BUF_AUDIO_MPEG + track ;
buf->PTS = pts;
buf->DTS = 0; /* FIXME */
@@ -347,6 +363,10 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int nID)
buf = this->input->read_block (this->input, this->video_fifo, nLen);
+ if (buf == NULL) {
+ this->status = DEMUX_FINISHED;
+ return ;
+ }
buf->type = BUF_VIDEO_MPEG;
buf->PTS = pts;
buf->DTS = 0; /* FIXME */
@@ -464,7 +484,7 @@ static void *demux_mpeg_loop (void *this_gen) {
xprintf (VERBOSE|DEMUX, "demux loop finished (status: %d, buf:%x)\n",
this->status, w);
- return NULL;
+ pthread_exit(NULL);
}
static void demux_mpeg_stop (demux_plugin_t *this_gen) {
@@ -537,15 +557,27 @@ static int demux_mpeg_open(demux_plugin_t *this_gen,
switch(buf[3]) {
case 0xba:
- if((buf[4] & 0xf0) == 0x20)
- this->input = input;
- return DEMUX_CAN_HANDLE;
+ if((buf[4] & 0xf0) == 0x20) {
+ uint32_t pckbuf ;
+
+ pckbuf = read_bytes (this, 1);
+ if ((pckbuf>>4) != 4) {
+ this->input = input;
+ return DEMUX_CAN_HANDLE;
+ }
+ }
break;
case 0xe0:
- if((buf[6] & 0xc0) != 0x80)
- this->input = input;
- return DEMUX_CAN_HANDLE;
+ if((buf[6] & 0xc0) != 0x80) {
+ uint32_t pckbuf ;
+
+ pckbuf = read_bytes (this, 1);
+ if ((pckbuf>>4) != 4) {
+ this->input = input;
+ return DEMUX_CAN_HANDLE;
+ }
+ }
break;
}
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 4cff99930..4c5b01bae 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.6 2001/04/29 23:22:32 f1rmb Exp $
+ * $Id: demux_mpeg_block.c,v 1.7 2001/05/24 23:15:40 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -337,7 +337,7 @@ static void *demux_mpeg_block_loop (void *this_gen) {
buf->type = BUF_CONTROL_END;
this->audio_fifo->put (this->audio_fifo, buf);
- return NULL;
+ pthread_exit(NULL);
}
static void demux_mpeg_block_stop (demux_plugin_t *this_gen) {
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 4d2f3cf83..71b2946cf 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.4 2001/04/29 23:22:32 f1rmb Exp $
+ * $Id: demux_mpgaudio.c,v 1.5 2001/05/24 23:15:40 f1rmb Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -272,7 +272,7 @@ static void *demux_mpgaudio_loop (void *this_gen) {
buf->type = BUF_CONTROL_END;
this->audio_fifo->put (this->audio_fifo, buf);
- return NULL;
+ pthread_exit(NULL);
}
static void demux_mpgaudio_stop (demux_plugin_t *this_gen) {
diff --git a/src/video_out/video_out_x11.h b/src/video_out/video_out_x11.h
index 40481b1f5..60232d6c9 100644
--- a/src/video_out/video_out_x11.h
+++ b/src/video_out/video_out_x11.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: video_out_x11.h,v 1.3 2001/05/19 21:53:46 guenter Exp $
+ * $Id: video_out_x11.h,v 1.4 2001/05/24 23:15:40 f1rmb Exp $
*
* structs and defines specific to all x11 related output plugins
* (any x11 base xine ui should include this)
@@ -88,6 +88,10 @@ typedef struct {
#define GUI_DATA_EX_DEST_POS_SIZE_CHANGED 0
/* xevent *data */
#define GUI_DATA_EX_COMPLETION_EVENT 1
+/* Drawable has changed */
+#define GUI_DATA_EX_DRAWABLE_CHANGED 2
+
+
#endif
diff --git a/src/video_out/video_out_xv.c b/src/video_out/video_out_xv.c
index 3cebddcd6..7bf50d881 100644
--- a/src/video_out/video_out_xv.c
+++ b/src/video_out/video_out_xv.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_out_xv.c,v 1.19 2001/05/24 21:41:28 guenter Exp $
+ * $Id: video_out_xv.c,v 1.20 2001/05/24 23:15:40 f1rmb Exp $
*
* video_out_xv.c, X11 video extension interface for xine
*
@@ -446,6 +446,10 @@ static int xv_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *dat
/* FIXME : implement */
break;
+
+ case GUI_DATA_EX_DRAWABLE_CHANGED:
+ this->drawable = (Drawable) data;
+ break;
}
return 0;
diff --git a/src/xine-engine/audio_decoder.c b/src/xine-engine/audio_decoder.c
index d34b8397a..cdd73ec6b 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.8 2001/05/24 15:31:31 guenter Exp $
+ * $Id: audio_decoder.c,v 1.9 2001/05/24 23:15:40 f1rmb Exp $
*
*
* functions that implement audio decoding
@@ -158,7 +158,7 @@ void *audio_decoder_loop (void *this_gen) {
buf->free_buffer (buf);
}
- return NULL;
+ pthread_exit(NULL);
}
void audio_decoder_init (xine_t *this) {
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index a7ac3a3a5..543d6f20f 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.13 2001/05/24 15:31:31 guenter Exp $
+ * $Id: video_decoder.c,v 1.14 2001/05/24 23:15:40 f1rmb Exp $
*
*/
@@ -111,7 +111,7 @@ void *video_decoder_loop (void *this_gen) {
buf->free_buffer (buf);
}
- return NULL;
+ pthread_exit(NULL);
}
void video_decoder_init (xine_t *this) {
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 36b0f604d..c1a206a3e 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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_out.c,v 1.7 2001/05/24 21:41:28 guenter Exp $
+ * $Id: video_out.c,v 1.8 2001/05/24 23:15:40 f1rmb Exp $
*
*/
@@ -241,7 +241,7 @@ static void *video_out_loop (void *this_gen) {
xprintf (VERBOSE|VIDEO, "video_out : passing to video driver, image with pts = %d\n", pts);
this->driver->display_frame (this->driver, img);
}
- return NULL;
+ pthread_exit(NULL);
}