[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[263] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-10-30 16:33:54
|
Revision: 263 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=263&view=rev Author: nickols_k Date: 2012-10-30 16:33:40 +0000 (Tue, 30 Oct 2012) Log Message: ----------- combine some variables into structure Modified Paths: -------------- mplayerxp/cfg-mplayer.h mplayerxp/libmpcodecs/ad_a52.c mplayerxp/libmpcodecs/ad_dca.c mplayerxp/libmpcodecs/ad_dmo.c mplayerxp/libmpcodecs/ad_mp3.c mplayerxp/libmpcodecs/dec_audio.c mplayerxp/libmpcodecs/vd_ffmpeg.c mplayerxp/libmpdemux/demux_ty.c mplayerxp/libmpdemux/sub_cc.c mplayerxp/libmpdemux/sub_cc.h mplayerxp/libmpdemux/sub_ty.c mplayerxp/libvo/aspect.c mplayerxp/libvo/screenshot.c mplayerxp/libvo/x11_common.c mplayerxp/mp_msg.c mplayerxp/mplayer.c mplayerxp/mplayer.h mplayerxp/postproc/postprocess.c Modified: mplayerxp/cfg-mplayer.h =================================================================== --- mplayerxp/cfg-mplayer.h 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/cfg-mplayer.h 2012-10-30 16:33:40 UTC (rev 263) @@ -2,10 +2,6 @@ * config for cfgparser */ -extern uint32_t mp_msg_filter; -#ifdef HAVE_PNG -extern int z_compression; -#endif #ifdef HAVE_SDL //extern char *sdl_driver; extern int sdl_noxv; @@ -13,40 +9,7 @@ extern int sdl_forcegl; //extern char *sdl_adriver; #endif -#ifdef USE_FAKE_MONO -extern int fakemono; // defined in dec_audio.c -#endif -extern int subcc_enabled; - -#ifdef HAVE_AA -extern int vo_aa_parseoption(struct config * conf, char *opt, char * param); -extern void vo_aa_revertoption(config_t* opt,char* param); -#endif - -#ifdef HAVE_ZR -extern int vo_zr_parseoption(struct config * conf, char *opt, char * param); -extern void vo_zr_revertoption(config_t* opt,char* pram); -#endif - -#ifdef HAVE_XINERAMA -extern int xinerama_screen; -#endif - -extern int enable_xp_audio; - -/* from libvo/aspect.c */ -extern float monitor_pixel_aspect; - -/* from dec_audio, currently used for ac3surround decoder only */ -extern int audio_output_channels; - -extern int sws_flags; -extern int readPPOpt(any_t*conf, char *arg); -extern char *npp_options; - -extern int shuffle_playback; - extern int network_prefer_ipv4; extern char *network_username; extern char *network_password; @@ -205,8 +168,8 @@ {"noutf8", &sub_data.utf8, CONF_TYPE_FLAG, 0, 1, 0, "tells MPlayerXP to handle the subtitle file as non-UTF8"}, {"pos",&sub_data.pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, "specifies vertical shift of subtitles"}, #endif - {"cc", &subcc_enabled, CONF_TYPE_FLAG, 0, 0, 1, "enable DVD Closed Caption (CC) subtitles"}, - {"nocc", &subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, "disable DVD Closed Caption (CC) subtitles"}, + {"cc", &mp_conf.subcc_enabled, CONF_TYPE_FLAG, 0, 0, 1, "enable DVD Closed Caption (CC) subtitles"}, + {"nocc", &mp_conf.subcc_enabled, CONF_TYPE_FLAG, 0, 1, 0, "disable DVD Closed Caption (CC) subtitles"}, {"id", &mp_conf.dvdsub_id, CONF_TYPE_INT, CONF_RANGE, 0, 31, "selects subtitle channel"}, {"lang", &mp_conf.dvdsub_lang, CONF_TYPE_STRING, 0, 0, 0, "specifies language of DVD-subtitle stream as two-letter country code(s)"}, {"ifo", &mp_conf.spudec_ifo, CONF_TYPE_STRING, 0, 0, 0, "specifies .ifo file for DVD subtitles"}, @@ -219,7 +182,7 @@ {"wid", &vo_conf.WinID, CONF_TYPE_INT, 0, 0, 0, "tells MPlayerXP to use existing X11 window (for using MPlayerXP as plugin)"}, {"rootwin", &vo_conf.WinID, CONF_TYPE_FLAG, 0, -1, 0, "render movie in the root window (desktop background)"}, #ifdef HAVE_XINERAMA - {"xinerama", &xinerama_screen, CONF_TYPE_INT, CONF_RANGE, 0, 32, "tells MPlayerXP the display for movie playback"}, + {"xinerama", &mp_conf.xinerama_screen, CONF_TYPE_INT, CONF_RANGE, 0, 32, "tells MPlayerXP the display for movie playback"}, #endif {NULL, NULL, 0, 0, 0, 0, NULL}, }; @@ -229,13 +192,10 @@ {"on", &mp_conf.has_audio, CONF_TYPE_FLAG, 0, 0, 1, "enables audio-steam playback"}, {"off", &mp_conf.has_audio, CONF_TYPE_FLAG, 0, 1, 0, "disables audio-stream playback"}, {"mixer", &oss_mixer_device, CONF_TYPE_STRING, 0, 0, 0, "select audio-mixer device"}, - {"channels", &audio_output_channels, CONF_TYPE_INT, CONF_RANGE, 2, 8, "select number of audio output channels to be used"}, + {"channels", &mp_conf.ao_channels, CONF_TYPE_INT, CONF_RANGE, 2, 8, "select number of audio output channels to be used"}, {"rate", &mp_conf.force_srate, CONF_TYPE_INT, CONF_RANGE, 1000, 8*48000, "specifies Hz for audio playback"}, {"lang", &mp_conf.audio_lang, CONF_TYPE_STRING, 0, 0, 0, "specifies language of DVD-audio stream as two-letter country code(s)"}, {"id", &mp_conf.audio_id, CONF_TYPE_INT, CONF_RANGE, 0, 255, "selects audio channel"}, -#ifdef USE_FAKE_MONO - {"stereo", &fakemono, CONF_TYPE_INT, CONF_RANGE, 0, 2, "selects type of MP2/MP3 stereo output"}, -#endif {NULL, NULL, 0, 0, 0, 0, NULL}, }; @@ -251,7 +211,7 @@ {"noaspect", &vo_conf.movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, "unsets aspect-ratio of movies"}, {"aspect-ratio", &vo_conf.softzoom, CONF_TYPE_FLAG, 0, 0, 1, "keeps aspect-ratio of the movie during window resize"}, {"noaspect-ratio", &vo_conf.softzoom, CONF_TYPE_FLAG, 0, 1, 0, "render movie to the user-defined window's geometry"}, - {"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, "sets the aspect-ratio of a single pixel of TV screen"}, + {"monitorpixelaspect", &mp_conf.monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, "sets the aspect-ratio of a single pixel of TV screen"}, {"vm", &vo_conf.vidmode, CONF_TYPE_FLAG, 0, 0, 1, "enables video-mode changing during playback"}, {"novm", &vo_conf.vidmode, CONF_TYPE_FLAG, 0, 1, 0, "disables video-mode changing during playback"}, {"fs", &vo_conf.fullscreen, CONF_TYPE_FLAG, 0, 0, 1, "fullscreen playback"}, @@ -264,10 +224,9 @@ {"bm2", &vo_conf.use_bm, CONF_TYPE_FLAG, 0, 0, 2, "enables using of bus-mastering to store all decoded-ahead frames in video-memory"}, {"nobm", &vo_conf.use_bm, CONF_TYPE_FLAG, 0, 1, 0, "disables using of bus-mastering"}, {"id", &mp_conf.video_id, CONF_TYPE_INT, CONF_RANGE, 0, 255, "selects video channel"}, - {"pp", &npp_options, CONF_TYPE_STRING, 0, 0, 0, "specifies options of post-processing"}, - {"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, "specifies the quality of the software scaler"}, + {"pp", &mp_conf.npp_options, CONF_TYPE_STRING, 0, 0, 0, "specifies options of post-processing"}, #ifdef HAVE_PNG - {"z", &z_compression, CONF_TYPE_INT, CONF_RANGE, 0, 9, "specifies compression level for PNG output"}, + {"z", &mp_conf.z_compression, CONF_TYPE_INT, CONF_RANGE, 0, 9, "specifies compression level for PNG output"}, #endif #ifdef HAVE_SDL {"noxv", &sdl_noxv, CONF_TYPE_FLAG, 0, 0, 1, "disable XVideo hardware acceleration for SDL"}, @@ -308,7 +267,7 @@ {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, "verbose output (more -v means more verbosity)"}, {"slave", &mp_conf.slave_mode, CONF_TYPE_FLAG,CONF_GLOBAL , 0, 1, "turns MPlayerXP into slave mode as a backend for other programs"}, {"use-stdin", &mp_conf.use_stdin, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, "forces reading of keyboard codes from STDIN instead of terminal's console"}, - {"msgfilter", &mp_msg_filter, CONF_TYPE_INT, CONF_RANGE, 0, 0xFFFFFFFF, "specifies filter for verbosed messages"}, + {"msgfilter", &mp_conf.msg_filter, CONF_TYPE_INT, CONF_RANGE, 0, 0xFFFFFFFF, "specifies filter for verbosed messages"}, {"core", &xpcore_config, CONF_TYPE_SUBCONFIG, 0, 0, 0, "XP-core related options" }, {"play", &playback_config, CONF_TYPE_SUBCONFIG, 0, 0, 0, "Playback specific options" }, Modified: mplayerxp/libmpcodecs/ad_a52.c =================================================================== --- mplayerxp/libmpcodecs/ad_a52.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/ad_a52.c 2012-10-30 16:33:40 UTC (rev 263) @@ -8,6 +8,7 @@ #include "codecs_ld.h" #include "mp_config.h" +#include "mplayer.h" #include "help_mp.h" #include "osdep/cpudetect.h" @@ -41,9 +42,6 @@ }; LIBAD_EXTERN(a52) - -extern int audio_output_channels; - int a52_fillbuff(sh_audio_t *sh_audio,float *pts){ int length=0; int flags=0; @@ -127,7 +125,7 @@ sh->samplesize=4; sh->sample_format=AFMT_FLOAT32; } - sh->audio_out_minsize=audio_output_channels*sh->samplesize*256*6; + sh->audio_out_minsize=mp_conf.ao_channels*sh->samplesize*256*6; sh->audio_in_minsize=MAX_AC3_FRAME; sh->context=mp_malloc(sizeof(a52_priv_t)); return 1; @@ -151,7 +149,7 @@ } /* 'a52 cannot upmix' hotfix:*/ a52_printinfo(sh_audio); - sh_audio->channels=audio_output_channels; + sh_audio->channels=mp_conf.ao_channels; while(sh_audio->channels>0){ switch(sh_audio->channels){ case 1: mpxp_a52_flags=A52_MONO; break; Modified: mplayerxp/libmpcodecs/ad_dca.c =================================================================== --- mplayerxp/libmpcodecs/ad_dca.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/ad_dca.c 2012-10-30 16:33:40 UTC (rev 263) @@ -8,6 +8,7 @@ #include "codecs_ld.h" #include "mp_config.h" +#include "mplayer.h" #include "help_mp.h" #include "osdep/cpudetect.h" @@ -46,8 +47,6 @@ LIBAD_EXTERN(dca) -extern int audio_output_channels; - int dca_fillbuff(sh_audio_t *sh_audio,float *pts){ int length=0,flen=0; int flags=0; @@ -127,7 +126,7 @@ sh->samplesize=4; sh->sample_format=AFMT_FLOAT32; } - sh->audio_out_minsize=audio_output_channels*sh->samplesize*256*8; + sh->audio_out_minsize=mp_conf.ao_channels*sh->samplesize*256*8; sh->audio_in_minsize=MAX_AC5_FRAME; sh->context=mp_malloc(sizeof(dca_priv_t)); return 1; @@ -151,7 +150,7 @@ } /* 'dca cannot upmix' hotfix:*/ dca_printinfo(sh_audio); - sh_audio->channels=audio_output_channels; + sh_audio->channels=mp_conf.ao_channels; while(sh_audio->channels>0){ switch(sh_audio->channels){ case 1: mpxp_dca_flags=DCA_MONO; break; Modified: mplayerxp/libmpcodecs/ad_dmo.c =================================================================== --- mplayerxp/libmpcodecs/ad_dmo.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/ad_dmo.c 2012-10-30 16:33:40 UTC (rev 263) @@ -6,6 +6,7 @@ #include "codecs_ld.h" #include "mp_config.h" +#include "mplayer.h" #include "help_mp.h" #include "osdep/mplib.h" #include "ad_internal.h" @@ -40,13 +41,11 @@ return 1; } -extern int audio_output_channels; - static int preinit(sh_audio_t *sh_audio) { dmo_priv_t*priv; - int chans=(audio_output_channels==sh_audio->wf->nChannels) ? - audio_output_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1); + int chans=(mp_conf.ao_channels==sh_audio->wf->nChannels) ? + mp_conf.ao_channels : (sh_audio->wf->nChannels>=2 ? 2 : 1); if(!(sh_audio->context=mp_malloc(sizeof(dmo_priv_t)))) return 0; priv=sh_audio->context; if(!(priv->ds_adec=DMO_AudioDecoder_Open(sh_audio->codec->dll_name,&sh_audio->codec->guid,sh_audio->wf,chans))) Modified: mplayerxp/libmpcodecs/ad_mp3.c =================================================================== --- mplayerxp/libmpcodecs/ad_mp3.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/ad_mp3.c 2012-10-30 16:33:40 UTC (rev 263) @@ -180,7 +180,6 @@ ,MPG123_LSEEK_FAILED /**< Low-level seek failed. */ }; -extern int fakemono; static void (*mpg123_init_ptr)(void); #define mpg123_init() (*mpg123_init_ptr)() static void (*mpg123_exit_ptr)(void); Modified: mplayerxp/libmpcodecs/dec_audio.c =================================================================== --- mplayerxp/libmpcodecs/dec_audio.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/dec_audio.c 2012-10-30 16:33:40 UTC (rev 263) @@ -24,11 +24,7 @@ #include "osdep/mplib.h" #include "ad_msg.h" -#ifdef USE_FAKE_MONO -int fakemono=0; -#endif /* used for ac3surround decoder - set using -channels option */ -int audio_output_channels = 2; af_cfg_t af_cfg; // Configuration for audio filters static const ad_functions_t* mpadec; Modified: mplayerxp/libmpcodecs/vd_ffmpeg.c =================================================================== --- mplayerxp/libmpcodecs/vd_ffmpeg.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpcodecs/vd_ffmpeg.c 2012-10-30 16:33:40 UTC (rev 263) @@ -77,7 +77,6 @@ #include "libvo/video_out.h" -extern char *npp_options; static int vcodec_inited=0; typedef struct priv_s { @@ -220,7 +219,7 @@ unsigned avc_version=0; priv_t *vdff_ctx; int pp_flags,rc; - if(npp_options) pp2_init(); + if(mp_conf.npp_options) pp2_init(); if(!vcodec_inited){ // avcodec_init(); avcodec_register_all(); @@ -381,7 +380,7 @@ MSG_V("INFO: libavcodec.so (%06X) video codec[%c%c%c%c] init OK!\n" ,avc_version ,((char *)&sh->fourcc)[0],((char *)&sh->fourcc)[1],((char *)&sh->fourcc)[2],((char *)&sh->fourcc)[3]); - if(npp_options) + if(mp_conf.npp_options) { pp_flags=0; switch(sh->codec->outfmt[sh->outfmtidx]) Modified: mplayerxp/libmpdemux/demux_ty.c =================================================================== --- mplayerxp/libmpdemux/demux_ty.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpdemux/demux_ty.c 2012-10-30 16:33:40 UTC (rev 263) @@ -36,6 +36,7 @@ #include <stdarg.h> #include "mp_config.h" +#include "mplayer.h" #include "osdep/bswap.h" #include "help_mp.h" @@ -706,7 +707,7 @@ lastXDS[ 0x06 ] = type; lastXDS[ 0x07 ] = b >> 8; lastXDS[ 0x08 ] = b; - if ( subcc_enabled ) + if ( mp_conf.subcc_enabled ) demux_ty_CopyToDemuxPacket( demux->video, lastXDS, 0x09, demux->filepos + offset, tivo->lastVideoPTS ); } @@ -814,7 +815,7 @@ if( i == 0x1B3 || i == 0x1B8 ) break; // found it! if( !i || !skip_video_packet( d_video ) ) break; // EOF? } - if ( subcc_enabled ) + if ( mp_conf.subcc_enabled ) ty_ClearOSD( 0 ); } Modified: mplayerxp/libmpdemux/sub_cc.c =================================================================== --- mplayerxp/libmpdemux/sub_cc.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpdemux/sub_cc.c 2012-10-30 16:33:40 UTC (rev 263) @@ -18,6 +18,7 @@ #include <string.h> #include "mp_config.h" +#include "mplayer.h" #include "sub_cc.h" #include "libmpsub/subreader.h" @@ -29,7 +30,6 @@ #define CC_MAX_LINE_LENGTH 64 -int subcc_enabled=0; static char chartbl[128]; static subtitle buf1,buf2; @@ -328,7 +328,7 @@ void subcc_process_data(const unsigned char *inputdata,unsigned int len) { - if(!subcc_enabled) return; + if(!mp_conf.subcc_enabled) return; if(!inited) subcc_init(); subcc_decode(inputdata, len); Modified: mplayerxp/libmpdemux/sub_cc.h =================================================================== --- mplayerxp/libmpdemux/sub_cc.h 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpdemux/sub_cc.h 2012-10-30 16:33:40 UTC (rev 263) @@ -1,8 +1,6 @@ #ifndef SUB_CC_H #define SUB_CC_H -extern int subcc_enabled; - void subcc_init(void); void subcc_process_data(const unsigned char *inputdata,unsigned int len); Modified: mplayerxp/libmpdemux/sub_ty.c =================================================================== --- mplayerxp/libmpdemux/sub_ty.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libmpdemux/sub_ty.c 2012-10-30 16:33:40 UTC (rev 263) @@ -14,6 +14,7 @@ #include <string.h> #include "mp_config.h" +#include "mplayer.h" #include "help_mp.h" #include "sub_cc.h" @@ -862,7 +863,7 @@ sub_justify = 1; - if ( subcc_enabled ) + if ( mp_conf.subcc_enabled ) { if ( tyOSDInited == 0 ) { Modified: mplayerxp/libvo/aspect.c =================================================================== --- mplayerxp/libvo/aspect.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libvo/aspect.c 2012-10-30 16:33:40 UTC (rev 263) @@ -9,7 +9,6 @@ #include "vo_msg.h" float monitor_aspect=0; -float monitor_pixel_aspect=1; static struct { uint32_t orgw; // real width @@ -33,7 +32,7 @@ void __FASTCALL__ aspect_save_screenres(uint32_t scrw, uint32_t scrh){ aspdat.scrw = scrw; aspdat.scrh = scrh; - monitor_aspect = monitor_pixel_aspect * scrw / scrh; + monitor_aspect = mp_conf.monitor_pixel_aspect * scrw / scrh; } /* aspect is called with the source resolution and the Modified: mplayerxp/libvo/screenshot.c =================================================================== --- mplayerxp/libvo/screenshot.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libvo/screenshot.c 2012-10-30 16:33:40 UTC (rev 263) @@ -38,8 +38,6 @@ }sshot_priv_t; static sshot_priv_t sshot = { RGB, 0, 0 }; #ifdef HAVE_PNG -int z_compression = Z_NO_COMPRESSION; - struct pngdata { FILE * fp; png_structp png_ptr; @@ -89,7 +87,7 @@ png_init_io(png.png_ptr, png.fp); /* set the zlib compression level */ - png_set_compression_level(png.png_ptr, z_compression); + png_set_compression_level(png.png_ptr, mp_conf.z_compression); png_set_IHDR(png.png_ptr, png.info_ptr, sshot.image_width, sshot.image_height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, @@ -211,8 +209,8 @@ return -1; } #ifdef HAVE_PNG - if((z_compression >= 0) && (z_compression <= 9)) { - if(z_compression == 0) { + if((mp_conf.z_compression >= 0) && (mp_conf.z_compression <= 9)) { + if(mp_conf.z_compression == 0) { MSG_HINT("PNG Warning: compression level set to 0, compression disabled!\n"); MSG_HINT("PNG Info: Use the -z <n> switch to set compression level from 0 to 9.\n"); MSG_HINT("PNG Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression)\n"); @@ -222,9 +220,9 @@ MSG_WARN("PNG Warning: compression level out of range setting to 1!\n"); MSG_WARN("PNG Info: Use the -z <n> switch to set compression level from 0 to 9.\n"); MSG_WARN("PNG Info: (0 = no compression, 1 = fastest, lowest - 9 best, slowest compression)\n"); - z_compression = Z_BEST_SPEED; + mp_conf.z_compression = Z_BEST_SPEED; } - MSG_V("PNG Compression level %i\n", z_compression); + MSG_V("PNG Compression level %i\n", mp_conf.z_compression); #endif dstStride[0]=sshot.image_width*3; dstStride[1]= Modified: mplayerxp/libvo/x11_common.c =================================================================== --- mplayerxp/libvo/x11_common.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/libvo/x11_common.c 2012-10-30 16:33:40 UTC (rev 263) @@ -78,10 +78,6 @@ #endif }priv_t; -#ifdef HAVE_XINERAMA -int xinerama_screen; -#endif - int __FASTCALL__ vo_x11_Shmem_Flag(vo_data_t*vo) { priv_t*priv=(priv_t*)vo->priv2; @@ -306,13 +302,13 @@ int num_screens; screens = XineramaQueryScreens(vo->mDisplay, &num_screens); - if(xinerama_screen >= num_screens) xinerama_screen = 0; + if(mp_conf.xinerama_screen >= num_screens) mp_conf.xinerama_screen = 0; if (! vo_conf.screenwidth) - vo_conf.screenwidth=screens[xinerama_screen].width; + vo_conf.screenwidth=screens[mp_conf.xinerama_screen].width; if (! vo_conf.screenheight) - vo_conf.screenheight=screens[xinerama_screen].height; - priv->xinerama_x = screens[xinerama_screen].x_org; - priv->xinerama_y = screens[xinerama_screen].y_org; + vo_conf.screenheight=screens[mp_conf.xinerama_screen].height; + priv->xinerama_x = screens[mp_conf.xinerama_screen].x_org; + priv->xinerama_y = screens[mp_conf.xinerama_screen].y_org; XFree(screens); } else Modified: mplayerxp/mp_msg.c =================================================================== --- mplayerxp/mp_msg.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/mp_msg.c 2012-10-30 16:33:40 UTC (rev 263) @@ -18,7 +18,6 @@ char scol[9][20]; pthread_mutex_t mp_msg_mutex; }priv_t; -uint32_t mp_msg_filter=0xFFFFFFFF; const char hl[9] = { 0xC, 0x4, 0xE, 0xA, 0xB, 0x7, 0x9, 0x3, 0x7 }; static char *_2ansi(unsigned char attr) @@ -96,7 +95,7 @@ static int was_eol=1; if(mp_data) priv=mp_data->msg_priv; if(level>mp_conf.verbose+MSGL_V-1) return; /* do not display */ - if((mod&mp_msg_filter)==0) return; /* do not display */ + if((mod&mp_conf.msg_filter)==0) return; /* do not display */ if(priv) { pthread_mutex_lock(&priv->mp_msg_mutex); if(isatty(fileno(stderr))) Modified: mplayerxp/mplayer.c =================================================================== --- mplayerxp/mplayer.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/mplayer.c 2012-10-30 16:33:40 UTC (rev 263) @@ -219,6 +219,9 @@ mp_conf.has_dvdsub=1; mp_conf.osd_level=2; mp_conf.playbackspeed_factor=1.0; + mp_conf.ao_channels=2; + mp_conf.monitor_pixel_aspect=1; + mp_conf.msg_filter=0xFFFFFFFF; } static void mpxp_uninit_structs(void) { @@ -1953,7 +1956,7 @@ MP_UNIT("af_preinit"); ao_data->samplerate=mp_conf.force_srate?mp_conf.force_srate:sh_audio->samplerate; - ao_data->channels=audio_output_channels?audio_output_channels:sh_audio->channels; + ao_data->channels=mp_conf.ao_channels?mp_conf.ao_channels:sh_audio->channels; ao_data->format=sh_audio->sample_format; #if 1 if(!mpca_preinit_filters(sh_audio, Modified: mplayerxp/mplayer.h =================================================================== --- mplayerxp/mplayer.h 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/mplayer.h 2012-10-30 16:33:40 UTC (rev 263) @@ -2,6 +2,7 @@ #define __MPLAYERXP_MAIN 1 #include <pthread.h> +#include <stdint.h> #include "mp_config.h" typedef struct mp_conf_s { @@ -10,6 +11,7 @@ int has_dvdsub; int use_stdin; int slave_mode; + uint32_t msg_filter; // XP-core int xp; /* XP-mode */ int gomp; /* currently it's experimental feature */ @@ -59,6 +61,13 @@ float sub_fps; int sub_auto; char* vobsub_name; + int subcc_enabled; +// others + char* npp_options; + int ao_channels; + int z_compression; + int xinerama_screen; + float monitor_pixel_aspect; }mp_conf_t; extern mp_conf_t mp_conf; Modified: mplayerxp/postproc/postprocess.c =================================================================== --- mplayerxp/postproc/postprocess.c 2012-10-30 15:15:18 UTC (rev 262) +++ mplayerxp/postproc/postprocess.c 2012-10-30 16:33:40 UTC (rev 263) @@ -13,8 +13,6 @@ #define MSGT_CLASS MSGT_PP #include "__mp_msg.h" -char * npp_options=NULL; - extern void exit_player(char *); pp_context *pp2_get_context(int width, int height, int flags) { @@ -29,7 +27,7 @@ int pp2_init(void) { - if(strcmp(npp_options,"help")==0) + if(strcmp(mp_conf.npp_options,"help")==0) { if(pp_help) MSG_INFO(*pp_help); else MSG_ERR("Can't access to PP's help\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |