[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [phonon-gstreamer/1.0-porting-for-merge] gstreamer: Merge branch '4.7' into 1.0-porting-for-merge
From:       Dan_Vrátil <dvratil () redhat ! com>
Date:       2014-04-08 18:10:19
Message-ID: E1WXaTT-0002Cc-BH () scm ! kde ! org
[Download RAW message or body]

Git commit 1c8de75487228a5a5d4f275af7b2c6117c74de28 by Dan Vrátil.
Committed on 08/04/2014 at 18:10.
Pushed by dvratil into branch '1.0-porting-for-merge'.

Merge branch '4.7' into 1.0-porting-for-merge

Conflicts:
	gstreamer/x11renderer.cpp

M  +13   -0    gstreamer/videowidget.cpp
M  +6    -14   gstreamer/x11renderer.cpp

http://commits.kde.org/phonon-gstreamer/1c8de75487228a5a5d4f275af7b2c6117c74de28

diff --cc gstreamer/x11renderer.cpp
index c730ad7,8b1d9ef..bc9107a
--- a/gstreamer/x11renderer.cpp
+++ b/gstreamer/x11renderer.cpp
@@@ -168,27 -160,11 +168,20 @@@ void X11Renderer::handlePaint(QPaintEve
  
  void X11Renderer::setOverlay()
  {
 -    if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) {
 +    if (m_videoSink &&
 +        #if GST_VERSION < GST_VERSION_CHECK (1,0,0,0)
 +            GST_IS_X_OVERLAY(m_videoSink)
 +        #else
 +            GST_IS_VIDEO_OVERLAY(m_videoSink)
 +        #endif
 +            ) {
          WId windowId = m_renderWidget->winId();
-         // Even if we have created a winId at this point, other X applications
-         // need to be aware of it.
- #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- #warning syncx
- //         QApplication::syncX();
- #else
-         QApplication::syncX();
- #endif // QT_VERSION
 -#if GST_VERSION >= GST_VERSION_CHECK(0,10,31,0)
++
 +#if GST_VERSION >= GST_VERSION_CHECK (1,0,0,0)
 +        gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(m_videoSink), windowId);
 +#elif GST_VERSION >= GST_VERSION_CHECK(0,10,31,0)
          gst_x_overlay_set_window_handle(GST_X_OVERLAY(m_videoSink), windowId);
 -#else
 +#elif GST_VERSION <= GST_VERSION_CHECK(0,10,31,0)
          gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_videoSink), windowId);
  #endif // GST_VERSION
      }
@@@ -198,24 -174,13 +191,23 @@@
  
  void X11Renderer::windowExposed()
  {
- #if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
- #warning syncx
- //     QApplication::syncX();
- #else
-     QApplication::syncX();
- #endif //QT_VERSION
+     // This can be invoked within a callchain in an arbitrary thread, so make
+     // sure we call syncX() from the main thread
+     QMetaObject::invokeMethod(m_videoWidget, "syncX",
+                               Qt::QueuedConnection);
+ 
 -    if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink))
 +    if (m_videoSink &&
 +        #if GST_VERSION < GST_VERSION_CHECK (1,0,0,0)
 +            GST_IS_X_OVERLAY(m_videoSink)
 +        #else
 +            GST_IS_VIDEO_OVERLAY(m_videoSink)
 +        #endif
 +            )
 +#if GST_VERSION < GST_VERSION_CHECK (1,0,0,0)
          gst_x_overlay_expose(GST_X_OVERLAY(m_videoSink));
 +#else
 +        gst_video_overlay_expose(GST_VIDEO_OVERLAY(m_videoSink));
 +#endif
  }
  
  }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic