diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-26 19:59:33 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-26 19:59:33 (GMT) |
commit | a88e0c0d39ad524061a1f4079e992b8edda80a3e (patch) | |
tree | f66f7fd39373049fe89fecf8134f72a1988d8dac /src/plugins/mediaservices/qt7/qt7movierenderer.mm | |
parent | ca82ee4ee55e52c75326949148455af1095df014 (diff) | |
parent | 2e08308e49ea287a6dcb4ec257698281ac8ff0a8 (diff) | |
download | Qt-a88e0c0d39ad524061a1f4079e992b8edda80a3e.zip Qt-a88e0c0d39ad524061a1f4079e992b8edda80a3e.tar.gz Qt-a88e0c0d39ad524061a1f4079e992b8edda80a3e.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging:
Rebuild configure.exe
Make the Direct Show media service compile with a Qt namespace.
Make the Direct Show media service compile with mingw.
QT7; Fix warnings.
Qt namespace fixes.
Fixed QTMoview object leak.
QMediaContent: Add a convenience method to retrieve the QNetworkRequest.
Use the monitor color space for video output.
Test for the existance of the Windows Media SDK in configure.
Try to start media playback on all load state changes.
Remove all uses of __uuidof from the Direct Show media service.
QT7; Add support for setting cookies when loading a movie.
Diffstat (limited to 'src/plugins/mediaservices/qt7/qt7movierenderer.mm')
-rw-r--r-- | src/plugins/mediaservices/qt7/qt7movierenderer.mm | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/plugins/mediaservices/qt7/qt7movierenderer.mm b/src/plugins/mediaservices/qt7/qt7movierenderer.mm index 6b9fd21..1c1f5e4 100644 --- a/src/plugins/mediaservices/qt7/qt7movierenderer.mm +++ b/src/plugins/mediaservices/qt7/qt7movierenderer.mm @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE +//#define USE_MAIN_MONITOR_COLOR_SPACE 1 + class CVGLTextureVideoBuffer : public QAbstractVideoBuffer { public: @@ -233,7 +235,24 @@ bool QT7MovieRenderer::createPixelBufferVisualContext() &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionarySetValue(visualContextOptions, kQTVisualContextPixelBufferAttributesKey, pixelBufferOptions); - CFDictionarySetValue(visualContextOptions, kQTVisualContextWorkingColorSpaceKey, CGColorSpaceCreateDeviceRGB()); + + CGColorSpaceRef colorSpace = NULL; + +#if USE_MAIN_MONITOR_COLOR_SPACE + CMProfileRef sysprof = NULL; + + // Get the Systems Profile for the main display + if (CMGetSystemProfile(&sysprof) == noErr) { + // Create a colorspace with the systems profile + colorSpace = CGColorSpaceCreateWithPlatformColorSpace(sysprof); + CMCloseProfile(sysprof); + } +#endif + + if (!colorSpace) + colorSpace = CGColorSpaceCreateDeviceRGB(); + + CFDictionarySetValue(visualContextOptions, kQTVisualContextOutputColorSpaceKey, colorSpace); OSStatus err = QTPixelBufferContextCreate(kCFAllocatorDefault, visualContextOptions, |