[Mplayer-cvslog] CVS: main/libvo vo_quartz.c,1.35,1.36
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Fri Oct 29 03:24:16 CEST 2004
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv26619/libvo
Modified Files:
vo_quartz.c
Log Message:
enable pan-scan + menu option
Index: vo_quartz.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_quartz.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- vo_quartz.c 28 Oct 2004 23:06:35 -0000 1.35
+++ vo_quartz.c 29 Oct 2004 01:24:14 -0000 1.36
@@ -75,6 +75,7 @@
extern int vo_keepaspect; //keep aspect ratio when resizing
extern float movie_aspect;
static float old_movie_aspect;
+extern float vo_panscan;
static int winLevel = 1;
int levelList[] =
@@ -124,7 +125,8 @@
kKeepAspectCmd = 6,
kAspectOrgCmd = 7,
kAspectFullCmd = 8,
- kAspectWideCmd = 9
+ kAspectWideCmd = 9,
+ kPanScanCmd = 10
};
#include "osdep/keycodes.h"
@@ -401,6 +403,11 @@
window_resized();
break;
+ case kPanScanCmd:
+ vo_panscan = 1;
+ vo_fs = 1; window_fullscreen();
+ break;
+
default:
result = eventNotHandledErr;
break;
@@ -487,6 +494,7 @@
AppendMenuItemTextWithCFString(aspectMenu, CFSTR("Keep"), 0, kKeepAspectCmd, &index);
CheckMenuItem (aspectMenu, 1, vo_keepaspect);
+ AppendMenuItemTextWithCFString(aspectMenu, CFSTR("Pan-Scan"), 0, kPanScanCmd, &index);
AppendMenuItemTextWithCFString(aspectMenu, NULL, kMenuItemAttrSeparator, NULL, &index);
AppendMenuItemTextWithCFString(aspectMenu, CFSTR("Original"), 0, kAspectOrgCmd, &index);
AppendMenuItemTextWithCFString(aspectMenu, CFSTR("4:3"), 0, kAspectFullCmd, &index);
@@ -578,6 +586,7 @@
vo_fs = flags & VOFLAG_FULLSCREEN;
//get movie aspect
+ panscan_init();
aspect_save_orig(width,height);
aspect_save_prescale(d_width,d_height);
aspect_save_screenres(device_width, device_height);
@@ -1099,6 +1108,9 @@
case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); window_fullscreen(); return VO_TRUE;
case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); window_ontop(); return VO_TRUE;
case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t*)data));
+ case VOCTRL_GET_PANSCAN: return VO_TRUE;
+ case VOCTRL_SET_PANSCAN: window_resized(); return VO_TRUE;
+
case VOCTRL_GET_IMAGE:
switch (image_format)
{
@@ -1167,6 +1179,13 @@
{
SetRect(&dstRect, 0, 0, winRect.right, winRect.bottom-border);
}
+
+ if(vo_fs)
+ {
+ panscan_calc();
+ MoveWindow(theWindow, 0-(vo_panscan_x >> 1), 0-(vo_panscan_y >> 1), 1);
+ SizeWindow(theWindow, device_width+vo_panscan_x, device_height+vo_panscan_y,1);
+ }
//Clear Background
tmpBounds = CGRectMake( 0, border, winRect.right, winRect.bottom);
More information about the MPlayer-cvslog
mailing list