[MPlayer-dev-eng] PATCH: gl2 for APPLE boxes

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Thu Apr 1 22:22:15 CEST 2004


Hi,

> gl2 works very nice on my machine with the following drop through logic.
> 
> Darwin expects RGB32 and has an alpha always.
> 
> this patch coupled with the previously posted altivec colorspace codes 
> enable realtime execution of  mplayer on MAC's without SDL support.

I very much dislike #ifdefs, especially when they're distributed 
throughout the code..
Why did you do it the way you did it? e.g. this looks wrong to me. a_sz 
is supposed to be the alpha depth of the display!

   if(glXGetConfig(mDisplay,vinfo,GLX_ALPHA_SIZE, &a_sz)!=0)
           a_sz=0;
-
+#ifdef SYS_DARWIN
+  a_sz = 8;
+#endif

And what about that:
      case IMGFMT_BGR24:
-//    case IMGFMT_RGB32:
+#ifdef SYS_DARWIN
+    case IMGFMT_RGB32:
  //    case IMGFMT_BGR32:
+#endif
+

What happens when you do -vf format=RGB24 or -vf format=BGR24?

I would suggest something like the attached patch, this should make at 
least the a_sz hack unnecessary.

Greetings,
Reimar Döffinger

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gl2_darwin.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040401/12a46a1a/attachment.txt>


More information about the MPlayer-dev-eng mailing list