summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-10-26 02:12:27 +0000
committerJames Courtier-Dutton <jcdutton@users.sourceforge.net>2002-10-26 02:12:27 +0000
commitc17ea6b7d43feec4ea79de3e5934a2047cb3af8c (patch)
treed1c999af89984a42a6f2270974d443fd5d6b9f42
parent436452d17b68cbd6ca02e00cddf87c95c67cd3db (diff)
downloadxine-lib-c17ea6b7d43feec4ea79de3e5934a2047cb3af8c.tar.gz
xine-lib-c17ea6b7d43feec4ea79de3e5934a2047cb3af8c.tar.bz2
Remove assert(0), left over from testing.
dispose of event queue. CVS patchset: 2998 CVS date: 2002/10/26 02:12:27
-rw-r--r--src/demuxers/demux_mpeg_block.c8
-rw-r--r--src/input/input_dvd.c10
-rw-r--r--src/xine-engine/configfile.c6
-rw-r--r--src/xine-engine/video_decoder.c30
-rw-r--r--src/xine-utils/attributes.h2
5 files changed, 38 insertions, 18 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index 79b65c7f3..56e33d871 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.125 2002/10/25 15:36:16 mroi Exp $
+ * $Id: demux_mpeg_block.c,v 1.126 2002/10/26 02:12:27 jcdutton Exp $
*
* demultiplexer for mpeg 1/2 program streams
*
@@ -1091,9 +1091,11 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
input_plugin_t *input_gen) {
input_plugin_t *input = (input_plugin_t *) input_gen;
-
+ static int count = 0;
demux_mpeg_block_t *this;
- printf ("demux_mpeg_block:open_plugin:input ID=%s\n",input->input_class->get_identifier(input->input_class) );
+ count++;
+ printf ("demux_mpeg_block:open_plugin:input ID=%s count = %d\n",input->input_class->get_identifier(input->input_class), count );
+/* if (count > 1) assert (0); */
if (! (input->get_capabilities(input) & INPUT_CAP_SEEKABLE)) {
printf("demux_mpeg_block.c: not seekable, can't handle!\n");
return NULL;
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 18b437be5..06007f6b1 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,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: input_dvd.c,v 1.103 2002/10/25 15:36:19 mroi Exp $
+ * $Id: input_dvd.c,v 1.104 2002/10/26 02:12:27 jcdutton Exp $
*
*/
@@ -313,6 +313,7 @@ static void dvd_plugin_dispose (input_plugin_t *this_gen) {
trace_print("Called\n");
+ xine_event_dispose_queue (this->event_queue);
if(this->opened || this->dvdnav)
dvdnav_close(this->dvdnav);
this->dvdnav = NULL;
@@ -794,7 +795,7 @@ static void dvd_event_listener(void *this_gen, const xine_event_t *event) {
dvd_input_plugin_t *this = (dvd_input_plugin_t *) this_gen;
dvd_input_class_t *class = (dvd_input_class_t*)this->input_plugin.input_class;
config_values_t *config = class->config; /* Pointer to XineRC config file */
- printf("input_dvd:dvd_event_listener: EVENT=%d\n", event->type);
+ /* printf("input_dvd:dvd_event_listener: EVENT=%d\n", event->type); */
if(!this->dvdnav) {
return;
@@ -1369,6 +1370,7 @@ static input_plugin_t *open_plugin (input_class_t *class_gen, xine_stream_t *str
read_ahead_cb(this, &cache_entry);
#endif
+ dvdnav_set_readahead_flag(this->dvdnav, 1);
if(this->mode == MODE_TITLE) {
int tt, i, pr, found;
int titles;
@@ -1662,6 +1664,10 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.104 2002/10/26 02:12:27 jcdutton
+ * Remove assert(0), left over from testing.
+ * dispose of event queue.
+ *
* Revision 1.103 2002/10/25 15:36:19 mroi
* remove obviously obsolete INPUT_CAP_CLUT and INPUT_OPTIONAL_DATA_CLUT
*
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index bb086b671..e134d8f63 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.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: configfile.c,v 1.36 2002/10/23 11:44:31 jcdutton Exp $
+ * $Id: configfile.c,v 1.37 2002/10/26 02:12:27 jcdutton Exp $
*
* config object (was: file) management - implementation
*
@@ -37,9 +37,9 @@
#include "xineutils.h"
#include "xine_internal.h"
-
+/*
#define LOG
-
+*/
/*
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index e08a52a9b..a7dcddfdf 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.103 2002/10/21 12:11:02 jcdutton Exp $
+ * $Id: video_decoder.c,v 1.104 2002/10/26 02:12:27 jcdutton Exp $
*
*/
@@ -37,7 +37,7 @@
#define LOG
*/
-static spu_decoder_t* update_spu_decoder (xine_stream_t *stream, int type) {
+static void update_spu_decoder (xine_stream_t *stream, int type) {
int streamtype = (type>>16) & 0xFF;
@@ -56,7 +56,7 @@ static spu_decoder_t* update_spu_decoder (xine_stream_t *stream, int type) {
this->video_out);
*/
}
- return stream->spu_decoder_plugin;
+ return ;
}
void *video_decoder_loop (void *stream_gen) {
@@ -65,7 +65,6 @@ void *video_decoder_loop (void *stream_gen) {
xine_stream_t *stream = (xine_stream_t *) stream_gen;
int running = 1;
int streamtype;
- spu_decoder_t *spu_decoder;
static int prof_video_decode = -1;
static int prof_spu_decode = -1;
static uint32_t buftype_unknown = 0;
@@ -119,17 +118,28 @@ void *video_decoder_loop (void *stream_gen) {
DISC_STREAMSTART, 0);
break;
+/* case BUF_SPU_TEXT is not handled yet.
+ * There is a need to multiply plugins to be loaded at once.
+ * E.g. The DVD SPU decoder and the DVD NAV decoder need
+ * to be open at the same time for the entire DVD.
+ * BUF_SPU_TEXT can also happen at the same time as playing a DVD,
+ * so two or more subtitle plugins need to be able to co-exist at the same time.
+ * Currently, if we see a BUF_SPU_NAV and then a BUF_SPU_PACKAGE,
+ * we call dispose for changing to NAV to PACKAGE. This causes
+ * libspudec to looses NAV state, and thus no menus appear.
+ * As a work around, once libspudec is opened, we will never close it.
+ *
+ */
case BUF_SPU_SUBP_CONTROL:
case BUF_SPU_CLUT:
case BUF_SPU_PACKAGE:
- case BUF_SPU_TEXT:
case BUF_SPU_NAV:
xine_profiler_start_count (prof_spu_decode);
-
- spu_decoder = update_spu_decoder(stream, buf->type);
-
- if (spu_decoder) {
- spu_decoder->decode_data (spu_decoder, buf);
+ if (!stream->spu_decoder_plugin) {
+ update_spu_decoder(stream, buf->type);
+ }
+ if (stream->spu_decoder_plugin) {
+ stream->spu_decoder_plugin->decode_data (stream->spu_decoder_plugin, buf);
}
xine_profiler_stop_count (prof_spu_decode);
diff --git a/src/xine-utils/attributes.h b/src/xine-utils/attributes.h
index 5e4afaa73..e7e48d5af 100644
--- a/src/xine-utils/attributes.h
+++ b/src/xine-utils/attributes.h
@@ -29,7 +29,9 @@
/* disable GNU __attribute__ extension, when not compiling with GNU C */
#if defined(__GNUC__)
+#ifndef ATTRIBUTE_PACKED
#define ATTRIBUTE_PACKED 1
+#endif
#else
#undef ATTRIBUTE_PACKED
#define __attribute__(x) /**/