diff options
Diffstat (limited to 'src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp')
-rw-r--r-- | src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp index d5d7bd0..3228722 100644 --- a/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp +++ b/src/plugins/mediaservices/gstreamer/mediaplayer/qgstreamerplayerservice.cpp @@ -63,7 +63,10 @@ QT_BEGIN_NAMESPACE QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent): - QMediaService(parent) + QMediaService(parent), + m_videoRenderer(0), + m_videoWindow(0), + m_videoWidget(0) { m_session = new QGstreamerPlayerSession(this); m_control = new QGstreamerPlayerControl(m_session, this); @@ -74,13 +77,22 @@ QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent): connect(m_videoOutput, SIGNAL(outputChanged(QVideoOutputControl::Output)), this, SLOT(videoOutputChanged(QVideoOutputControl::Output))); m_videoRenderer = new QGstreamerVideoRenderer(this); + +#ifdef Q_WS_X11 m_videoWindow = new QGstreamerVideoOverlay(this); m_videoWidget = new QGstreamerVideoWidgetControl(this); +#endif + + QList<QVideoOutputControl::Output> outputs; + + if (m_videoRenderer) + outputs << QVideoOutputControl::RendererOutput; + if (m_videoWidget) + outputs << QVideoOutputControl::WidgetOutput; + if (m_videoWindow) + outputs << QVideoOutputControl::WindowOutput; - m_videoOutput->setAvailableOutputs(QList<QVideoOutputControl::Output>() - << QVideoOutputControl::RendererOutput - << QVideoOutputControl::WindowOutput - << QVideoOutputControl::WidgetOutput); + m_videoOutput->setAvailableOutputs(outputs); } QGstreamerPlayerService::~QGstreamerPlayerService() |