changeset 2563:fc124f9db88e

more cleanup, warnings fixed
author arpi
date Tue, 30 Oct 2001 17:38:09 +0000
parents 4b0db52f5de9
children 3d04a0991dce
files dec_audio.c dec_video.c dec_video.h mplayer.c xacodec.h
diffstat 5 files changed, 43 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/dec_audio.c	Tue Oct 30 17:29:27 2001 +0000
+++ b/dec_audio.c	Tue Oct 30 17:38:09 2001 +0000
@@ -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 @@
 
 #include "ima4.h"
 
+#ifdef USE_FAKE_MONO
+int fakemono=0;
+#endif
+
 #ifdef USE_DIRECTSHOW
 #include "loader/DirectShow/DS_AudioDec.h"
 #endif
--- a/dec_video.c	Tue Oct 30 17:29:27 2001 +0000
+++ b/dec_video.c	Tue Oct 30 17:38:09 2001 +0000
@@ -1,5 +1,3 @@
-
-#define USE_XANIM
 
 #include <stdio.h>
 #include <stdlib.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 @@
 #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 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 @@
 #include <decore.h>
 #endif
 
+#define USE_XANIM
+
 #ifdef USE_XANIM
 #include "xacodec.h"
 #endif
@@ -224,6 +228,11 @@
     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);
--- a/dec_video.h	Tue Oct 30 17:29:27 2001 +0000
+++ b/dec_video.h	Tue Oct 30 17:38:09 2001 +0000
@@ -15,3 +15,5 @@
 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;
--- a/mplayer.c	Tue Oct 30 17:29:27 2001 +0000
+++ b/mplayer.c	Tue Oct 30 17:38:09 2001 +0000
@@ -97,6 +97,9 @@
 #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 play_in_bg=0;
 
 // options:
-
-int divx_quality=0;
 static int auto_quality=0;
 static int output_quality=0;
 
--- a/xacodec.h	Tue Oct 30 17:29:27 2001 +0000
+++ b/xacodec.h	Tue Oct 30 17:38:09 2001 +0000
@@ -112,3 +112,7 @@
     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();
+