[vlc-devel] Set of patches to make VLC Qt4 interface compile and run on Mac
Juho Vähä-Herttua
juhovh at iki.fi
Wed Jul 21 15:58:33 CEST 2010
Hi,
I'm soon going to send a set of patches that aim to make the current git
master to compile on Mac. Currently it only works with Qt4 that is
compiled with Cocoa, as it passes the WId directly to video_output and
as http://doc.qt.nokia.com/4.6/qwidget.html#winId says:
"On Mac OS X, the type returned depends on which framework Qt was linked
against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If
Qt is using Cocoa, {WId} is a pointer to an NSView."
It can be made to work on Carbon compiled Qt as well with
QMacCocoaViewContainer if running on OSX 10.5 or newer, as explained in
http://doc.trolltech.com/4.6/qmaccocoaviewcontainer.html, but that
would've practically required adding some Objective-C++ file that could
access both Cocoa and Qt4 and I didn't bother at least for now.
When compiling, something like:
export QT4_CFLAGS="-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
-I/usr/local/Qt4.6/mkspecs/macx-g++ -I.
-I/Library/Frameworks/QtCore.framework/Versions/4/Headers
-I/usr/include/QtCore
-I/Library/Frameworks/QtGui.framework/Versions/4/Headers
-I/usr/include/QtGui -I/usr/include -F/Library/Frameworks"
export QT4_LIBS="-F/Library/Frameworks -L/Library/Frameworks -framework
QtGui -framework QtCore"
should be exported on the command line before configure for it to work
with the Qt4 binaries downloadable from qt.nokia.com. Personally I used
the prerelease binaries at
http://qt.nokia.com/developer/qt-qtcreator-prerelease for testing.
It crashes a lot, but at least I can hear the sound and watch the video,
so I'd call it a good starting point.
Juho
More information about the vlc-devel
mailing list