[MPlayer-cvslog] r35244 - trunk/libvo/vo_corevideo.m
al
subversion at mplayerhq.hu
Fri Oct 12 23:21:07 CEST 2012
Author: al
Date: Fri Oct 12 23:21:07 2012
New Revision: 35244
Log:
vo corevideo: VOCTRL_UPDATE_SCREENINFO: Fix shared_buffer case
Do not just perform a NOP and then return VO_TRUE indicating success.
Instead set common vo variables and call aspect_save_screenres.
Patch by Zongyao Qu >zongyao.qu gmail.com<
Modified:
trunk/libvo/vo_corevideo.m
Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m Fri Oct 12 00:10:48 2012 (r35243)
+++ trunk/libvo/vo_corevideo.m Fri Oct 12 23:21:07 2012 (r35244)
@@ -117,6 +117,16 @@ static void free_file_specific(void)
}
}
+static void update_screen_info_shared_buffer(void)
+{
+ NSRect rc = [[NSScreen mainScreen] frame];
+ vo_screenwidth = rc.size.width;
+ vo_screenheight = rc.size.height;
+ xinerama_x = rc.origin.x;
+ xinerama_y = rc.origin.y;
+ aspect_save_screenres(vo_screenwidth, vo_screenheight);
+}
+
static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
{
free_file_specific();
@@ -390,7 +400,12 @@ static int control(uint32_t request, voi
case VOCTRL_FULLSCREEN: vo_fs = !vo_fs; if(!shared_buffer){ [mpGLView fullscreen: NO]; } else { [mplayerosxProto toggleFullscreen]; } return VO_TRUE;
case VOCTRL_GET_PANSCAN: return VO_TRUE;
case VOCTRL_SET_PANSCAN: panscan_calc(); return VO_TRUE;
- case VOCTRL_UPDATE_SCREENINFO: [mpGLView update_screen_info]; return VO_TRUE;
+ case VOCTRL_UPDATE_SCREENINFO:
+ if (shared_buffer)
+ update_screen_info_shared_buffer();
+ else
+ [mpGLView update_screen_info];
+ return VO_TRUE;
}
return VO_NOTIMPL;
}
More information about the MPlayer-cvslog
mailing list