diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-15 00:20:31 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2002-11-15 00:20:31 +0000 |
commit | eca1bc92a62d5ad690080f4950c9b58c3989f26b (patch) | |
tree | aa75375f61771133fd1f22c9da292edc647ab4ca /src/xine-engine | |
parent | 69d8b3e79218ae27e289889fb0e2617c424da026 (diff) | |
download | xine-lib-eca1bc92a62d5ad690080f4950c9b58c3989f26b.tar.gz xine-lib-eca1bc92a62d5ad690080f4950c9b58c3989f26b.tar.bz2 |
cleaning up spu types. now avi subtitles may be enabled again.
(+ missed ffmpeg/dv patch)
CVS patchset: 3263
CVS date: 2002/11/15 00:20:31
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/buffer.h | 24 | ||||
-rw-r--r-- | src/xine-engine/video_decoder.c | 66 |
2 files changed, 42 insertions, 48 deletions
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 6fdabb9ea..292c1b461 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.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: buffer.h,v 1.77 2002/11/09 23:22:33 guenter Exp $ + * $Id: buffer.h,v 1.78 2002/11/15 00:20:34 miguelfreitas Exp $ * * * contents: @@ -172,12 +172,9 @@ extern "C" { /* spu buffer types: */ #define BUF_SPU_BASE 0x04000000 -#define BUF_SPU_CLUT 0x04000000 -#define BUF_SPU_PACKAGE 0x04010000 -#define BUF_SPU_SUBP_CONTROL 0x04020000 -#define BUF_SPU_NAV 0x04030000 -#define BUF_SPU_TEXT 0x04040000 -#define BUF_SPU_CC 0x04050000 +#define BUF_SPU_DVD 0x04000000 +#define BUF_SPU_TEXT 0x04010000 +#define BUF_SPU_CC 0x04020000 /* demuxer block types: */ @@ -306,6 +303,19 @@ struct buf_element_s { */ #define BUF_SPECIAL_VQA_VECTOR_SIZE 7 +/* + * In a BUF_SPECIAL_SPU_DVD_SUBTYPE: + * decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE + * decoder_info[2] = subtype + * decoder_info[3] = + * This buffer is pass SPU subtypes from DVDs + */ +#define BUF_SPECIAL_SPU_DVD_SUBTYPE 8 +#define SPU_DVD_SUBTYPE_CLUT 1 +#define SPU_DVD_SUBTYPE_PACKAGE 2 +#define SPU_DVD_SUBTYPE_SUBP_CONTROL 3 +#define SPU_DVD_SUBTYPE_NAV 4 + typedef struct palette_entry_s palette_entry_t; struct palette_entry_s diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c index 7252818b5..86ee1b55d 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.109 2002/11/12 18:40:55 miguelfreitas Exp $ + * $Id: video_decoder.c,v 1.110 2002/11/15 00:20:34 miguelfreitas Exp $ * */ @@ -50,11 +50,6 @@ static void update_spu_decoder (xine_stream_t *stream, int type) { stream->spu_decoder_streamtype = streamtype; stream->spu_decoder_plugin = get_spu_decoder (stream, streamtype); - /* obsolete? - if (this->spu_decoder_plugin ) - this->spu_decoder_plugin->init (this->spu_decoder_plugin, - this->video_out); - */ } return ; } @@ -118,35 +113,6 @@ 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_NAV: - xine_profiler_start_count (prof_spu_decode); - if (stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU]) - break; - 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); - break; - case BUF_CONTROL_SPU_CHANNEL: { xine_event_t ui_event; @@ -289,13 +255,14 @@ void *video_decoder_loop (void *stream_gen) { break; default: - xine_profiler_start_count (prof_video_decode); - - if (stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO]) - break; if ( (buf->type & 0xFF000000) == BUF_VIDEO_BASE ) { + if (stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO]) + break; + + xine_profiler_start_count (prof_video_decode); + /* printf ("video_decoder: got package %d, decoder_info[0]:%d\n", buf, buf->decoder_info[0]); @@ -324,6 +291,25 @@ void *video_decoder_loop (void *stream_gen) { buf_video_name( buf->type ) ); buftype_unknown = buf->type; } + + xine_profiler_stop_count (prof_video_decode); + + } else if ( (buf->type & 0xFF000000) == BUF_SPU_BASE ) { + + if (stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU]) + break; + + xine_profiler_start_count (prof_spu_decode); + + 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); + break; + } else if (buf->type != buftype_unknown) { xine_log (stream->xine, XINE_LOG_MSG, "video_decoder: unknown buffer type: %08x\n", @@ -331,8 +317,6 @@ void *video_decoder_loop (void *stream_gen) { buftype_unknown = buf->type; } - xine_profiler_stop_count (prof_video_decode); - break; } |