[MPlayer-users] Mplayer will not play in fullscreen mode in OSX

alex bueno beingnonbeing at bellsouth.net
Tue Oct 28 23:53:34 CET 2003


ok, well i too am running 10.3 (retail). i compiled mplayer yesterday 
from cvs, but that's not the problem, that is if you had the same 
problem i did.

the bug with sdl in full screen was that it flickered rather badly, 
enough so that it was unwatchable (but it did enter full screen mode). 
someone made a patch for sdl to fix this problem; i saw it on the 
forums for mplayerosx at sf.net. you can get it here: 
http://home.tiscali.cz:8080/mplayer/yuv_patch.diff or just copy this:

Index: SDL_QuartzVideo.h
===================================================================
RCS file: 
/home/sdlweb/libsdl.org/cvs/SDL12/src/video/quartz/SDL_QuartzVideo.h,v
retrieving revision 1.15
diff -u -r1.15 SDL_QuartzVideo.h
--- SDL_QuartzVideo.h	1 Feb 2003 19:59:23 -0000	1.15
+++ SDL_QuartzVideo.h	5 Mar 2003 19:02:57 -0000
@@ -152,7 +152,8 @@
      PlanarPixmapInfoYUV420 *yuv_pixmap;
      Sint16                  yuv_width, yuv_height;
      CGrafPtr                yuv_port;
-
+    BOOL                    yuv_overlay_enabled;
+
  } SDL_PrivateVideoData ;

  #define _THIS    SDL_VideoDevice *this
@@ -199,7 +200,7 @@
  #define yuv_width (this->hidden->yuv_width)
  #define yuv_height (this->hidden->yuv_height)
  #define yuv_port (this->hidden->yuv_port)
-
+#define yuv_overlay_enabled (this->hidden->yuv_overlay_enabled)

  /* grab states - the input is in one of these states */
  enum {
Index: SDL_QuartzVideo.m
===================================================================
RCS file: 
/home/sdlweb/libsdl.org/cvs/SDL12/src/video/quartz/SDL_QuartzVideo.m,v
retrieving revision 1.26
diff -u -r1.26 SDL_QuartzVideo.m
--- SDL_QuartzVideo.m	1 Feb 2003 19:59:23 -0000	1.26
+++ SDL_QuartzVideo.m	5 Mar 2003 19:03:01 -0000
@@ -893,18 +893,21 @@

  static int QZ_FlipDoubleBuffer (_THIS, SDL_Surface *surface) {

-    /* wait for previous flip to complete */
-    SDL_SemWait (sem2);
+    if (! yuv_overlay_enabled) {

-    current_buffer = surface->pixels;
+        /* wait for previous flip to complete */
+        SDL_SemWait (sem2);

-    if (surface->pixels == sw_buffers[0])
-        surface->pixels = sw_buffers[1];
-    else
-        surface->pixels = sw_buffers[0];
-
-    /* signal worker thread to do the flip */
-    SDL_SemPost (sem1);
+        current_buffer = surface->pixels;
+
+        if (surface->pixels == sw_buffers[0])
+            surface->pixels = sw_buffers[1];
+        else
+            surface->pixels = sw_buffers[0];
+
+        /* signal worker thread to do the flip */
+        SDL_SemPost (sem1);
+    }

      return 0;
  }
@@ -1577,6 +1580,10 @@
      {
          SDL_SetError ("DecompressSequenceFrameS failed");
      }
+    else {
+
+        QDFlushPortBuffer (yuv_port, nil);
+    }

      return err == noErr;
  }
@@ -1597,6 +1604,8 @@

      free (yuv_matrix);
      DisposeHandle ((Handle)yuv_idh);
+
+    yuv_overlay_enabled = NO;
  }

  #include "SDL_yuvfuncs.h"
@@ -1675,6 +1684,7 @@

          port = [ [ qz_window contentView ] qdPort ];
          SetPort (port);
+        yuv_port = port;

          /*
              BUG: would like to remove white flash when window kicks in
@@ -1689,6 +1699,7 @@
      else {
          port = [ window_view qdPort ];
          SetPort (port);
+        yuv_port = port;
      }

      SetIdentityMatrix (yuv_matrix);
@@ -1699,6 +1710,7 @@
      (**yuv_idh).cType  = codec;
      (**yuv_idh).version = 1;
      (**yuv_idh).revisionLevel = 0;
+    (**yuv_idh).vendor = 'appl';
      (**yuv_idh).width = width;
      (**yuv_idh).height = height;
      (**yuv_idh).hRes = Long2Fix(72);
@@ -1820,6 +1832,8 @@

      yuv_width = overlay->w;
      yuv_height = overlay->h;
+
+    yuv_overlay_enabled = YES;

      return overlay;
  }

you can apply this to the sdl 1.2 release or to the 21 september cvs 
snapshot (http://www.libsdl.org/cvs/SDL-1.2.tar.gz). i tried building 
sdl from cvs yesterday and had trouble; it also seemed that this patch 
had been committed to cvs (or maybe the patch didn't want to apply -- 
can't remember).
after compiling sdl again, you have to recompile mplayer. it should 
then work.

hope this helps.

.afb

> Date: Tue, 28 Oct 2003 15:49:02 -0500
> From: Dave Chand <devchan1 at bellsouth.net>
> To: "MPlayer user's list." <mplayer-users at mplayerhq.hu>
> Subject: Re: [MPlayer-users] Mplayer will not play in fullscreen mode 
> in OSX
>
> It is true atleast for me. I am using the cvs version since the latest
> release does not compile on my machine. Also I compiled sdl myself.
>
>
> On Oct 28, 2003, at 3:13 PM, alex bueno wrote:
>
>> [Automatic answer: RTFM (read DOCS, FAQ), also read
>> DOCS/bugreports.html]
>> that's not true; works for me. how are you running mplayer? did you
>> compile it yourself? from cvs? how did you get sdl? etc.
>>
>> .afb
>>
>>> Date: Tue, 28 Oct 2003 14:34:05 -0500
>>> From: Dave Chand <devchan1 at bellsouth.net>
>>> To: mplayer-users at mplayerhq.hu
>>> Subject: [MPlayer-users] Mplayer will not play in fullscreen mode in
>>> OSX
>>> Message-ID: <B141E490-097D-11D8-9FC5-000A95A0956A at bellsouth.net>
>>> Content-Type: text/plain; charset=US-ASCII; format=flowed
>>> MIME-Version: 1.0 (Apple Message framework v606)
>>> Content-Transfer-Encoding: 7bit
>>> Precedence: list
>>> Reply-To: "MPlayer user's list." <mplayer-users at mplayerhq.hu>
>>> Message: 10
>>>
>>> hello,
>>>   	Mplayer will not play video in fullscreen mode on OS X 10.3 using
>>> SDL
>>> as the video out.
>>>
>>> -dave
>>
>> _______________________________________________
>> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
>> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
>> http://mplayerhq.hu/mailman/listinfo/mplayer-users
>>



More information about the MPlayer-users mailing list