summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am1
-rw-r--r--src/libmpeg2new/Makefile.am12
-rw-r--r--src/libmpeg2new/xine_mpeg2new_decoder.c18
3 files changed, 18 insertions, 13 deletions
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 }