[Mplayer-cvslog] CVS: main mencoder.c,1.170,1.171 mplayer.c,1.580,1.581 mplayer.h,1.19,1.20

Arpi of Ize arpi at mplayerhq.hu
Sun Sep 29 21:26:42 CEST 2002


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv18353

Modified Files:
	mencoder.c mplayer.c mplayer.h 
Log Message:
some cleanup - made private vars/funcs static, removed obsolete externs


Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -r1.170 -r1.171
--- mencoder.c	28 Sep 2002 18:45:47 -0000	1.170
+++ mencoder.c	29 Sep 2002 19:26:39 -0000	1.171
@@ -20,8 +20,9 @@
 #include <sys/time.h>
 
 #include "config.h"
-#include "mp_msg.h"
+
 #include "version.h"
+#include "mp_msg.h"
 #include "help_mp.h"
 
 static char* banner_text=
@@ -34,12 +35,13 @@
 #include "codec-cfg.h"
 #include "cfgparser.h"
 
-#include "stream.h"
-#include "demuxer.h"
-#include "stheader.h"
-#include "playtree.h"
+#include "libmpdemux/stream.h"
+#include "libmpdemux/demuxer.h"
+#include "libmpdemux/stheader.h"
+#include "libmpdemux/mp3_hdr.h"
+#include "libmpdemux/aviwrite.h"
 
-#include "aviwrite.h"
+#include "playtree.h"
 
 #include "libvo/video_out.h"
 
@@ -48,8 +50,6 @@
 #include "libmpcodecs/dec_video.h"
 #include "libmpcodecs/vf.h"
 
-#include "libmpdemux/mp3_hdr.h"
-
 // for MPEGLAYER3WAVEFORMAT:
 #include "loader/wine/mmreg.h"
 
@@ -64,7 +64,7 @@
 
 #include <inttypes.h>
 
-#include "fastmemcpy.h"
+#include "libvo/fastmemcpy.h"
 
 #include "linux/timer.h"
 
@@ -87,17 +87,17 @@
 int video_id=-1;
 int dvdsub_id=-1;
 int vobsub_id=-1;
-char* audio_lang=NULL;
-char* dvdsub_lang=NULL;
+static char* audio_lang=NULL;
+static char* dvdsub_lang=NULL;
 static char* spudec_ifo=NULL;
 
-char** audio_codec_list=NULL;  // override audio codec
-char** video_codec_list=NULL;  // override video codec
-char** audio_fm_list=NULL;     // override audio codec family 
-char** video_fm_list=NULL;     // override video codec family 
+static char** audio_codec_list=NULL;  // override audio codec
+static char** video_codec_list=NULL;  // override video codec
+static char** audio_fm_list=NULL;     // override audio codec family 
+static char** video_fm_list=NULL;     // override video codec family 
 
-int out_audio_codec=-1;
-int out_video_codec=-1;
+static int out_audio_codec=-1;
+static int out_video_codec=-1;
 
 // audio stream skip/resync functions requires only for seeking.
 // (they should be implemented in the audio codec layer)
@@ -119,15 +119,15 @@
 static float max_pts_correction=0;//default_max_pts_correction;
 static float c_total=0;
 
-float audio_preload=0.5;
-float audio_delay=0.0;
-int audio_density=2;
+static float audio_preload=0.5;
+static float audio_delay=0.0;
+static int audio_density=2;
 
-float force_fps=0;
-float force_ofps=0; // set to 24 for inverse telecine
+static float force_fps=0;
+static float force_ofps=0; // set to 24 for inverse telecine
 static int skip_limit=-1;
 
-int force_srate=0;
+static int force_srate=0;
 
 char *vobsub_out=NULL;
 unsigned int vobsub_out_index=0;
@@ -189,7 +189,7 @@
 float lame_param_scale=-1; // unset
 #endif
 
-static int vo_w=0, vo_h=0;
+//static int vo_w=0, vo_h=0;
 
 //-------------------------- config stuff:
 
@@ -243,7 +243,7 @@
 
 //---------------------------------------------------------------------------
 
-int dec_audio(sh_audio_t *sh_audio,unsigned char* buffer,int total){
+static int dec_audio(sh_audio_t *sh_audio,unsigned char* buffer,int total){
     int size=0;
     int at_eof=0;
     while(size<total && !at_eof){
@@ -282,8 +282,8 @@
     interrupted=1;
 }
 
-aviwrite_t* muxer=NULL;
-FILE* muxer_f=NULL;
+static aviwrite_t* muxer=NULL;
+static FILE* muxer_f=NULL;
 
 // callback for ve_*.c:
 void mencoder_write_chunk(aviwrite_stream_t *s,int len,unsigned int flags){
@@ -600,8 +600,8 @@
 case VCODEC_FRAMENO:
     mux_v->bih=malloc(sizeof(BITMAPINFOHEADER));
     mux_v->bih->biSize=sizeof(BITMAPINFOHEADER);
-    mux_v->bih->biWidth=vo_w;
-    mux_v->bih->biHeight=vo_h;
+    mux_v->bih->biWidth=sh_video->disp_w;
+    mux_v->bih->biHeight=sh_video->disp_h;
     mux_v->bih->biPlanes=1;
     mux_v->bih->biBitCount=24;
     mux_v->bih->biCompression=mmioFOURCC('F','r','N','o');

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.580
retrieving revision 1.581
diff -u -r1.580 -r1.581
--- mplayer.c	28 Sep 2002 18:45:47 -0000	1.580
+++ mplayer.c	29 Sep 2002 19:26:39 -0000	1.581
@@ -1,4 +1,4 @@
-// AVI & MPEG Player    v0.18   (C) 2000-2001. by A'rpi/ESP-team
+// Movie Player    v0.90   (C) 2000-2002. by A'rpi/ESP-team & `cat AUTHORS`
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -34,7 +34,7 @@
 #endif
 
 #include "libvo/video_out.h"
-extern void* mDisplay; // Display* mDisplay;
+//extern void* mDisplay; // Display* mDisplay;
 
 #include "libvo/font_load.h"
 #include "libvo/sub.h"
@@ -47,7 +47,10 @@
 
 #include "codec-cfg.h"
 
-#include "dvdauth.h"
+#ifdef HAVE_LIBCSS
+#include "libmpdemux/dvdauth.h"
+#endif
+
 #ifdef USE_DVDNAV
 #include <dvdnav.h>
 #endif
@@ -56,9 +59,9 @@
 #include "vobsub.h"
 
 #include "linux/getch2.h"
-#include "linux/keycodes.h"
+//#include "linux/keycodes.h"
 #include "linux/timer.h"
-#include "linux/shmem.h"
+//#include "linux/shmem.h"
 
 #include "cpudetect.h"
 
@@ -82,7 +85,6 @@
 #include "libmpdemux/tv.h"
 
 extern int tv_param_on;
-//extern tvi_handle_t *tv_handler;
 #endif
 
 //**************************************************************************//
@@ -124,10 +126,10 @@
 
 static int max_framesize=0;
 
-#include "stream.h"
-#include "demuxer.h"
-#include "stheader.h"
-#include "parse_es.h"
+#include "libmpdemux/stream.h"
+#include "libmpdemux/demuxer.h"
+#include "libmpdemux/stheader.h"
+//#include "parse_es.h"
 
 #include "libmpcodecs/dec_audio.h"
 #include "libmpcodecs/dec_video.h"
@@ -153,8 +155,6 @@
 static int drop_frame_cnt=0; // total number of dropped frames
 int benchmark=0;
 
-// static int play_in_bg=0;
-
 // options:
        int auto_quality=0;
 static int output_quality=0;
@@ -166,10 +166,12 @@
 int osd_visible=100;
 
 // seek:
-char *seek_to_sec=NULL;
-off_t seek_to_byte=0;
-off_t step_sec=0;
-int loop_times=-1;
+static char *seek_to_sec=NULL;
+static off_t seek_to_byte=0;
+static off_t step_sec=0;
+static int loop_times=-1;
+
+// may be changed by GUI:  (FIXME!)
 float rel_seek_secs=0;
 int abs_seek_pos=0;
 
@@ -184,8 +186,8 @@
 int video_id=-1;
 int dvdsub_id=-1;
 int vobsub_id=-1;
-char* audio_lang=NULL;
-char* dvdsub_lang=NULL;
+static char* audio_lang=NULL;
+static char* dvdsub_lang=NULL;
 static char* spudec_ifo=NULL;
 int vcd_track=0;
 char* filename=NULL; //"MI2-Trailer.avi";
@@ -220,6 +222,9 @@
 char* video_driver=NULL; //"mga"; // default
 char* audio_driver=NULL;
 
+extern char *vo_subdevice;
+extern char *ao_subdevice;
+
 // codec outfmt flags (defined in libmpcodecs/vd.c)
 extern int vo_flags;
 
@@ -238,15 +243,12 @@
 float sub_last_pts = -303;
 #endif
 
-extern char *vo_subdevice;
-extern char *ao_subdevice;
-
 static stream_t* stream=NULL;
-
 static demuxer_t *demuxer=NULL;
 
 char* current_module=NULL; // for debugging
 
+// also modified by Gui/mplayer/gtk/eq.c:
 int vo_gamma_gamma = 1000;
 int vo_gamma_brightness = 1000;
 int vo_gamma_contrast = 1000;
@@ -256,7 +258,7 @@
 // ---
 
 #ifdef HAVE_RTC
-int nortc;
+static int nortc;
 #endif
 
 static unsigned int inited_flags=0;
@@ -272,7 +274,7 @@
 #define INITED_DEMUXER  512
 #define INITED_ALL 0xFFFF
 
-void uninit_player(unsigned int mask){
+static void uninit_player(unsigned int mask){
   mask=inited_flags&mask;
 
   mp_msg(MSGT_CPLAYER,MSGL_DBG2,"\n*** uninit(0x%X)\n",mask);
@@ -362,7 +364,7 @@
   exit(1);
 }
 
-void exit_sighandler(int x){
+static void exit_sighandler(int x){
   static int sig_count=0;
   ++sig_count;
   if(sig_count==5 || (inited_flags==0 && sig_count>1)) exit(1);
@@ -1234,8 +1236,8 @@
 
 current_module="init_video_filters";
 
-sh_video->vfilter=vf_open_filter(NULL,"vo",video_out);
-sh_video->vfilter=append_filters(sh_video->vfilter);
+sh_video->vfilter=(void*)vf_open_filter(NULL,"vo",video_out);
+sh_video->vfilter=(void*)append_filters(sh_video->vfilter);
 
 current_module="init_video_codec";
 

Index: mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- mplayer.h	28 Sep 2002 21:16:06 -0000	1.19
+++ mplayer.h	29 Sep 2002 19:26:39 -0000	1.20
@@ -7,7 +7,6 @@
 
 extern int use_gui;
 extern char* current_module;
-extern int fullscreen;
 extern int vcd_track;
 
 extern char ** audio_fm_list;
@@ -35,9 +34,13 @@
 extern char * filename;
 
 extern int stream_cache_size;
-extern int flip;
 extern int force_ni;
 extern int index_mode;
+
+// libmpcodecs:
+extern int fullscreen;
+extern int flip;
+
 extern int frame_dropping;
 
 extern int auto_quality;




More information about the MPlayer-cvslog mailing list