[MPlayer-cvslog] r35174 - in trunk/libvo: vo_corevideo.h vo_corevideo.m

reimar subversion at mplayerhq.hu
Thu Sep 13 20:30:12 CEST 2012


Author: reimar
Date: Thu Sep 13 20:30:12 2012
New Revision: 35174

Log:
Move some code around to make splitting into vo-specific and generic code easier.

Modified:
   trunk/libvo/vo_corevideo.h
   trunk/libvo/vo_corevideo.m

Modified: trunk/libvo/vo_corevideo.h
==============================================================================
--- trunk/libvo/vo_corevideo.h	Thu Sep 13 20:07:14 2012	(r35173)
+++ trunk/libvo/vo_corevideo.h	Thu Sep 13 20:30:12 2012	(r35174)
@@ -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;

Modified: trunk/libvo/vo_corevideo.m
==============================================================================
--- trunk/libvo/vo_corevideo.m	Thu Sep 13 20:07:14 2012	(r35173)
+++ trunk/libvo/vo_corevideo.m	Thu Sep 13 20:30:12 2012	(r35174)
@@ -190,21 +190,14 @@ static int config(uint32_t width, uint32
 
 	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 @@ static int control(uint32_t request, voi
 	[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 @@ static int control(uint32_t request, voi
 	//show window
 	[window makeKeyAndOrderFront:self];
 
+	vo_fs = flags & VOFLAG_FULLSCREEN;
+
 	if(vo_rootwin)
 		[self rootwin];
 


More information about the MPlayer-cvslog mailing list