[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[159] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-10-15 13:38:25
|
Revision: 159 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=159&view=rev Author: nickols_k Date: 2012-10-15 13:38:17 +0000 (Mon, 15 Oct 2012) Log Message: ----------- combine variables of VO susbsystem into structure Modified Paths: -------------- ffmpeg/doc/examples/pc-uninstalled/libavfilter.pc mplayerxp/cfg-mplayer.h mplayerxp/dec_ahead.c mplayerxp/libao2/ao_wav.c mplayerxp/libmpcodecs/vd.c mplayerxp/libvo/sub.c mplayerxp/libvo/sub.h mplayerxp/libvo/video_out.c mplayerxp/libvo/video_out.h mplayerxp/libvo/vo_dga.c mplayerxp/libvo/vo_fbdev.c mplayerxp/libvo/vo_null.c mplayerxp/libvo/vo_opengl.c mplayerxp/libvo/vo_sdl.c mplayerxp/libvo/vo_vesa.c mplayerxp/libvo/vo_x11.c mplayerxp/libvo/vo_xv.c mplayerxp/libvo/vo_xvidix.c mplayerxp/libvo/vosub_vidix.c mplayerxp/libvo/x11_common.c mplayerxp/libvo/x11_common.h mplayerxp/mplayer.c mplayerxp/postproc/vf_scale.c Modified: ffmpeg/doc/examples/pc-uninstalled/libavfilter.pc =================================================================== --- ffmpeg/doc/examples/pc-uninstalled/libavfilter.pc 2012-10-15 11:06:19 UTC (rev 158) +++ ffmpeg/doc/examples/pc-uninstalled/libavfilter.pc 2012-10-15 13:38:17 UTC (rev 159) @@ -6,7 +6,7 @@ Name: libavfilter Description: FFmpeg video filtering library Version: 3.17.100 -Requires: libpostproc = 52.0.100, libswresample = 0.15.100, libswscale = 2.1.101, libavformat = 54.29.104, libavcodec = 54.59.100 +Requires: libpostproc = 52.0.100, libswscale = 2.1.101, libavformat = 54.29.104, libavcodec = 54.59.100 Conflicts: Libs: -L${libdir} -lavfilter -ljack -lasound -Wl,-rpath,/usr/X11/lib64 -L/usr/X11/lib64 -lSDL -lpthread -lm -pthread -lbz2 -lz -lrt Cflags: -I${includedir} Modified: mplayerxp/cfg-mplayer.h =================================================================== --- mplayerxp/cfg-mplayer.h 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/cfg-mplayer.h 2012-10-15 13:38:17 UTC (rev 159) @@ -22,18 +22,6 @@ extern int fakemono; // defined in dec_audio.c #endif -extern int vo_doublebuffering; -extern int vo_vsync; -extern int vo_fsmode; -/* gamma correction */ -extern int vo_gamma_brightness; -extern int vo_gamma_saturation; -extern int vo_gamma_contrast; -extern int vo_gamma_hue; -extern int vo_gamma_red_intensity; -extern int vo_gamma_green_intensity; -extern int vo_gamma_blue_intensity; - #ifdef USE_SUB extern int sub_unicode; extern int sub_utf8; @@ -74,8 +62,6 @@ extern int enable_xp; extern int enable_gomp; extern int enable_xp_audio; -extern unsigned vo_da_buffs; -extern unsigned vo_use_bm; #if defined( ARCH_X86 ) || defined(ARCH_X86_64) extern int x86_simd; @@ -138,9 +124,9 @@ {"dump", &stream_dump, CONF_TYPE_STRING, 0, 0, 0, NULL, "specifies dump type and name for the dump of stream"}, {"gomp", &enable_gomp, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables usage of OpenMP extensions"}, {"nogomp", &enable_gomp, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables usage of OpenMP extensions"}, - {"da_buffs", &vo_da_buffs, CONF_TYPE_INT, CONF_RANGE, 4, 1024, NULL, "specifies number of buffers for decoding-ahead in XP mode"}, - {"double", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables double-buffering for single-thread decoding"}, - {"nodouble", &vo_doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL, "enables single-buffer for single-thread decoding"}, + {"da_buffs", &vo.da_buffs, CONF_TYPE_INT, CONF_RANGE, 4, 1024, NULL, "specifies number of buffers for decoding-ahead in XP mode"}, + {"double", &vo.doublebuffering, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables double-buffering for single-thread decoding"}, + {"nodouble", &vo.doublebuffering, CONF_TYPE_FLAG, 0, 1, 0, NULL, "enables single-buffer for single-thread decoding"}, {"cache", &stream_cache_size, CONF_TYPE_INT, CONF_RANGE, 4, 65536, NULL,"specifies amount of memory for precaching a file/URL"}, {"nocache", &stream_cache_size, CONF_TYPE_FLAG, 0, 1, 0, NULL,"disables precaching a file/URL"}, {"autoq", &auto_quality, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL, "dynamically changes the level of postprocessing depending on spare CPU time available"}, @@ -214,13 +200,13 @@ }; static const config_t veq_config[]={ - {"brightness",&vo_gamma_brightness, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies brightness-level for output image"}, - {"saturation",&vo_gamma_saturation, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies saturation-level for output image"}, - {"contrast",&vo_gamma_contrast, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies contrast-level for output image"}, - {"hue",&vo_gamma_hue, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies hue of gamma-correction for output image"}, - {"red",&vo_gamma_red_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of red component for output image"}, - {"green",&vo_gamma_green_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of green component for output image"}, - {"blue",&vo_gamma_blue_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of blue component for output image"}, + {"brightness",&vo.gamma.brightness, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies brightness-level for output image"}, + {"saturation",&vo.gamma.saturation, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies saturation-level for output image"}, + {"contrast",&vo.gamma.contrast, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies contrast-level for output image"}, + {"hue",&vo.gamma.hue, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies hue of gamma-correction for output image"}, + {"red",&vo.gamma.red_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of red component for output image"}, + {"green",&vo.gamma.green_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of green component for output image"}, + {"blue",&vo.gamma.blue_intensity, CONF_TYPE_INT, CONF_RANGE, -1000, 1000, NULL, "specifies intensity of blue component for output image"}, {NULL, NULL, 0, 0, 0, 0, NULL,NULL}, }; @@ -247,8 +233,8 @@ #endif {"mc", &default_max_pts_correction, CONF_TYPE_FLOAT, CONF_RANGE, 0, 10, NULL, "maximum sync correction per 5 frames (in seconds)"}, {"fps", &force_fps, CONF_TYPE_FLOAT, CONF_MIN, 0, 0, NULL, "forces frame rate (if value is wrong in the header)"}, - {"vsync", &vo_vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL, "forces video hardware to wait VSYNC signal before frame switching"}, - {"novsync", &vo_vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables video hardware to wait VSYNC signal before frame switching"}, + {"vsync", &vo.vsync, CONF_TYPE_FLAG, 0, 0, 1, NULL, "forces video hardware to wait VSYNC signal before frame switching"}, + {"novsync", &vo.vsync, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables video hardware to wait VSYNC signal before frame switching"}, {NULL, NULL, 0, 0, 0, 0, NULL,NULL}, }; @@ -306,28 +292,28 @@ }; static const config_t video_config[]={ - {"width", &opt_screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "scale output image to width (if driver supports)"}, - {"height", &opt_screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "scale output image to height (if driver supports)"}, - {"zoom", &screen_size_xy, CONF_TYPE_FLOAT, CONF_RANGE, 0, 4096, NULL, "scale output image by given factor"}, - {"screenw", &vo_screenwidth, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "specifies the horizontal resolution of the screen (if supported)"}, - {"screenh", &vo_screenheight, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "specifies the vertical resolution of the screen (if supported)"}, + {"width", &vo.opt_screen_size_x, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "scale output image to width (if driver supports)"}, + {"height", &vo.opt_screen_size_y, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "scale output image to height (if driver supports)"}, + {"zoom", &vo.screen_size_xy, CONF_TYPE_FLOAT, CONF_RANGE, 0, 4096, NULL, "scale output image by given factor"}, + {"screenw", &vo.screenwidth, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "specifies the horizontal resolution of the screen (if supported)"}, + {"screenh", &vo.screenheight, CONF_TYPE_INT, CONF_RANGE, 0, 4096, NULL, "specifies the vertical resolution of the screen (if supported)"}, {"speed", &playbackspeed_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.01, 100.0, NULL, "sets playback speed factor"}, - {"aspect", &movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0, NULL, "sets aspect-ratio of movies (autodetect)"}, - {"noaspect", &movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, NULL, "unsets aspect-ratio of movies"}, - {"aspect-ratio", &softzoom, CONF_TYPE_FLAG, 0, 0, 1, NULL, "keeps aspect-ratio of the movie during window resize"}, - {"noaspect-ratio", &softzoom, CONF_TYPE_FLAG, 0, 1, 0, NULL, "render movie to the user-defined window's geometry"}, + {"aspect", &vo.movie_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 3.0, NULL, "sets aspect-ratio of movies (autodetect)"}, + {"noaspect", &vo.movie_aspect, CONF_TYPE_FLAG, 0, 0, 0, NULL, "unsets aspect-ratio of movies"}, + {"aspect-ratio", &vo.softzoom, CONF_TYPE_FLAG, 0, 0, 1, NULL, "keeps aspect-ratio of the movie during window resize"}, + {"noaspect-ratio", &vo.softzoom, CONF_TYPE_FLAG, 0, 1, 0, NULL, "render movie to the user-defined window's geometry"}, {"monitorpixelaspect", &monitor_pixel_aspect, CONF_TYPE_FLOAT, CONF_RANGE, 0.2, 9.0, NULL, "sets the aspect-ratio of a single pixel of TV screen"}, - {"vm", &vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables video-mode changing during playback"}, - {"novm", &vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables video-mode changing during playback"}, - {"fs", &fullscreen, CONF_TYPE_FLAG, 0, 0, 1, NULL, "fullscreen playback"}, - {"nofs", &fullscreen, CONF_TYPE_FLAG, 0, 1, 0, NULL, "windowed playback"}, - {"fsmode", &vo_fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 15, NULL, "enables workaround for some fullscreen related problems"}, - {"flip", &flip, CONF_TYPE_FLAG, 0, -1, 1, NULL, "flip output image upside-down"}, - {"noflip", &flip, CONF_TYPE_FLAG, 0, -1, 0, NULL, "render output image as is"}, - {"bpp", &vo_dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL, "use different color depth than autodetect"}, - {"bm", &vo_use_bm, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables using of bus-mastering (if it available for given OS/videocard)"}, - {"bm2", &vo_use_bm, CONF_TYPE_FLAG, 0, 0, 2, NULL, "enables using of bus-mastering to store all decoded-ahead frames in video-memory"}, - {"nobm", &vo_use_bm, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables using of bus-mastering"}, + {"vm", &vo.vidmode, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables video-mode changing during playback"}, + {"novm", &vo.vidmode, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables video-mode changing during playback"}, + {"fs", &vo.fullscreen, CONF_TYPE_FLAG, 0, 0, 1, NULL, "fullscreen playback"}, + {"nofs", &vo.fullscreen, CONF_TYPE_FLAG, 0, 1, 0, NULL, "windowed playback"}, + {"fsmode", &vo.fsmode, CONF_TYPE_INT, CONF_RANGE, 0, 15, NULL, "enables workaround for some fullscreen related problems"}, + {"flip", &vo.flip, CONF_TYPE_FLAG, 0, -1, 1, NULL, "flip output image upside-down"}, + {"noflip", &vo.flip, CONF_TYPE_FLAG, 0, -1, 0, NULL, "render output image as is"}, + {"bpp", &vo.dbpp, CONF_TYPE_INT, CONF_RANGE, 0, 32, NULL, "use different color depth than autodetect"}, + {"bm", &vo.use_bm, CONF_TYPE_FLAG, 0, 0, 1, NULL, "enables using of bus-mastering (if it available for given OS/videocard)"}, + {"bm2", &vo.use_bm, CONF_TYPE_FLAG, 0, 0, 2, NULL, "enables using of bus-mastering to store all decoded-ahead frames in video-memory"}, + {"nobm", &vo.use_bm, CONF_TYPE_FLAG, 0, 1, 0, NULL, "disables using of bus-mastering"}, {"id", &video_id, CONF_TYPE_INT, CONF_RANGE, 0, 255, NULL, "selects video channel"}, {"pp", &npp_options, CONF_TYPE_STRING, 0, 0, 0, NULL, "specifies options of post-processing"}, {"sws", &sws_flags, CONF_TYPE_INT, 0, 0, 2, NULL, "specifies the quality of the software scaler"}, Modified: mplayerxp/dec_ahead.c =================================================================== --- mplayerxp/dec_ahead.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/dec_ahead.c 2012-10-15 13:38:17 UTC (rev 159) @@ -78,7 +78,6 @@ static pthread_t pthread_id=0; static pthread_attr_t our_attr; static pthread_attr_t audio_attr; -extern float vo_fps; static sh_video_t *sh_video; static sh_audio_t *sh_audio; extern demux_stream_t *d_video; @@ -151,7 +150,7 @@ pinfo[xp_id].pth_id = pthread_self(); pinfo[xp_id].thread_name = (has_xp_audio && enable_xp < XP_VAFull) ? "video+audio decoding+filtering ahead" : "video decoding+vf ahead"; prev_delta=xp_num_frames; - drop_barrier=(float)(xp_num_frames/2)*(1/vo_fps); + drop_barrier=(float)(xp_num_frames/2)*(1/vo.fps); if(av_sync_pts == -1 && !use_pts_fix2) xp_is_bad_pts = d_video->demuxer->file_format == DEMUXER_TYPE_MPEG_ES || d_video->demuxer->file_format == DEMUXER_TYPE_MPEG4_ES || @@ -188,7 +187,7 @@ while(2==xp_thread_decode_audio()) ; pinfo[xp_id].current_module = "dec_ahead 2"; } - in_size=video_read_frame_r(sh_video,&duration,&v_pts,&start,vo_fps); + in_size=video_read_frame_r(sh_video,&duration,&v_pts,&start,vo.fps); UNLOCK_VREADING(); if(dec_ahead_in_lseek==Seek) { @@ -261,7 +260,7 @@ int cur_time; cur_time = GetTimerMS(); /* Ugly solution: disable frame dropping right after seeking! */ - if(cur_time - mpxp_seek_time > (xp_num_frames/vo_fps)*100 && + if(cur_time - mpxp_seek_time > (xp_num_frames/vo.fps)*100 && ada_active_frame>=xp_num_frames) { float delta,max_frame_delay;/* delay for decoding of top slow frame */ @@ -285,7 +284,7 @@ delta=v_pts-xp_screen_pts; if(max_frame_delay*3 > drop_barrier) { - if(drop_barrier < (float)(xp_num_frames-2)/vo_fps) drop_barrier += 1/vo_fps; + if(drop_barrier < (float)(xp_num_frames-2)/vo.fps) drop_barrier += 1/vo.fps; else if(verbose) { @@ -299,7 +298,7 @@ "*********************************************\n" "Try increase number of buffer for decoding ahead\n" "Exist: %u, need: %u\n" - ,xp_num_frames,(unsigned)(max_frame_delay*3*vo_fps)+3); + ,xp_num_frames,(unsigned)(max_frame_delay*3*vo.fps)+3); prev_warn_delay=max_frame_delay; } } @@ -617,7 +616,7 @@ unsigned o_bps; unsigned min_reserv; o_bps=sh_audio->afilter_inited?sh_audio->af_bps:sh_audio->o_bps; - if(has_xp_video) asize = max(3*sha->audio_out_minsize,max(3*MAX_OUTBURST,o_bps*xp_num_frames/vo_fps))+MIN_BUFFER_RESERV; + if(has_xp_video) asize = max(3*sha->audio_out_minsize,max(3*MAX_OUTBURST,o_bps*xp_num_frames/vo.fps))+MIN_BUFFER_RESERV; else asize = o_bps*ao_da_buffs; /* FIXME: get better indices from asize/real_audio_packet_size */ min_reserv = sha->audio_out_minsize; @@ -776,7 +775,7 @@ if(has_xp_video) { /* Match video buffer */ vbuf_size = abs_dec_ahead_locked_frame - abs_dec_ahead_active_frame; - pref_buf = vbuf_size / vo_fps * sh_audio->af_bps; + pref_buf = vbuf_size / vo.fps * sh_audio->af_bps; pref_buf -= len; if( pref_buf > 0 ) { len = min( pref_buf, free_buf ); Modified: mplayerxp/libao2/ao_wav.c =================================================================== --- mplayerxp/libao2/ao_wav.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libao2/ao_wav.c 2012-10-15 13:38:17 UTC (rev 159) @@ -29,6 +29,7 @@ #include "afmt.h" #include "audio_out.h" #include "audio_out_internal.h" +#include "../libvo/video_out.h" #include "help_mp.h" #include "ao_msg.h" @@ -47,8 +48,6 @@ LIBAO_EXTERN(wav) -extern int vo_pts; - #define WAV_ID_RIFF 0x46464952 /* "RIFF" */ #define WAV_ID_WAVE 0x45564157 /* "WAVE" */ #define WAV_ID_FMT 0x20746d66 /* "fmt " */ @@ -213,8 +212,8 @@ // return: how many bytes can be played without blocking static unsigned get_space(void){ - if(vo_pts) - return ao_data.pts < vo_pts + wav.fast * 30000 ? ao_data.outburst : 0; + if(vo.pts) + return ao_data.pts < vo.pts + wav.fast * 30000 ? ao_data.outburst : 0; return ao_data.outburst; } Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libmpcodecs/vd.c 2012-10-15 13:38:17 UTC (rev 159) @@ -137,10 +137,10 @@ MSG_DBG2("vo_debug: codec[%s] query_format(%s) returned FALSE\n",mpvdec->info->driver_name,vo_format_name(out_fmt)); continue; } - j=i; vo_flags=flags; + j=i; vo.flags=flags; if(flags&VFCAP_CSP_SUPPORTED_BY_HW) break; } else - if(!palette && !(vo_flags&3) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){ + if(!palette && !(vo.flags&3) && (out_fmt==IMGFMT_RGB8||out_fmt==IMGFMT_BGR8)){ sh->outfmtidx=j; // pass index to the control() function this way if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)!=CONTROL_FALSE) palette=1; @@ -186,25 +186,25 @@ sh->vfilter=vf; // autodetect flipping - if(flip==-1){ - flip=0; + if(vo.flip==-1){ + vo.flip=0; if(sh->codec->outflags[j]&CODECS_FLAG_FLIP) if(!(sh->codec->outflags[j]&CODECS_FLAG_NOFLIP)) - flip=1; + vo.flip=1; } - if(vo_flags&VFCAP_FLIPPED) flip^=1; - if(flip && !(vo_flags&VFCAP_FLIP)){ + if(vo.flags&VFCAP_FLIPPED) vo.flip^=1; + if(vo.flip && !(vo.flags&VFCAP_FLIP)){ // we need to flip, but no flipping filter avail. sh->vfilter=vf=vf_open_filter(vf,sh,"mirror","x"); } // time to do aspect ratio corrections... - if(movie_aspect>-1.0) sh->aspect = movie_aspect; // cmdline overrides autodetect - if(opt_screen_size_x||opt_screen_size_y){ - screen_size_x = opt_screen_size_x; - screen_size_y = opt_screen_size_y; - if(!vidmode){ + if(vo.movie_aspect>-1.0) sh->aspect = vo.movie_aspect; // cmdline overrides autodetect + if(vo.opt_screen_size_x||vo.opt_screen_size_y){ + screen_size_x = vo.opt_screen_size_x; + screen_size_y = vo.opt_screen_size_y; + if(!vo.vidmode){ if(!screen_size_x) screen_size_x=1; if(!screen_size_y) screen_size_y=1; if(screen_size_x<=8) screen_size_x*=sh->disp_w; @@ -214,15 +214,15 @@ // check source format aspect, calculate prescale ::atmos screen_size_x=sh->disp_w; screen_size_y=sh->disp_h; - if(screen_size_xy>=0.001){ - if(screen_size_xy<=8){ + if(vo.screen_size_xy>=0.001){ + if(vo.screen_size_xy<=8){ // -xy means x+y scale - screen_size_x*=screen_size_xy; - screen_size_y*=screen_size_xy; + screen_size_x*=vo.screen_size_xy; + screen_size_y*=vo.screen_size_xy; } else { // -xy means forced width while keeping correct aspect - screen_size_x=screen_size_xy; - screen_size_y=screen_size_xy*sh->disp_h/sh->disp_w; + screen_size_x=vo.screen_size_xy; + screen_size_y=vo.screen_size_xy*sh->disp_h/sh->disp_w; } } if(sh->aspect>0.01){ @@ -231,7 +231,7 @@ sh->aspect); w=(int)((float)screen_size_y*sh->aspect); w+=w%2; // round // we don't like horizontal downscale || user forced width: - if(w<screen_size_x || screen_size_xy>8){ + if(w<screen_size_x || vo.screen_size_xy>8){ screen_size_y=(int)((float)screen_size_x*(1.0/sh->aspect)); screen_size_y+=screen_size_y%2; // round if(screen_size_y<sh->disp_h) // Do not downscale verticaly @@ -245,13 +245,13 @@ MSG_V("video_out->init(%dx%d->%dx%d,flags=%d,'%s',%s)\n", sh->disp_w,sh->disp_h, screen_size_x,screen_size_y, - fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), + vo.fullscreen|(vo.vidmode<<1)|(vo.softzoom<<2)|(vo.flip<<3), "MPlayerXP",vo_format_name(out_fmt)); MSG_DBG2("vf configuring: %s\n",vf->info->name); if(vf->config(vf,sh->disp_w,sh->disp_h, screen_size_x,screen_size_y, - fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), + vo.fullscreen|(vo.vidmode<<1)|(vo.softzoom<<2)|(vo.flip<<3), out_fmt,tune)==0){ MSG_WARN(MSGTR_CannotInitVO); sh->vfilter_inited=-1; Modified: mplayerxp/libvo/sub.c =================================================================== --- mplayerxp/libvo/sub.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/sub.c 2012-10-15 13:38:17 UTC (rev 159) @@ -19,7 +19,7 @@ #include "../__mp_msg.h" #define UNUSED(x) ((void)(x)) /* Removes warning about unused arguments */ -char * __sub_osd_names[]={ +static const char * __sub_osd_names[]={ "Seekbar", "Play", "Pause", @@ -33,7 +33,7 @@ "Brightness", "Hue" }; -char * __sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", ""}; +static const char * __sub_osd_names_short[] ={ "", "|>", "||", "[]", "<<" , ">>", "", "", "", "", "", ""}; //static int vo_font_loaded=-1; font_desc_t* vo_font=NULL; Modified: mplayerxp/libvo/sub.h =================================================================== --- mplayerxp/libvo/sub.h 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/sub.h 2012-10-15 13:38:17 UTC (rev 159) @@ -93,10 +93,6 @@ #define OSD_PB_END 0x12 #define OSD_PB_1 0x13 -/* now in textform */ -extern char * __sub_osd_names[]; -extern char * __sub_osd_names_short[]; - extern int sub_unicode; extern int sub_utf8; Modified: mplayerxp/libvo/video_out.c =================================================================== --- mplayerxp/libvo/video_out.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/video_out.c 2012-10-15 13:38:17 UTC (rev 159) @@ -45,59 +45,11 @@ //int vo_flags=0; -// currect resolution/bpp on screen: (should be autodetected by vo_x11_init()) -unsigned vo_depthonscreen=0; -unsigned vo_screenwidth=0; -unsigned vo_screenheight=0; - -// requested resolution/bpp: (-x -y -bpp options) -unsigned vo_dx=0; -unsigned vo_dy=0; -unsigned vo_dwidth=0; -unsigned vo_dheight=0; -unsigned vo_dbpp=0; - -unsigned vo_old_x = 0; -unsigned vo_old_y = 0; -unsigned vo_old_width = 0; -unsigned vo_old_height = 0; - -int vo_doublebuffering = 0; -int vo_vsync = 0; -int vo_fs = 0; -int vo_fsmode = 0; - -int vo_pts=0; // for hw decoding -float vo_fps=0; // for mp1e rte - +vo_priv_t vo = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, + { 0, 0, 0, 0, 0, 0, 0}, 0, 0, 0, -1, 0, 0, 0.0, -1.0, }; char *vo_subdevice = NULL; -unsigned vo_da_buffs=64; /* keep old value here */ -unsigned vo_use_bm=0; /* indicates user's agreement for using busmastering */ - static vo_format_desc vod; -/**************************************** -* GAMMA CORRECTION * -****************************************/ -int vo_gamma_brightness=0; -int vo_gamma_saturation=0; -int vo_gamma_contrast=0; -int vo_gamma_hue=0; -int vo_gamma_red_intensity=0; -int vo_gamma_green_intensity=0; -int vo_gamma_blue_intensity=0; - -// libvo opts: -int fullscreen=0; -int vidmode=0; -int softzoom=0; -int flip=-1; -int opt_screen_size_x=0; -int opt_screen_size_y=0; -float screen_size_xy=0; -float movie_aspect=-1.0; -int vo_flags=0; - // // Externally visible list of all vo drivers // @@ -720,7 +672,7 @@ void vo_change_frame(void) { MSG_DBG2("dri_vo_dbg: vo_change_frame [active_frame=%u]\n",active_frame); - if(vo_doublebuffering || (dri_cap.caps & DRI_CAP_VIDEO_MMAPED)!=DRI_CAP_VIDEO_MMAPED) + if(vo.doublebuffering || (dri_cap.caps & DRI_CAP_VIDEO_MMAPED)!=DRI_CAP_VIDEO_MMAPED) { video_out->change_frame(active_frame); active_frame = (active_frame+1)%dri_nframes; Modified: mplayerxp/libvo/video_out.h =================================================================== --- mplayerxp/libvo/video_out.h 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/video_out.h 2012-10-15 13:38:17 UTC (rev 159) @@ -202,54 +202,59 @@ // NULL terminated array of all drivers extern const vo_functions_t* video_out_drivers[]; -extern int vo_flags; +typedef struct vo_gamma_s{ + int brightness; + int saturation; + int contrast; + int hue; + int red_intensity; + int green_intensity; + int blue_intensity; +}vo_gamma_t; +typedef struct vo_priv_s { + int flags; // correct resolution/bpp on screen: (should be autodetected by vo_x11_init()) -extern unsigned vo_depthonscreen; -extern unsigned vo_screenwidth; -extern unsigned vo_screenheight; + unsigned depthonscreen; + unsigned screenwidth; + unsigned screenheight; // requested resolution/bpp: (-x -y -bpp options) -extern unsigned vo_dx; -extern unsigned vo_dy; -extern unsigned vo_dwidth; -extern unsigned vo_dheight; -extern unsigned vo_dbpp; + unsigned dx; + unsigned dy; + unsigned dwidth; + unsigned dheight; + unsigned dbpp; -extern unsigned vo_old_x; -extern unsigned vo_old_y; -extern unsigned vo_old_width; -extern unsigned vo_old_height; + unsigned old_x; + unsigned old_y; + unsigned old_width; + unsigned old_height; -extern int vo_doublebuffering; -extern int vo_vsync; -extern int vo_fs; -extern int vo_fsmode; + int doublebuffering; + int vsync; + int fs; + int fsmode; -extern int vo_pts; -extern float vo_fps; + int pts; + float fps; -extern char *vo_subdevice; + unsigned da_buffs; /**< contains number of buffers for decoding ahead */ + unsigned use_bm; /**< indicates user's agreement for using busmastering */ -extern int vo_gamma_brightness; -extern int vo_gamma_saturation; -extern int vo_gamma_contrast; -extern int vo_gamma_hue; -extern int vo_gamma_red_intensity; -extern int vo_gamma_green_intensity; -extern int vo_gamma_blue_intensity; + vo_gamma_t gamma; -extern unsigned vo_da_buffs; /**< contains number of buffers for decoding ahead */ -extern unsigned vo_use_bm; /**< indicates user's agreement for using busmastering */ + int fullscreen; + int vidmode; + int softzoom; + int flip; + int opt_screen_size_x; + int opt_screen_size_y; + float screen_size_xy; + float movie_aspect; +}vo_priv_t; -extern int fullscreen; -extern int vidmode; -extern int softzoom; -extern int flip; -extern int opt_screen_size_x; -extern int opt_screen_size_y; -extern float screen_size_xy; -extern float movie_aspect; -extern int vo_flags; +extern vo_priv_t vo; +extern char * vo_subdevice; #endif Modified: mplayerxp/libvo/vo_dga.c =================================================================== --- mplayerxp/libvo/vo_dga.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_dga.c 2012-10-15 13:38:17 UTC (rev 159) @@ -276,21 +276,21 @@ MSG_ERR( "vo_dga: Can't open display!\n"); return 0; } - udf_screenw = vo_screenwidth; - udf_screenh = vo_screenheight; + udf_screenw = vo.screenwidth; + udf_screenh = vo.screenheight; if( !vo_x11_init() ){ MSG_ERR( "vo_dga: vo_x11_init() failed!\n"); - return 1; + return 1; } - vo_dga_XServer_mode = vd_ValidateMode(vo_depthonscreen); - + vo_dga_XServer_mode = vd_ValidateMode(vo.depthonscreen); + if(vo_dga_XServer_mode ==0){ #ifndef HAVE_DGA2 MSG_ERR( "vo_dga: Your X-Server is not running in a "); MSG_ERR( "resolution supported by DGA driver!\n"); -#endif +#endif } - + #ifdef HAVE_DGA2 modelines=XDGAQueryModes(qdisp, XDefaultScreen(qdisp),&modecount); if(modelines){ @@ -303,7 +303,7 @@ modelines[i].greenMask, modelines[i].blueMask, modelines[i].viewportWidth, - modelines[i].viewportHeight); + modelines[i].viewportHeight); vd_EnableMode( modelines[i].depth, modelines[i].bitsPerPixel, @@ -328,9 +328,9 @@ for(i=1; i<vo_dga_mode_num; i++){ MSG_V( "vo_dga: Mode: %s", vd_GetModeString(i)); - if(vo_dbpp && vo_dbpp != vo_dga_modes[i].vdm_mplayer_depth){ + if(vo.dbpp && vo.dbpp != vo_dga_modes[i].vdm_mplayer_depth){ vo_dga_modes[i].vdm_supported = 0; - MSG_V( " ...disabled by -bpp %d", vo_dbpp ); + MSG_V( " ...disabled by -bpp %d", vo.dbpp ); } MSG_V( "\n"); } @@ -605,17 +605,17 @@ if(!wanted_height) wanted_height = height; if(!wanted_width) wanted_width = width; - + if(udf_screenw) wanted_width = udf_screenw; if(udf_screenh) wanted_height = udf_screenh; if( !vo_x11_init() ){ MSG_ERR( "vo_dga: vo_x11_init() failed!\n"); - return 1; + return 1; } - if( !vo_dbpp ) vo_dga_src_mode = vo_dga_XServer_mode; - else vo_dga_src_mode = vd_ModeValid(vo_dbpp); + if( !vo.dbpp ) vo_dga_src_mode = vo_dga_XServer_mode; + else vo_dga_src_mode = vd_ModeValid(vo.dbpp); vo_dga_hw_mode = SRC_MODE.vdm_hw_mode; if(vo_dga_src_mode != vo_dga_hw_mode ){ @@ -740,7 +740,6 @@ MSG_DBG2( "vo_dga: vp_off=%d\n", vo_dga_vp_offset); - XGrabKeyboard (mDisplay, DefaultRootWindow(mDisplay), True, GrabModeAsync,GrabModeAsync, CurrentTime); XGrabPointer (mDisplay, DefaultRootWindow(mDisplay), True, @@ -753,12 +752,12 @@ vo_dga_dbf_mem_offset[0] = 0; dest_frame_size = vo_dga_width*HW_MODE.vdm_bytespp*vo_dga_vp_height; - if(vo_doublebuffering) + if(vo.doublebuffering) { num_buffers = (ram_size*1024)/dest_frame_size; - if(num_buffers > vo_da_buffs) num_buffers = vo_da_buffs; + if(num_buffers > vo.da_buffs) num_buffers = vo.da_buffs; if(num_buffers > MAX_DRI_BUFFERS) num_buffers = MAX_DRI_BUFFERS; - + for(freq=1;freq<num_buffers;freq++) { vo_dga_dbf_y_offset[freq] = vo_dga_dbf_y_offset[freq-1] + vo_dga_vp_height; Modified: mplayerxp/libvo/vo_fbdev.c =================================================================== --- mplayerxp/libvo/vo_fbdev.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_fbdev.c 2012-10-15 13:38:17 UTC (rev 159) @@ -772,7 +772,7 @@ fb_bpp = fb_vinfo.bits_per_pixel; - if (fb_bpp == 8 && !vo_dbpp) { + if (fb_bpp == 8 && !vo.dbpp) { MSG_ERR(FBDEV "8 bpp output is not supported.\n"); goto err_out_tty_fd; } @@ -782,21 +782,21 @@ fb_bpp = fb_vinfo.red.length + fb_vinfo.green.length + fb_vinfo.blue.length; - if (vo_dbpp) { - if (vo_dbpp != 15 && vo_dbpp != 16 && vo_dbpp != 24 && - vo_dbpp != 32) { - MSG_ERR(FBDEV "can't switch to %d bpp\n", vo_dbpp); + if (vo.dbpp) { + if (vo.dbpp != 15 && vo.dbpp != 16 && vo.dbpp != 24 && + vo.dbpp != 32) { + MSG_ERR(FBDEV "can't switch to %d bpp\n", vo.dbpp); goto err_out_fd; } - fb_bpp = vo_dbpp; + fb_bpp = vo.dbpp; } fb_preinit_done = 1; fb_works = 1; return 1; err_out_tty_fd: - close(fb_tty_fd); - fb_tty_fd = -1; + close(fb_tty_fd); + fb_tty_fd = -1; err_out_fd: close(fb_dev_fd); fb_dev_fd = -1; @@ -896,8 +896,8 @@ int zoom = fullscreen & 0x04?1:0; unsigned x_offset,y_offset,i; UNUSED(title); - fs = fullscreen & 0x01; - flip = fullscreen & 0x08; + vo.fs = fullscreen & 0x01; + vo.flip = fullscreen & 0x08; if(fs) zoom++; srcFourcc = format; if((int)pre_init_err == -2) @@ -993,7 +993,7 @@ break; } - if (flip & ((((pixel_format & 0xff) + 7) / 8) != fb_pixel_size)) { + if (vo.flip & ((((pixel_format & 0xff) + 7) / 8) != fb_pixel_size)) { MSG_ERR(FBDEV "Flipped output with depth conversion is not " "supported\n"); return 1; @@ -1108,7 +1108,7 @@ MSG_DBG2(FBDEV "L123123875 @ %p\n", L123123875); MSG_V(FBDEV "pixel per line: %d\n", fb_line_len / fb_pixel_size); - total_fr=vo_doublebuffering?vo_da_buffs:1; + total_fr=vo.doublebuffering?vo.da_buffs:1; for(i=0;i<total_fr;i++) if (!(next_frame[i] = (uint8_t *) malloc(out_width * out_height * fb_pixel_size))) { MSG_ERR(FBDEV "Can't malloc next_frame: %s\n", strerror(errno)); Modified: mplayerxp/libvo/vo_null.c =================================================================== --- mplayerxp/libvo/vo_null.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_null.c 2012-10-15 13:38:17 UTC (rev 159) @@ -67,7 +67,7 @@ size_t i; null_image_width = width; null_image_height = height; - null_num_frames = vo_da_buffs; + null_num_frames = vo.da_buffs; null_fourcc=format; UNUSED(d_width); UNUSED(d_height); Modified: mplayerxp/libvo/vo_opengl.c =================================================================== --- mplayerxp/libvo/vo_opengl.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_opengl.c 2012-10-15 13:38:17 UTC (rev 159) @@ -67,7 +67,6 @@ static uint32_t image_width; static uint32_t image_height; static uint32_t image_format; -static int vo_flipped; static uint32_t dwidth,dheight; static const vo_info_t *get_info(void) @@ -126,7 +125,7 @@ glClearColor(0.0, 0.0, 0.0, 1.0); glClear(GL_COLOR_BUFFER_BIT); glRasterPos2i(x, y); - glPixelZoom(sx,vo_flipped?sy:-sy); + glPixelZoom(sx,vo.flip?sy:-sy); } static void resize(int x,int y){ @@ -134,10 +133,10 @@ if (WinID >= 0) { unsigned top = 0, left = 0, w = x, h = y; aspect(&w,&h,A_ZOOM); - left=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; - top=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; - w=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); - h=(dheight > vo_screenheight?vo_screenheight:dheight); + left=( vo.screenwidth - (dwidth > vo.screenwidth?vo.screenwidth:dwidth) ) / 2; + top=( vo.screenheight - (dheight > vo.screenheight?vo.screenheight:dheight) ) / 2; + w=(dwidth > vo.screenwidth?vo.screenwidth:dwidth); + h=(dheight > vo.screenheight?vo.screenheight:dheight); gl_init_fb(left,top,w,h); } else gl_init_fb( 0, 0, x, y ); @@ -168,21 +167,21 @@ image_width = width; image_format=format; - vo_fs=flags&VOFLAG_FULLSCREEN; - softzoom=flags&VOFLAG_SWSCALE; - if ( vo_fs ) - { vo_old_width=d_width; vo_old_height=d_height; } + vo.fs=flags&VOFLAG_FULLSCREEN; + vo.softzoom=flags&VOFLAG_SWSCALE; + if ( vo.fs ) + { vo.old_width=d_width; vo.old_height=d_height; } #ifdef HAVE_XF86VM if( flags&0x02 ) vm = 1; #endif - vo_flipped=flags&VOFLAG_FLIPPING; - num_buffers=vo_doublebuffering?vo_da_buffs:1; + vo.flip=flags&VOFLAG_FLIPPING; + num_buffers=vo.doublebuffering?vo.da_buffs:1; - aspect_save_screenres(vo_screenwidth,vo_screenheight); - aspect(&d_width,&d_height,softzoom?A_ZOOM:A_NOZOOM); - if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); + aspect_save_screenres(vo.screenwidth,vo.screenheight); + aspect(&d_width,&d_height,vo.softzoom?A_ZOOM:A_NOZOOM); + if( vo.fs ) aspect(&d_width,&d_height,A_ZOOM); vo_x11_calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; @@ -214,7 +213,7 @@ ((WinID==0) ? 0 : (PointerMotionMask | ButtonPressMask | ButtonReleaseMask ))); XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); - if ( vo_fs ) vo_x11_decoration( mDisplay,vo_window,0 ); + if ( vo.fs ) vo_x11_decoration( mDisplay,vo_window,0 ); XMapWindow(mDisplay, vo_window); #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay,vo_window,&hint); @@ -285,7 +284,7 @@ static uint32_t __FASTCALL__ check_events(int (* __FASTCALL__ adjust_size)(unsigned cw,unsigned ch,unsigned *w,unsigned *h)) { int e=vo_x11_check_events(mDisplay,adjust_size); - if(e&VO_EVENT_RESIZE) resize(vo_dwidth,vo_dheight); + if(e&VO_EVENT_RESIZE) resize(vo.dwidth,vo.dheight); return e|VO_EVENT_FORCE_UPDATE; } @@ -375,7 +374,7 @@ return query_format((vo_query_fourcc_t*)data); case VOCTRL_FULLSCREEN: vo_fullscreen(); - resize(vo_dwidth, vo_dheight); + resize(vo.dwidth, vo.dheight); return VO_TRUE; case VOCTRL_GET_NUM_FRAMES: *(uint32_t *)data = num_buffers; Modified: mplayerxp/libvo/vo_sdl.c =================================================================== --- mplayerxp/libvo/vo_sdl.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_sdl.c 2012-10-15 13:38:17 UTC (rev 159) @@ -634,7 +634,7 @@ aspect_save_prescale(d_width ? d_width : width, d_height ? d_height : height); /* Save the original Image size */ - softzoom=flags&VOFLAG_SWSCALE; + vo.softzoom=flags&VOFLAG_SWSCALE; priv->X = 0; priv->width = width; priv->height = height; @@ -760,7 +760,7 @@ { struct sdl_priv_s *priv = &sdl_priv; unsigned i,retval; - priv->num_buffs=vo_doublebuffering?vo_da_buffs:1; + priv->num_buffs=vo.doublebuffering?vo.da_buffs:1; #ifdef CONFIG_VIDIX if(!vidix_name) { @@ -964,7 +964,7 @@ else if ( keypressed == SDLK_n ) { #ifdef HAVE_X11 - aspect(&priv->dstwidth, &priv->dstheight,softzoom?A_ZOOM:A_NOZOOM); + aspect(&priv->dstwidth, &priv->dstheight,vo.softzoom?A_ZOOM:A_NOZOOM); #endif if (priv->surface->w != priv->dstwidth || priv->surface->h != priv->dstheight) { if(enable_xp) LOCK_VDECODING(); Modified: mplayerxp/libvo/vo_vesa.c =================================================================== --- mplayerxp/libvo/vo_vesa.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_vesa.c 2012-10-15 13:38:17 UTC (rev 159) @@ -252,7 +252,7 @@ else { int err; - if((err=vbeSetDisplayStart(multi_buff[idx],vo_vsync)) != VBE_OK) + if((err=vbeSetDisplayStart(multi_buff[idx],vo.vsync)) != VBE_OK) { vesa_term(); PRINT_VBE_ERR("vbeSetDisplayStart",err); @@ -482,25 +482,25 @@ } srcBpp = bpp; srcFourcc = format; - if(vo_dbpp) bpp = vo_dbpp; + if(vo.dbpp) bpp = vo.dbpp; switch(bpp) { - case 8: + case 8: dstFourcc = IMGFMT_BGR8; break; - case 15: + case 15: dstFourcc = IMGFMT_BGR15; break; - case 16: + case 16: dstFourcc = IMGFMT_BGR16; break; - case 24: + case 24: dstFourcc = IMGFMT_BGR24; break; - case 32: + case 32: dstFourcc = IMGFMT_BGR32; break; - default: + default: dstFourcc = IMGFMT_BGR16; break; } @@ -522,9 +522,9 @@ dstW = d_width; dstH = d_height; } - if(vo_screenwidth) w = vo_screenwidth; + if(vo.screenwidth) w = vo.screenwidth; else w = max(dstW,width); - if(vo_screenheight) h = vo_screenheight; + if(vo.screenheight) h = vo.screenheight; else h = max(dstH,height); for(i=0;i < num_modes;i++) { @@ -628,8 +628,8 @@ ,vsize); MSG_V(" at %08lXh",(unsigned long)lfb); MSG_V("\n"); - if(!(multi_size = fillMultiBuffer(vsize,vo_da_buffs))) return -1; - if(vo_doublebuffering && multi_size < 2) + if(!(multi_size = fillMultiBuffer(vsize,vo.da_buffs))) return -1; + if(vo.doublebuffering && multi_size < 2) MSG_ERR("vo_vesa: Can't use double buffering: not enough video memory\n"); else MSG_V("vo_vesa: using %u buffers for multi buffering\n",multi_size); @@ -728,7 +728,7 @@ return -1; } MSG_V("vo_vesa: VESA initialization complete\n"); - if(HAS_DGA() && vo_doublebuffering) + if(HAS_DGA() && vo.doublebuffering) { for(i=0;i<multi_size;i++) { Modified: mplayerxp/libvo/vo_x11.c =================================================================== --- mplayerxp/libvo/vo_x11.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_x11.c 2012-10-15 13:38:17 UTC (rev 159) @@ -95,8 +95,8 @@ if (ret & VO_EVENT_RESIZE) { unsigned idx; - unsigned newW= vo_dwidth; - unsigned newH= vo_dheight; + unsigned newW= vo.dwidth; + unsigned newH= vo.dheight; int newAspect= (newW*(1<<16) + (newH>>1))/newH; if(newAspect>baseAspect) newW= (newH*baseAspect + (1<<15))>>16; else newH= ((newW<<16) + (baseAspect>>1)) /baseAspect; @@ -131,7 +131,7 @@ UNUSED(info); - num_buffers=vo_doublebuffering?vo_da_buffs:1; + num_buffers=vo.doublebuffering?vo.da_buffs:1; if (!title) title = strdup("MPlayerXP X11 (XImage/Shm) render"); @@ -155,9 +155,9 @@ aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); - aspect_save_screenres(vo_screenwidth,vo_screenheight); + aspect_save_screenres(vo.screenwidth,vo.screenheight); - softzoom=flags&VOFLAG_SWSCALE; + vo.softzoom=flags&VOFLAG_SWSCALE; aspect(&d_width,&d_height,A_NOZOOM); if( fullscreen ) aspect(&d_width,&d_height,A_ZOOM); @@ -167,8 +167,8 @@ bg=WhitePixel( mDisplay,mScreen ); fg=BlackPixel( mDisplay,mScreen ); - vo_dwidth=hint.width; - vo_dheight=hint.height; + vo.dwidth=hint.width; + vo.dheight=hint.height; image_width=d_width; image_height=d_height; @@ -282,7 +282,7 @@ { XShmPutImage( mDisplay,vo_window,vo_gc,myximage, 0,0, - ( vo_dwidth - myximage->width ) / 2,( vo_dheight - myximage->height ) / 2, + ( vo.dwidth - myximage->width ) / 2,( vo.dheight - myximage->height ) / 2, myximage->width,myximage->height,True ); } else @@ -290,7 +290,7 @@ { XPutImage( mDisplay,vo_window,vo_gc,myximage, 0,0, - ( vo_dwidth - myximage->width ) / 2,( vo_dheight - myximage->height ) / 2, + ( vo.dwidth - myximage->width ) / 2,( vo.dheight - myximage->height ) / 2, myximage->width,myximage->height); } #endif @@ -312,7 +312,7 @@ if (IMGFMT_IS_RGB(format->fourcc) && rgbfmt_depth(format->fourcc)<48) #endif { - if (rgbfmt_depth(format->fourcc) == (unsigned)vo_depthonscreen) + if (rgbfmt_depth(format->fourcc) == (unsigned)vo.depthonscreen) return 0x1|0x2|0x4; else return 0x1|0x4; Modified: mplayerxp/libvo/vo_xv.c =================================================================== --- mplayerxp/libvo/vo_xv.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_xv.c 2012-10-15 13:38:17 UTC (rev 159) @@ -264,25 +264,25 @@ /* try all */ xv_reset_video_eq(); info.name=VO_EC_BRIGHTNESS; - info.value=vo_gamma_brightness; + info.value=vo.gamma.brightness; xv_set_video_eq(&info); info.name=VO_EC_CONTRAST; - info.value=vo_gamma_contrast; + info.value=vo.gamma.contrast; xv_set_video_eq(&info); info.name=VO_EC_SATURATION; - info.value=vo_gamma_saturation; + info.value=vo.gamma.saturation; xv_set_video_eq(&info); info.name=VO_EC_HUE; - info.value=vo_gamma_hue; + info.value=vo.gamma.hue; xv_set_video_eq(&info); info.name=VO_EC_RED_INTENSITY; - info.value=vo_gamma_red_intensity; + info.value=vo.gamma.red_intensity; xv_set_video_eq(&info); info.name=VO_EC_GREEN_INTENSITY; - info.value=vo_gamma_green_intensity; + info.value=vo.gamma.green_intensity; xv_set_video_eq(&info); info.name=VO_EC_BLUE_INTENSITY; - info.value=vo_gamma_blue_intensity; + info.value=vo.gamma.blue_intensity; xv_set_video_eq(&info); } @@ -320,22 +320,22 @@ image_width = width; image_format=format; - vo_fs=flags&VOFLAG_FULLSCREEN; - softzoom=flags&VOFLAG_SWSCALE; - if ( vo_fs ) - { vo_old_width=d_width; vo_old_height=d_height; } + vo.fs=flags&VOFLAG_FULLSCREEN; + vo.softzoom=flags&VOFLAG_SWSCALE; + if ( vo.fs ) + { vo.old_width=d_width; vo.old_height=d_height; } #ifdef HAVE_XF86VM if( flags&0x02 ) vm = 1; #endif flip_flag=flags&VOFLAG_FLIPPING; - num_buffers=vo_doublebuffering?vo_da_buffs:1; + num_buffers=vo.doublebuffering?vo.da_buffs:1; - aspect_save_screenres(vo_screenwidth,vo_screenheight); + aspect_save_screenres(vo.screenwidth,vo.screenheight); - aspect(&d_width,&d_height,softzoom?A_ZOOM:A_NOZOOM); - if( vo_fs ) aspect(&d_width,&d_height,A_ZOOM); + aspect(&d_width,&d_height,vo.softzoom?A_ZOOM:A_NOZOOM); + if( vo.fs ) aspect(&d_width,&d_height,A_ZOOM); vo_x11_calcpos(&hint,d_width,d_height,flags); hint.flags = PPosition | PSize; @@ -368,7 +368,7 @@ | ButtonPressMask | ButtonReleaseMask ))); XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint); - if ( vo_fs ) vo_x11_decoration( mDisplay,vo_window,0 ); + if ( vo.fs ) vo_x11_decoration( mDisplay,vo_window,0 ); XMapWindow(mDisplay, vo_window); #ifdef HAVE_XINERAMA vo_x11_xinerama_move(mDisplay,vo_window,&hint); @@ -464,16 +464,16 @@ XTranslateCoordinates( mDisplay,vo_window,mRoot,0,0,&drwcX,&drwcY,&mRoot ); MSG_V( "[xv] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); - aspect(&dwidth,&dheight,softzoom?A_ZOOM:A_NOZOOM); - if ( vo_fs ) + aspect(&dwidth,&dheight,vo.softzoom?A_ZOOM:A_NOZOOM); + if ( vo.fs ) { aspect(&dwidth,&dheight,A_ZOOM); - drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; + drwX=( vo.screenwidth - (dwidth > vo.screenwidth?vo.screenwidth:dwidth) ) / 2; drwcX+=drwX; - drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; + drwY=( vo.screenheight - (dheight > vo.screenheight?vo.screenheight:dheight) ) / 2; drwcY+=drwY; - drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); - drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight); + drwWidth=(dwidth > vo.screenwidth?vo.screenwidth:dwidth); + drwHeight=(dheight > vo.screenheight?vo.screenheight:dheight); MSG_V( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); } saver_off(mDisplay); // turning off screen saver @@ -528,23 +528,23 @@ XTranslateCoordinates( mDisplay,vo_window,mRoot,0,0,&drwcX,&drwcY,&mRoot ); MSG_V( "[xv-resize] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); - aspect(&dwidth,&dheight,softzoom?A_ZOOM:A_NOZOOM); - if ( vo_fs ) + aspect(&dwidth,&dheight,vo.softzoom?A_ZOOM:A_NOZOOM); + if ( vo.fs ) { aspect(&dwidth,&dheight,A_ZOOM); - drwX=( vo_screenwidth - (dwidth > vo_screenwidth?vo_screenwidth:dwidth) ) / 2; + drwX=( vo.screenwidth - (dwidth > vo.screenwidth?vo.screenwidth:dwidth) ) / 2; drwcX+=drwX; - drwY=( vo_screenheight - (dheight > vo_screenheight?vo_screenheight:dheight) ) / 2; + drwY=( vo.screenheight - (dheight > vo.screenheight?vo.screenheight:dheight) ) / 2; drwcY+=drwY; - drwWidth=(dwidth > vo_screenwidth?vo_screenwidth:dwidth); - drwHeight=(dheight > vo_screenheight?vo_screenheight:dheight); + drwWidth=(dwidth > vo.screenwidth?vo.screenwidth:dwidth); + drwHeight=(dheight > vo.screenheight?vo.screenheight:dheight); MSG_V( "[xv-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n",drwcX,drwcY,drwX,drwY,drwWidth,drwHeight ); } } if ( e & VO_EVENT_EXPOSE ) { XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[expose_idx], 0, 0, image_width, image_height, drwX, drwY, 1, 1, False); - XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[expose_idx], 0, 0, image_width, image_height, drwX,drwY,drwWidth,(vo_fs?drwHeight - 1:drwHeight), False); + XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[expose_idx], 0, 0, image_width, image_height, drwX,drwY,drwWidth,(vo.fs?drwHeight - 1:drwHeight), False); } return e|VO_EVENT_FORCE_UPDATE; } @@ -554,7 +554,7 @@ expose_idx=idx; XvShmPutImage(mDisplay, xv_port, vo_window, vo_gc, xvimage[idx], 0, 0, image_width, image_height, - drwX,drwY,drwWidth,(vo_fs?drwHeight - 1:drwHeight), + drwX,drwY,drwWidth,(vo.fs?drwHeight - 1:drwHeight), False); if (num_buffers>1) XFlush(mDisplay); else XSync(mDisplay, False); Modified: mplayerxp/libvo/vo_xvidix.c =================================================================== --- mplayerxp/libvo/vo_xvidix.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vo_xvidix.c 2012-10-15 13:38:17 UTC (rev 159) @@ -82,19 +82,19 @@ XTranslateCoordinates(mDisplay, vo_window, mRoot, 0, 0, &drwcX, &drwcY, &mRoot); - if (!vo_fs) + if (!vo.fs) MSG_V( "[xvidix] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n", drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); /* following stuff copied from vo_xmga.c */ - if (vo_fs) + if (vo.fs) { - drwX = (vo_screenwidth - (dwidth > vo_screenwidth ? vo_screenwidth : dwidth)) / 2; + drwX = (vo.screenwidth - (dwidth > vo.screenwidth ? vo.screenwidth : dwidth)) / 2; drwcX += drwX; - drwY = (vo_screenheight - (dheight > vo_screenheight ? vo_screenheight : dheight)) / 2; + drwY = (vo.screenheight - (dheight > vo.screenheight ? vo.screenheight : dheight)) / 2; drwcY += drwY; - drwWidth = (dwidth > vo_screenwidth ? vo_screenwidth : dwidth); - drwHeight = (dheight > vo_screenheight ? vo_screenheight : dheight); + drwWidth = (dwidth > vo.screenwidth ? vo.screenwidth : dwidth); + drwHeight = (dheight > vo.screenheight ? vo.screenheight : dheight); MSG_V( "[xvidix-fs] dcx: %d dcy: %d dx: %d dy: %d dw: %d dh: %d\n", drwcX, drwcY, drwX, drwY, drwWidth, drwHeight); } @@ -135,8 +135,8 @@ /* FIXME: implement runtime resize/move if possible, this way is very ugly! */ vidix_stop(); if (vidix_init(image_width, image_height, window_x, window_y, - window_width, window_height, image_format, vo_depthonscreen, - vo_screenwidth, vo_screenheight,info) != 0) + window_width, window_height, image_format, vo.depthonscreen, + vo.screenwidth, vo.screenheight,info) != 0) { MSG_FATAL( "Can't initialize VIDIX driver: %s: %s\n", vidix_name, strerror(errno)); @@ -157,7 +157,7 @@ XClearWindow( mDisplay,vo_window ); XSetForeground(mDisplay, vo_gc, fgColor); XFillRectangle(mDisplay, vo_window, vo_gc, drwX, drwY, drwWidth, - (vo_fs ? drwHeight - 1 : drwHeight)); + (vo.fs ? drwHeight - 1 : drwHeight)); /* flush, update drawable */ XFlush(mDisplay); @@ -219,21 +219,21 @@ } aspect_save_orig(width, height); aspect_save_prescale(d_width, d_height); - aspect_save_screenres(vo_screenwidth, vo_screenheight); + aspect_save_screenres(vo.screenwidth, vo.screenheight); window_x = 0; window_y = 0; window_width = d_width; window_height = d_height; - vo_fs = flags&0x01; - if (vo_fs) - { vo_old_width=d_width; vo_old_height=d_height; } + vo.fs = flags&0x01; + if (vo.fs) + { vo.old_width=d_width; vo.old_height=d_height; } X_already_started++; - + /* from xmga.c */ - switch(vo_depthonscreen) + switch(vo.depthonscreen) { case 32: case 24: @@ -247,12 +247,12 @@ break; default: MSG_ERR( "Sorry, this (%d) color depth is not supported\n", - vo_depthonscreen); + vo.depthonscreen); } aspect(&d_width, &d_height,flags & VOFLAG_SWSCALE?A_ZOOM:A_NOZOOM); - if (vo_fs) /* fullscreen */ + if (vo.fs) /* fullscreen */ { if (flags & VOFLAG_SWSCALE) { @@ -260,11 +260,11 @@ } else { - d_width = vo_screenwidth; - d_height = vo_screenheight; + d_width = vo.screenwidth; + d_height = vo.screenheight; } - window_width = vo_screenwidth; - window_height = vo_screenheight; + window_width = vo.screenwidth; + window_height = vo.screenheight; } dwidth = d_width; @@ -279,7 +279,7 @@ window_depth = 24; XMatchVisualInfo(mDisplay, mScreen, window_depth, TrueColor, &vinfo); - xswa.background_pixel = vo_fs ? BlackPixel(mDisplay, mScreen) : fgColor; + xswa.background_pixel = vo.fs ? BlackPixel(mDisplay, mScreen) : fgColor; xswa.border_pixel = 0; xswa.colormap = XCreateColormap(mDisplay, RootWindow(mDisplay, mScreen), vinfo.visual, AllocNone); @@ -300,7 +300,7 @@ vo_x11_classhint(mDisplay, vo_window, "xvidix"); vo_x11_hidecursor(mDisplay, vo_window); - if (vo_fs) vo_x11_decoration(mDisplay, vo_window, 0); + if (vo.fs) vo_x11_decoration(mDisplay, vo_window, 0); XGetNormalHints(mDisplay, vo_window, &hint); hint.x = window_x; Modified: mplayerxp/libvo/vosub_vidix.c =================================================================== --- mplayerxp/libvo/vosub_vidix.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/vosub_vidix.c 2012-10-15 13:38:17 UTC (rev 159) @@ -93,23 +93,23 @@ "vo_gamma_red_intensity=%i\n" "vo_gamma_green_intensity=%i\n" "vo_gamma_blue_intensity=%i\n" - ,vo_gamma_brightness - ,vo_gamma_saturation - ,vo_gamma_contrast - ,vo_gamma_hue - ,vo_gamma_red_intensity - ,vo_gamma_green_intensity - ,vo_gamma_blue_intensity); + ,vo.gamma.brightness + ,vo.gamma.saturation + ,vo.gamma.contrast + ,vo.gamma.hue + ,vo.gamma.red_intensity + ,vo.gamma.green_intensity + ,vo.gamma.blue_intensity); /* To use full set of vid_eq.cap */ if(vdlPlaybackGetEq(vidix_handler,&vid_eq) == 0) { - vid_eq.brightness = vo_gamma_brightness; - vid_eq.saturation = vo_gamma_saturation; - vid_eq.contrast = vo_gamma_contrast; - vid_eq.hue = vo_gamma_hue; - vid_eq.red_intensity = vo_gamma_red_intensity; - vid_eq.green_intensity = vo_gamma_green_intensity; - vid_eq.blue_intensity = vo_gamma_blue_intensity; + vid_eq.brightness = vo.gamma.brightness; + vid_eq.saturation = vo.gamma.saturation; + vid_eq.contrast = vo.gamma.contrast; + vid_eq.hue = vo.gamma.hue; + vid_eq.red_intensity = vo.gamma.red_intensity; + vid_eq.green_intensity = vo.gamma.green_intensity; + vid_eq.blue_intensity = vo.gamma.blue_intensity; vid_eq.flags = VEQ_FLG_ITU_R_BT_601; vdlPlaybackSetEq(vidix_handler,&vid_eq); } @@ -136,9 +136,9 @@ MSG_DBG2("vidix_term() was called\n"); vidix_stop(); vdlClose(vidix_handler); - if(vo_use_bm) + if(vo.use_bm) { - for(i=0;i<vo_da_buffs;i++) + for(i=0;i<vo.da_buffs;i++) { if(dma_mem_locked) munlock(bm_buffs[i],vidix_play->frame_size); free(bm_buffs[i]); @@ -202,7 +202,7 @@ void __FASTCALL__ vidix_change_frame(unsigned idx) { MSG_DBG2("vidix_change_frame() was called\n"); - if(vo_use_bm == 1) vidix_copy_dma(idx,0); + if(vo.use_bm == 1) vidix_copy_dma(idx,0); else vdlPlaybackFrameSelect(vidix_handler,idx); } @@ -417,8 +417,8 @@ vidix_play->dest.y = y_org; vidix_play->dest.w = dst_width; vidix_play->dest.h = dst_height; - vidix_play->num_frames=(vo_doublebuffering && vo_use_bm != 1)?NUM_FRAMES-1:1; - if(vidix_play->num_frames > vo_da_buffs) vidix_play->num_frames = vo_da_buffs; + vidix_play->num_frames=(vo.doublebuffering && vo.use_bm != 1)?NUM_FRAMES-1:1; + if(vidix_play->num_frames > vo.da_buffs) vidix_play->num_frames = vo.da_buffs; vidix_play->src.pitch.y = vidix_play->src.pitch.u = vidix_play->src.pitch.v = 0; if(info) { @@ -469,14 +469,14 @@ } MSG_V("using %d buffers\n", vidix_play->num_frames); /* configure busmastering */ - if(vo_use_bm) + if(vo.use_bm) { #ifdef HAVE_MEMALIGN if(vidix_cap->flags & FLAG_DMA) { int psize = getpagesize(); dma_mem_locked=1; - for(i=0;i<vo_da_buffs;i++) + for(i=0;i<vo.da_buffs;i++) { if(!bm_buffs[i]) bm_buffs[i] = memalign(psize, vidix_play->frame_size); if(!(bm_buffs[i])) @@ -501,10 +501,10 @@ #endif { MSG_ERR("Can not configure bus mastering: your driver is not DMA capable\n"); - vo_use_bm = 0; + vo.use_bm = 0; } } - if(vo_use_bm) MSG_OK("using BUSMASTERING\n"); + if(vo.use_bm) MSG_OK("using BUSMASTERING\n"); vidix_mem = vidix_play->dga_addr; if(!video_clean) @@ -573,7 +573,7 @@ static void __FASTCALL__ vidix_dri_get_surface_caps(dri_surface_cap_t *caps) { - caps->caps = vo_use_bm ? DRI_CAP_TEMP_VIDEO|DRI_CAP_BUSMASTERING : DRI_CAP_VIDEO_MMAPED; + caps->caps = vo.use_bm ? DRI_CAP_TEMP_VIDEO|DRI_CAP_BUSMASTERING : DRI_CAP_VIDEO_MMAPED; caps->caps |= DRI_CAP_HORZSCALER | DRI_CAP_VERTSCALER; if((vidix_cap->flags & FLAG_DOWNSCALER) == FLAG_DOWNSCALER) caps->caps |= DRI_CAP_DOWNSCALER; @@ -597,7 +597,7 @@ static void __FASTCALL__ vidix_dri_get_surface(dri_surface_t *surf) { - if(vo_use_bm) + if(vo.use_bm) { surf->planes[0] = bm_buffs[surf->idx] + vidix_play->offset.y; surf->planes[1] = bm_buffs[surf->idx] + vidix_play->offset.v; @@ -622,7 +622,7 @@ if(plugin_inited) return (*server_control)(request,data); break; case VOCTRL_GET_NUM_FRAMES: - *(uint32_t *)data = (vo_use_bm == 1) ? vo_da_buffs : vidix_play->num_frames; + *(uint32_t *)data = (vo.use_bm == 1) ? vo.da_buffs : vidix_play->num_frames; return VO_TRUE; case DRI_GET_SURFACE_CAPS: vidix_dri_get_surface_caps(data); @@ -631,7 +631,7 @@ vidix_dri_get_surface(data); return VO_TRUE; case VOCTRL_FLUSH_PAGES: - if(vo_use_bm > 1) vidix_copy_dma(*(uint32_t *)data,1); + if(vo.use_bm > 1) vidix_copy_dma(*(uint32_t *)data,1); return VO_TRUE; case VOCTRL_GET_EQUALIZER: if(!vidix_get_video_eq(data)) return VO_TRUE; Modified: mplayerxp/libvo/x11_common.c =================================================================== --- mplayerxp/libvo/x11_common.c 2012-10-15 11:06:19 UTC (rev 158) +++ mplayerxp/libvo/x11_common.c 2012-10-15 13:38:17 UTC (rev 159) @@ -267,7 +267,7 @@ XWindowAttributes attribs; char* dispName; - if(vo_depthonscreen) return 1; // already called + if(vo.depthonscreen) return 1; // already called XSetErrorHandler(x11_errorhandler); @@ -298,10 +298,10 @@ screens = XineramaQueryScreens(mDisplay, &num_screens); if(xinerama_screen >= num_screens) xinerama_screen = 0; - if (! vo_screenwidth) - vo_screenwidth=screens[xinerama_screen].width; - if (! vo_screenheight) - vo_screenheight=screens[xinerama_screen].height; + if (! vo.screenwidth) + vo.screenwidth=screens[xinerama_screen].width; + if (! vo.screenheight) + vo.screenheight=screens[xinerama_screen].height; xinerama_x = screens[xinerama_screen].x_org; xinerama_y = screens[xinerama_screen].y_org; @@ -313,15 +313,15 @@ { int clock; XF86VidModeGetModeLine( mDisplay,mScreen,&clock ,&modeline ); - if ( !vo_screenwidth ) vo_screenwidth=modeline.hdisplay; - if ( !vo_screenheight ) vo_screenheight=modeline.vdisplay; + if ( !vo.screenwidth ) vo.screenwidth=modeline.hdisplay; + if ( !vo.screenheight ) vo.screenheight=modeline.vdisplay; } #endif { - if (! vo_screenwidth) - vo_screenwidth=DisplayWidth( mDisplay,mScreen ); - if (! vo_screenheight) - vo_screenheight=DisplayHeight( mDisplay,mScreen ); + if (! vo.screenwidth) + vo.screenwidth=DisplayWidth( mDisplay,mScreen ); + if (! vo.screenheight) + vo.screenheight=DisplayHeight( mDisplay,mScreen ); } // get color depth (from root window, or the best visual): XGetWindowAttributes(mDisplay, mRootWin, &attribs); @@ -339,7 +339,7 @@ #endif mXImage=XGetImage( mDisplay,mRootWin,0,0,1,1,AllPlanes,ZPixmap ); - vo_depthonscreen = depth; // display depth on screen + vo.depthonscreen = depth; // display depth on screen // get bits/pixel from XImage structure: if (mXImage == NULL) { @@ -354,15 +354,15 @@ * Maybe we should rename vo_depthonscreen to (or add) vo_bpp? */ bpp=mXImage->bits_per_pixel; - if((vo_depthonscreen+7)/8 != (bpp+7)/8) vo_depthonscreen=bpp; // by A'rpi + if((vo.depthonscreen+7)/8 != (bpp+7)/8) vo.depthonscreen=bpp; // by A'rpi mask=mXImage->red_mask|mXImage->green_mask|mXImage->blue_mask; MSG_V("vo: X11 color mask: %X (R:%lX G:%lX B:%lX)\n", mask,mXImage->red_mask,mXImage->green_mask,mXImage->blue_mask); XDestroyImage( mXImage ); } - if(((vo_depthonscreen+7)/8)==2){ - if(mask==0x7FFF) vo_depthonscreen=15; else - if(mask==0xFFFF) vo_depthonscreen=16; + if(((vo.depthonscreen+7)/8)==2){ + if(mask==0x7FFF) vo.depthonscreen=15; else + if(mask==0xFFFF) vo.depthonscreen=16; } // XCloseDisplay( mDisplay ); /* slightly improved local display detection AST */ @@ -372,8 +372,8 @@ dispName += 9; if (*dispName==':') mLocalDisplay=1; else mLocalDisplay=0; MSG_V("vo: X11 running at %dx%d with depth %d and %d bits/pixel (\"%s\" => %s display)\n", - vo_screenwidth,vo_screenheight, - depth, vo_depthonscreen, + vo.screenwidth,vo.screenheight, + depth, vo.depthonscreen, dispName,mLocalDisplay?"local":"remote"); return 1; @@ -573,14 +573,14 @@ void __FASTCALL__ vo_x11_decoration( Display * vo_Display,Window w,int d ) { - if(vo_fsmode&1){ + if(vo.fsmode&1){ XSetWindowAttributes attr; attr.override_redirect = True; XChangeWindowAttributes(vo_Display, w, CWOverrideRedirect, &attr); // XMapWindow(vo_Display, w); } - if(vo_fsmode&8){ + if(vo.fsmode&8){ XSetTransientForHint (vo_Display, w, RootWindow(vo_Display,mScreen)); } @@ -595,12 +595,12 @@ d=MWM_DECOR_ALL; } #if 0 - vo_MotifWmHints.decorations=d|((vo_fsmode&2)?0:MWM_DECOR_MENU); + vo_MotifWmHints.decorations=d|((vo.fsmode&2)?0:MWM_DECOR_MENU); #else - vo_MotifWmHints.decorations=d|((vo_fsmode&2)?M... [truncated message content] |