diff options
author | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-31 14:34:00 (GMT) |
---|---|---|
committer | Norwegian Rock Cat <qt-info@nokia.com> | 2009-03-31 14:43:05 (GMT) |
commit | 0aaf811061f86c1b09670fff1e304d997bd34411 (patch) | |
tree | f256973d2beecb33e174cbe76623dc625d8e6c32 /src/3rdparty/phonon | |
parent | 2d13592054d1d6f049ecc1599913cb8c7541ef69 (diff) | |
download | Qt-0aaf811061f86c1b09670fff1e304d997bd34411.zip Qt-0aaf811061f86c1b09670fff1e304d997bd34411.tar.gz Qt-0aaf811061f86c1b09670fff1e304d997bd34411.tar.bz2 |
Get the qt7 phonon plugin to minimally compile on 10.6
We need to protect some overridden type and that is done in
qmacdefines_mac.h, so just include that. To top this off, a
function has changed that was introduced in 10.5. In order to
use it properly, we would need to do lots of version checking
and shuffling between types and it seems like more trouble that
it's worth at the moment. We may have to do that in the future,
but we'll deal with that then.
Diffstat (limited to 'src/3rdparty/phonon')
-rw-r--r-- | src/3rdparty/phonon/qt7/audionode.mm | 16 | ||||
-rw-r--r-- | src/3rdparty/phonon/qt7/backendinfo.mm | 1 | ||||
-rw-r--r-- | src/3rdparty/phonon/qt7/quicktimevideoplayer.h | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/3rdparty/phonon/qt7/audionode.mm b/src/3rdparty/phonon/qt7/audionode.mm index cb9e82f..961230c 100644 --- a/src/3rdparty/phonon/qt7/audionode.mm +++ b/src/3rdparty/phonon/qt7/audionode.mm @@ -68,13 +68,15 @@ void AudioNode::createAndConnectAUNodes() << QString(!FindNextComponent(0, &description) ? "ERROR: COMPONENT NOT FOUND!" : "OK!")) OSStatus err = noErr; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_5) - err = AUGraphAddNode(m_audioGraph->audioGraphRef(), &description, &m_auNode); - else -#endif - err = AUGraphNewNode(m_audioGraph->audioGraphRef(), &description, 0, 0, &m_auNode); - + + // The proper function to call here is AUGraphAddNode() but the type has + // changed between 10.5 and 10.6. it's still OK to call this function, but + // if we want to use the proper thing we need to move over to + // AudioComponentDescription everywhere, which is very similar to the + // ComponentDescription, but a different size. however, + // AudioComponentDescription only exists on 10.6+. More fun than we need to + // deal with at the moment, so we'll take the "deprecated" warning instead. + err = AUGraphNewNode(m_audioGraph->audioGraphRef(), &description, 0, 0, &m_auNode); BACKEND_ASSERT2(err != kAUGraphErr_OutputNodeErr, "A MediaObject can only be connected to one audio output device.", FATAL_ERROR) BACKEND_ASSERT2(err == noErr, "Could not create new AUNode.", FATAL_ERROR) } diff --git a/src/3rdparty/phonon/qt7/backendinfo.mm b/src/3rdparty/phonon/qt7/backendinfo.mm index e173f05..0d51db0 100644 --- a/src/3rdparty/phonon/qt7/backendinfo.mm +++ b/src/3rdparty/phonon/qt7/backendinfo.mm @@ -22,6 +22,7 @@ #include <AudioUnit/AudioUnit.h> #include <CoreServices/CoreServices.h> +#include <QtGui/qmacdefines_mac.h> #import <QTKit/QTMovie.h> #ifdef QUICKTIME_C_API_AVAILABLE diff --git a/src/3rdparty/phonon/qt7/quicktimevideoplayer.h b/src/3rdparty/phonon/qt7/quicktimevideoplayer.h index 0b3aec2..b80570a 100644 --- a/src/3rdparty/phonon/qt7/quicktimevideoplayer.h +++ b/src/3rdparty/phonon/qt7/quicktimevideoplayer.h @@ -20,6 +20,7 @@ #include "backendheader.h" +#include <QtGui/qmacdefines_mac.h> #import <QTKit/QTDataReference.h> #import <QTKit/QTMovie.h> |