changeset 35080:a10c7a7a9232

Move some code around to make splitting into vo-specific and generic code easier.
author reimar
date Thu, 13 Sep 2012 18:30:12 +0000
parents d01a5c88bcc9
children 65f3a403ab3e
files libvo/vo_corevideo.h libvo/vo_corevideo.m
diffstat 2 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_corevideo.h	Thu Sep 13 18:07:14 2012 +0000
+++ b/libvo/vo_corevideo.h	Thu Sep 13 18:30:12 2012 +0000
@@ -84,7 +84,7 @@
 
 //window & rendering
 - (void) preinit;
-- (void) config;
+- (void) config:(uint32_t)width:(uint32_t)height:(uint32_t)flags;
 - (void) prepareOpenGL;
 - (void) render;
 - (void) reshape;
--- a/libvo/vo_corevideo.m	Thu Sep 13 18:07:14 2012 +0000
+++ b/libvo/vo_corevideo.m	Thu Sep 13 18:30:12 2012 +0000
@@ -190,21 +190,14 @@
 
 	if(!shared_buffer)
 	{
-		config_movie_aspect((float)d_width/d_height);
-
-		vo_dwidth  = d_width  *= mpGLView->winSizeMult;
-		vo_dheight = d_height *= mpGLView->winSizeMult;
-
 		image_data = malloc(image_height*image_stride);
 		image_datas[0] = image_data;
 		if (vo_doublebuffering)
 			image_datas[1] = malloc(image_height*image_stride);
 		image_page = 0;
 
-		vo_fs = flags & VOFLAG_FULLSCREEN;
-
 		//config OpenGL View
-		[mpGLView config];
+		[mpGLView config:d_width:d_height:flags];
 		[mpGLView reshape];
 		[[mpGLView window] setTitle:[NSString stringWithCString:vo_wintitle ? vo_wintitle : title]];
 	}
@@ -526,10 +519,15 @@
 	[super dealloc];
 }
 
-- (void) config
+- (void) config:(uint32_t)width:(uint32_t)height:(uint32_t)flags
 {
 	CVReturn error = kCVReturnSuccess;
 
+	config_movie_aspect((float)width/height);
+
+	vo_dwidth  = width  *= mpGLView->winSizeMult;
+	vo_dheight = height *= mpGLView->winSizeMult;
+
 	//config window
 	[window setContentSize:NSMakeSize(vo_dwidth, vo_dheight)];
 
@@ -560,6 +558,8 @@
 	//show window
 	[window makeKeyAndOrderFront:self];
 
+	vo_fs = flags & VOFLAG_FULLSCREEN;
+
 	if(vo_rootwin)
 		[self rootwin];