diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-01-12 21:44:42 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2009-01-12 21:44:42 +0000 |
commit | 1729f3076da9164576c56c422318d527e026f129 (patch) | |
tree | fe7a615ce62d059cf15c23050ec0382e35c7340c | |
parent | fa95891b7c129cd0c2d685824ea360545a0ea8ef (diff) | |
download | xine-lib-1729f3076da9164576c56c422318d527e026f129.tar.gz xine-lib-1729f3076da9164576c56c422318d527e026f129.tar.bz2 |
Enable libmpeg2new & clean it up. libmpeg2 remains preferred.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/libmpeg2new/Makefile.am | 12 | ||||
-rw-r--r-- | src/libmpeg2new/xine_mpeg2new_decoder.c | 18 |
5 files changed, 23 insertions, 13 deletions
@@ -1,4 +1,6 @@ xine-lib (1.1.17) 2009-??-?? + * Enable libmpeg2new. This is not yet production code; the old mpeg2 + decoder remains the default. xine-lib (1.1.16.1) 2009-01-11 * Fix build with older ffmpeg, both internal and in Debian 5.0. diff --git a/configure.ac b/configure.ac index 3954d9f7b..3d04b2a60 100644 --- a/configure.ac +++ b/configure.ac @@ -2715,6 +2715,9 @@ src/libffmpeg/libavcodec/libpostproc/Makefile src/libffmpeg/libavutil/Makefile src/libmad/Makefile src/libmpeg2/Makefile +src/libmpeg2new/Makefile +src/libmpeg2new/libmpeg2/Makefile +src/libmpeg2new/include/Makefile src/libmusepack/Makefile src/libmusepack/musepack/Makefile src/libspudec/Makefile diff --git a/src/Makefile.am b/src/Makefile.am index 6718b4805..249bbc2b6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -11,6 +11,7 @@ SUBDIRS = \ demuxers \ libffmpeg \ libmpeg2 \ + libmpeg2new \ liba52 \ libspudec \ libspucc \ diff --git a/src/libmpeg2new/Makefile.am b/src/libmpeg2new/Makefile.am index 49959da86..196ea7fea 100644 --- a/src/libmpeg2new/Makefile.am +++ b/src/libmpeg2new/Makefile.am @@ -2,12 +2,12 @@ include $(top_srcdir)/misc/Makefile.common SUBDIRS = libmpeg2 -xineplug_LTLIBRARIES = xineplug_decode_mpeg2.la +xineplug_LTLIBRARIES = xineplug_decode_mpeg2new.la -xineplug_decode_mpeg2_la_SOURCES = \ - xine_mpeg2_decoder.c +xineplug_decode_mpeg2new_la_SOURCES = \ + xine_mpeg2new_decoder.c -xineplug_decode_mpeg2_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) -xineplug_decode_mpeg2_la_LIBADD = $(XINE_LIB) ./libmpeg2/libmpeg2.la -xineplug_decode_mpeg2_la_LDFLAGS = $(xineplug_ldflags) +xineplug_decode_mpeg2new_la_CFLAGS = $(VISIBILITY_FLAG) $(LIBMPEG2_CFLAGS) +xineplug_decode_mpeg2new_la_LIBADD = $(XINE_LIB) libmpeg2/libmpeg2.la +xineplug_decode_mpeg2new_la_LDFLAGS = $(xineplug_ldflags) diff --git a/src/libmpeg2new/xine_mpeg2new_decoder.c b/src/libmpeg2new/xine_mpeg2new_decoder.c index c096ccfa7..55be220f0 100644 --- a/src/libmpeg2new/xine_mpeg2new_decoder.c +++ b/src/libmpeg2new/xine_mpeg2new_decoder.c @@ -35,13 +35,14 @@ #include "video_out.h" #include "buffer.h" - - +/* #define LOG #define LOG_FRAME_ALLOC_FREE #define LOG_ENTRY #define LOG_FRAME_COUNTER +*/ +#define _x_abort() do {} while (0) typedef struct { video_decoder_class_t decoder_class; @@ -66,7 +67,9 @@ typedef struct mpeg2_video_decoder_s { } mpeg2_video_decoder_t; - +#ifndef LOG_FRAME_ALLOC_FREE +inline static void mpeg2_video_print_bad_state(img_state_t * img_state) {} +#else static void mpeg2_video_print_bad_state(img_state_t * img_state) { int32_t n,m; m=0; @@ -79,6 +82,7 @@ static void mpeg2_video_print_bad_state(img_state_t * img_state) { if (m > 3) _x_abort(); if (m == 0) printf("NO FRAMES\n"); } +#endif static void mpeg2_video_free_all(img_state_t * img_state) { int32_t n,m; @@ -153,7 +157,7 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, info->sequence->picture_width); _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, info->sequence->picture_height); _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, info->sequence->frame_period / 300); - if (this->force_aspect) info->sequence->pixel_width = this->force_aspect; + if (this->force_aspect) ((mpeg2_sequence_t *)info->sequence)->pixel_width = this->force_aspect; /* ugly... */ switch (info->sequence->pixel_width) { case 3: this->ratio = 16.0 / 9.0; @@ -503,14 +507,14 @@ static void *init_plugin (xine_t *xine, void *data) { * exported plugin catalog entry */ -static uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; +static const uint32_t supported_types[] = { BUF_VIDEO_MPEG, 0 }; -static decoder_info_t dec_info_mpeg2 = { +static const decoder_info_t dec_info_mpeg2 = { supported_types, /* supported types */ 6 /* priority */ }; -plugin_info_t xine_plugin_info[] = { +const plugin_info_t xine_plugin_info[] EXPORTED = { /* type, API, "name", version, special_info, init_function */ { PLUGIN_VIDEO_DECODER, 18, "mpeg2new", XINE_VERSION_CODE, &dec_info_mpeg2, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } |