[vlc-devel] Mac OS X Framework: Patch for minimal_macosx and lopengl

Faustino Osuna feosuna at hotmail.com
Sat Sep 29 16:41:03 CEST 2007


Hi all,

I'm a first time contributor.  I've been working with the Mac OS X Framework for VLC and found a few bugs.  More specifically, the test application included in SVN will not run because the video output plugin (opengl) is calling on an "opengl provider" plugin (libmacosx_plugin.dylib) that uses legacy APIs to render the video to a window (or subview).  If I delete libmacosx_plugin.dylib from the framework's modules folder, the application runs just fine.  

I figured that if I could tell libvlc with the initialization parameters that I wanted to use a specific opengl provider, that this would fix my problem.  So modified modules/opengl.c and modules/minimal_macosx/macosx.c to get my desired affect.  I added an "opengl-provider" parameter in opengl.c.  Then when opengl.c requests for an "opengl provider", I specified the value of "opengl-provider" as a shortcut.

In minimal_macosx I included the add_shortcut("provider_cocoa") declaration to allow me to choose this module as my opengl provider.  I modified the framework's VLCLibrary.m file to load libvlc as follows:
        char *lib_vlc_params[] = {             [applicationPath cString],             "-I", "dummy", "-vvvv", "--opengl-provider", "provider_cocoa", NULL        };        instance = libvlc_new(6, lib_vlc_params, &ex);

Now the test application loads with no problems, and actually uses the libminimal_macosx_plugin.dylib as the opengl provider versus libmacosx_plugin.dylib.

This patch shouldn't break anything, as it only adds a few lines.

Please see attached for the patch.

Any feedback is welcomed.

- Enrique


_________________________________________________________________
News, entertainment and everything you care about at Live.com. Get it now!
http://www.live.com/getstarted.aspx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070929/24386b09/attachment.html>


More information about the vlc-devel mailing list