# HG changeset patch # User arpi # Date 1033327600 0 # Node ID b645204ea527cc73b59514a0c50a974e6b6cea69 # Parent f89b4a70dbda2f4cd8a313c158bb7e0fe031b5ab some cleanup - made private vars/funcs static, removed obsolete externs diff -r f89b4a70dbda -r b645204ea527 libmpdemux/demux_mpg.c --- a/libmpdemux/demux_mpg.c Sun Sep 29 19:23:21 2002 +0000 +++ b/libmpdemux/demux_mpg.c Sun Sep 29 19:26:40 2002 +0000 @@ -335,8 +335,6 @@ return 1; } -//extern off_t seek_to_byte; - void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,int flags){ demux_stream_t *d_audio=demuxer->audio; demux_stream_t *d_video=demuxer->video; diff -r f89b4a70dbda -r b645204ea527 libmpdemux/demuxer.c --- a/libmpdemux/demuxer.c Sun Sep 29 19:23:21 2002 +0000 +++ b/libmpdemux/demuxer.c Sun Sep 29 19:26:40 2002 +0000 @@ -496,13 +496,12 @@ extern int num_mp3audio_packets; // commandline options, flags: -//extern int seek_to_byte; extern int force_ni; extern int pts_from_bps; -extern int audio_id; -extern int video_id; -extern int dvdsub_id; +//extern int audio_id; +//extern int video_id; +//extern int dvdsub_id; int asf_check_header(demuxer_t *demuxer); int read_asf_header(demuxer_t *demuxer); diff -r f89b4a70dbda -r b645204ea527 libmpdemux/open.c --- a/libmpdemux/open.c Sun Sep 29 19:23:21 2002 +0000 +++ b/libmpdemux/open.c Sun Sep 29 19:26:40 2002 +0000 @@ -110,7 +110,6 @@ if(ret2<0){ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (get)\n");return NULL;} ret=vcd_seek_to_track(f,vcd_track); if(ret<0){ mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_ErrTrackSelect " (seek)\n");return NULL;} -// seek_to_byte+=ret; mp_msg(MSGT_OPEN,MSGL_V,"VCD start byte position: 0x%X end: 0x%X\n",ret,ret2); #ifdef __FreeBSD__ if (ioctl (f, CDRIOCSETBLOCKSIZE, &bsize) == -1) { diff -r f89b4a70dbda -r b645204ea527 mencoder.c --- a/mencoder.c Sun Sep 29 19:23:21 2002 +0000 +++ b/mencoder.c Sun Sep 29 19:26:40 2002 +0000 @@ -20,8 +20,9 @@ #include #include "config.h" + +#include "version.h" #include "mp_msg.h" -#include "version.h" #include "help_mp.h" static char* banner_text= @@ -34,13 +35,14 @@ #include "codec-cfg.h" #include "cfgparser.h" -#include "stream.h" -#include "demuxer.h" -#include "stheader.h" +#include "libmpdemux/stream.h" +#include "libmpdemux/demuxer.h" +#include "libmpdemux/stheader.h" +#include "libmpdemux/mp3_hdr.h" +#include "libmpdemux/aviwrite.h" + #include "playtree.h" -#include "aviwrite.h" - #include "libvo/video_out.h" #include "libmpcodecs/mp_image.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 -#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(sizebih=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'); diff -r f89b4a70dbda -r b645204ea527 mplayer.c --- a/mplayer.c Sun Sep 29 19:23:21 2002 +0000 +++ b/mplayer.c Sun Sep 29 19:26:40 2002 +0000 @@ -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 #include @@ -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 #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"; diff -r f89b4a70dbda -r b645204ea527 mplayer.h --- a/mplayer.h Sun Sep 29 19:23:21 2002 +0000 +++ b/mplayer.h Sun Sep 29 19:26:40 2002 +0000 @@ -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;