summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dec_audio.c16
-rw-r--r--dec_video.c39
-rw-r--r--dec_video.h2
-rw-r--r--mplayer.c5
-rw-r--r--xacodec.h4
5 files changed, 43 insertions, 23 deletions
diff --git a/dec_audio.c b/dec_audio.c
index 9f8a26e43b..141f9f8e1f 100644
--- a/dec_audio.c
+++ b/dec_audio.c
@@ -7,20 +7,20 @@
#include "mp_msg.h"
#include "help_mp.h"
-#include "libao2/afmt.h"
-
extern int verbose; // defined in mplayer.c
-#ifdef USE_FAKE_MONO
-int fakemono=0;
-#endif
-
#include "stream.h"
#include "demuxer.h"
#include "codec-cfg.h"
#include "stheader.h"
+#include "dec_audio.h"
+
+//==========================================================================
+
+#include "libao2/afmt.h"
+
#include "dll_init.h"
#include "mp3lib/mp3.h"
@@ -34,6 +34,10 @@ int fakemono=0;
#include "ima4.h"
+#ifdef USE_FAKE_MONO
+int fakemono=0;
+#endif
+
#ifdef USE_DIRECTSHOW
#include "loader/DirectShow/DS_AudioDec.h"
#endif
diff --git a/dec_video.c b/dec_video.c
index 4b720b5cb9..1a7d1a599a 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -1,6 +1,4 @@
-#define USE_XANIM
-
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -9,17 +7,11 @@
#include "mp_msg.h"
#include "help_mp.h"
-extern int verbose; // defined in mplayer.c
-extern int divx_quality;
-
-extern double video_time_usage;
-extern double vout_time_usage;
-
-extern int frameratecode2framerate[16];
-
#include "linux/timer.h"
#include "linux/shmem.h"
+extern int verbose; // defined in mplayer.c
+
#include "stream.h"
#include "demuxer.h"
#include "parse_es.h"
@@ -27,17 +19,26 @@ extern int frameratecode2framerate[16];
#include "codec-cfg.h"
#include "stheader.h"
-#include "dll_init.h"
-
-//#include <inttypes.h>
-//#include "libvo/img_format.h"
-
#ifdef USE_LIBVO2
#include "libvo2/libvo2.h"
#else
#include "libvo/video_out.h"
#endif
+#include "dec_video.h"
+
+// ===================================================================
+
+extern double video_time_usage;
+extern double vout_time_usage;
+
+extern int frameratecode2framerate[16];
+
+#include "dll_init.h"
+
+//#include <inttypes.h>
+//#include "libvo/img_format.h"
+
#include "libmpeg2/mpeg2.h"
#include "libmpeg2/mpeg2_internal.h"
@@ -45,6 +46,7 @@ extern int frameratecode2framerate[16];
extern picture_t *picture; // exported from libmpeg2/decode.c
+int divx_quality=0;
#ifdef USE_DIRECTSHOW
#include "loader/DirectShow/DS_VideoDec.h"
@@ -71,6 +73,8 @@ extern picture_t *picture; // exported from libmpeg2/decode.c
#include <decore.h>
#endif
+#define USE_XANIM
+
#ifdef USE_XANIM
#include "xacodec.h"
#endif
@@ -224,6 +228,11 @@ void uninit_video(sh_video_t *sh_video){
case VFM_MPEG:
mpeg2_free_image_buffers (picture);
break;
+#ifdef USE_XANIM
+ case VFM_XANIM:
+ xacodec_exit();
+ break;
+#endif
}
if(sh_video->our_out_buffer){
free(sh_video->our_out_buffer);
diff --git a/dec_video.h b/dec_video.h
index 5d056216bb..d1c6049903 100644
--- a/dec_video.h
+++ b/dec_video.h
@@ -15,3 +15,5 @@ extern int get_video_quality_max(sh_video_t *sh_video);
extern void set_video_quality(sh_video_t *sh_video,int quality);
int set_video_colors(sh_video_t *sh_video,char *item,int value);
+
+extern int divx_quality;
diff --git a/mplayer.c b/mplayer.c
index 69f82b2a7b..2c7137ae4e 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -97,6 +97,9 @@ static int max_framesize=0;
#include "stheader.h"
#include "parse_es.h"
+#include "dec_audio.h"
+#include "dec_video.h"
+
extern picture_t *picture; // exported from libmpeg2/decode.c
int frameratecode2framerate[16] = {
@@ -132,8 +135,6 @@ static int benchmark=0;
// static int play_in_bg=0;
// options:
-
-int divx_quality=0;
static int auto_quality=0;
static int output_quality=0;
diff --git a/xacodec.h b/xacodec.h
index 782f7b112f..0ab6e7969f 100644
--- a/xacodec.h
+++ b/xacodec.h
@@ -112,3 +112,7 @@ typedef struct {
unsigned char *mem;
} xacodec_image_t;
+int xacodec_init_video(sh_video_t *vidinfo, int out_format);
+xacodec_image_t* xacodec_decode_frame(uint8_t *frame, int frame_size, int skip_flag);
+int xacodec_exit();
+