[MPlayer-dev-eng] fullscreen problem when using mplayerosx

Ulion ulion2002 at gmail.com
Tue Aug 21 02:06:33 CEST 2007


2007/8/21, Nicolas Plourde <nicolas.plourde at gmail.com>:
>
> On 20-Aug-07, at 1:09 AM, Ulion wrote:
>
> > 2007/8/20, Compn <tempn at twmi.rr.com>:
> >> On Mon, 20 Aug 2007 11:19:38 +0800, Ulion scribed:
> >>
> >>
> >>> found a problem to set mplayer fullscreen when run mplayer with the
> >>> mplayerosx.
> >>
> >> mplayerosx is evil and uses the applekey-f to fullscreen by default.
> >>
> >> -compn
> >> _______________________________________________
> >> MPlayer-dev-eng mailing list
> >> MPlayer-dev-eng at mplayerhq.hu
> >> http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
> >>
> >
> > It does support key 'f' to fullscreen if you using other output module
> > instead of "mplayer osx".
> > This problem mainly caused by the share_buffer output mode of
> > vo_macosx.
> >
> >
>
> In shared mode mplayerosx should handle the window size and
> fullscreen mode. It was made like that.
>
> ====
> Nicolas Plourde <nicolas.plourde at gmail.com>
>

Yes, but now do you have any idea how to support using Apple Remote
with mplayerosx to do a fullscreen action?
current svn mplayer support Apple Remote, but fullscreen action (if
set it in input.conf file) will not work, only way to support it is to
change the action chain of share_buffer mode.
Still it is the mplayerosx to control windows' size, but it not
directly send fullscreen command to it's own VideoOpenGLView, it send
fullscreen command to mplayer (current code always did), and then
mplayer's vo_macosx send the command back to the
mplayerosxProxy(VideoOpenGLView), then the fullscreen will work with
mplayerosx and mplayer at sametime.

It not change the fact that mplayerosx control windows size, it just
changed the action chain.
three lines changed, two lines in PlayController.m, and one line in vo_macosx.m


Index: Sources/Controllers/PlayerController.m
===================================================================
- (IBAction)switchFullscreen:(id)sender
{
	if ([myPlayer status] > 0) {
		// if mplayer is playing
		if ([myPlayer fullscreen])
			[myPlayer setFullscreen:NO];
		else
			[myPlayer setFullscreen:YES];
		[myPlayer applySettingsWithRestart:NO];
-		
-		if(![myPlayer isWindowed])
-			[videoOpenGLView toggleFullscreen];
	}
 }
 /************************************************************************************/

Index: libvo/vo_macosx.m
===================================================================
		case VOCTRL_ONTOP: vo_ontop = (!(vo_ontop)); [mpGLView ontop]; return VO_TRUE;
		case VOCTRL_ROOTWIN: vo_rootwin = (!(vo_rootwin)); [mpGLView
rootwin]; return VO_TRUE;
- 		case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); [mpGLView fullscreen:
NO]; return VO_TRUE;
+		case VOCTRL_FULLSCREEN: vo_fs = (!(vo_fs)); [mpGLView fullscreen:
NO]; [mplayerosxProxy toggleFullscreen]; return VO_TRUE;
		case VOCTRL_GET_PANSCAN: return VO_TRUE;
		case VOCTRL_SET_PANSCAN: [mpGLView panscan]; return VO_TRUE;
	}

I tested it, it works fine, would't break anything. Since mplayerosx
is just designed work on osx, support Apple Remote is reasonable,
please consider it.

-- 
Ulion



More information about the MPlayer-dev-eng mailing list