[Qt] Add support for use GStreamer with the Qt build
Reviewed by Kenneth Christiansen, Tor Arne Vestbø.
JavaScriptCore:
Enable the build/inclusion of the wtf/QObject convenience classes.
* JavaScriptCore.pri:
* wtf/wtf.pri:
WebCore:
Make it possible to use gstreamer with the Qt build via the USE_GSTREAMER macro. The
integration is rather basic at this point, allowing for software based rendering
only at the moment. AC integration and fullscreen playback is still missing.
* WebCore.pro: Added a bunch of gstreamer files to the build and guard it as a
build option with the USE_GSTREAMER macro.
* platform/graphics/MediaPlayer.cpp:
(WebCore::installedMediaEngines): Don't use the generic media player registration
when using GStreamer. These #ifdefs should be removed, but the gstreamer folks want
to be able to build with gstreamer _and_ another backend simultaenously.
* platform/graphics/gstreamer/ImageGStreamer.h:
* platform/graphics/gstreamer/ImageGStreamerQt.cpp: Added.
(ImageGStreamer::createImage):
(ImageGStreamer::ImageGStreamer):
(ImageGStreamer::~ImageGStreamer):
* platform/graphics/gstreamer/PlatformVideoWindowPrivate.h: Added.
* platform/graphics/gstreamer/PlatformVideoWindowQt.cpp: Added.
(FullScreenVideoWindow::FullScreenVideoWindow):
(FullScreenVideoWindow::keyPressEvent):
(FullScreenVideoWindow::event):
(PlatformVideoWindow::PlatformVideoWindow):
(PlatformVideoWindow::~PlatformVideoWindow):
(PlatformVideoWindow::prepareForOverlay):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 3b0b395..3d0626a 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -3155,31 +3155,58 @@
bindings/js/JSAudioConstructor.cpp
}
- contains(MOBILITY_CONFIG, multimedia) {
- HEADERS += platform/graphics/qt/MediaPlayerPrivateQt.h
- SOURCES += platform/graphics/qt/MediaPlayerPrivateQt.cpp
+ contains(DEFINES, USE_GSTREAMER=1) {
+ HEADERS += \
+ platform/graphics/gstreamer/DataSourceGStreamer.h \
+ platform/graphics/gstreamer/GOwnPtrGStreamer.h \
+ platform/graphics/gstreamer/GStreamerGWorld.h \
+ platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h \
+ platform/graphics/gstreamer/VideoSinkGStreamer.h \
+ platform/graphics/gstreamer/WebKitWebSourceGStreamer.h \
+ platform/graphics/gstreamer/PlatformVideoWindow.h \
+ platform/graphics/gstreamer/PlatformVideoWindowPrivate.h \
+ platform/graphics/gstreamer/ImageGStreamer.h
+ SOURCES += \
+ platform/graphics/gstreamer/DataSourceGStreamer.cpp \
+ platform/graphics/gstreamer/GOwnPtrGStreamer.cpp \
+ platform/graphics/gstreamer/GStreamerGWorld.cpp \
+ platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp \
+ platform/graphics/gstreamer/VideoSinkGStreamer.cpp \
+ platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp \
+ platform/graphics/gstreamer/PlatformVideoWindowQt.cpp \
+ platform/graphics/gstreamer/ImageGStreamerQt.cpp
- CONFIG *= mobility
- MOBILITY += multimedia
- DEFINES += WTF_USE_QT_MULTIMEDIA
- } else:contains(QT_CONFIG, phonon) {
- HEADERS += \
- platform/graphics/qt/MediaPlayerPrivatePhonon.h
+ DEFINES += WTF_USE_GSTREAMER=1
+ DEFINES += ENABLE_GLIB_SUPPORT=1
- SOURCES += \
- platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+ INCLUDEPATH += $$PWD/platform/graphics/gstreamer
- # Add phonon manually to prevent it from coming first in
- # the include paths, as Phonon's path.h conflicts with
- # WebCore's Path.h on case-insensitive filesystems.
- qtAddLibrary(phonon)
- INCLUDEPATH -= $$QMAKE_INCDIR_QT/phonon
- INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon
- mac {
- INCLUDEPATH -= $$QMAKE_LIBDIR_QT/phonon.framework/Headers
- INCLUDEPATH += $$QMAKE_LIBDIR_QT/phonon.framework/Headers
- }
+ PKGCONFIG += glib-2.0 gio-2.0 gstreamer-0.10 gstreamer-app-0.10 gstreamer-base-0.10 gstreamer-interfaces-0.10 gstreamer-pbutils-0.10 gstreamer-plugins-base-0.10 gstreamer-video-0.10
+ } else:contains(MOBILITY_CONFIG, multimedia) {
+ HEADERS += platform/graphics/qt/MediaPlayerPrivateQt.h
+ SOURCES += platform/graphics/qt/MediaPlayerPrivateQt.cpp
+
+ CONFIG *= mobility
+ MOBILITY += multimedia
+ DEFINES += WTF_USE_QT_MULTIMEDIA
+ } else:contains(QT_CONFIG, phonon) {
+ HEADERS += \
+ platform/graphics/qt/MediaPlayerPrivatePhonon.h
+
+ SOURCES += \
+ platform/graphics/qt/MediaPlayerPrivatePhonon.cpp
+
+ # Add phonon manually to prevent it from coming first in
+ # the include paths, as Phonon's path.h conflicts with
+ # WebCore's Path.h on case-insensitive filesystems.
+ qtAddLibrary(phonon)
+ INCLUDEPATH -= $$QMAKE_INCDIR_QT/phonon
+ INCLUDEPATH += $$QMAKE_INCDIR_QT/phonon
+ mac {
+ INCLUDEPATH -= $$QMAKE_LIBDIR_QT/phonon.framework/Headers
+ INCLUDEPATH += $$QMAKE_LIBDIR_QT/phonon.framework/Headers
}
+ }
}
contains(DEFINES, ENABLE_XPATH=1) {