summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Ballesio <gibrovacco@gmail.com>2010-11-06 17:26:51 +0200
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.co.uk>2010-12-18 18:28:22 +0200
commit5d51030985784686c26de021cf84486114a6503d (patch)
tree94b1054829ab69ab7c8e159458ab4b6872de16b4
parente2e1659e602a8516b0c58e48e9a4e82242685d14 (diff)
Removed access to deprecated methods
The deprecated method gst_x_overlay_set_xwindow_id has been removed from GStreamer 0.10.31. This patch aligns the Gst::XOverlay interface with the gstreamer counterpart and changes the names of the methods to avoid ambiguity. For better conformance to Qt API, the WId type is also used for parameters to identify the window handle.
-rw-r--r--src/QGst/Ui/videowidget.cpp8
-rw-r--r--src/QGst/xoverlay.cpp4
-rw-r--r--src/QGst/xoverlay.h4
3 files changed, 7 insertions, 9 deletions
diff --git a/src/QGst/Ui/videowidget.cpp b/src/QGst/Ui/videowidget.cpp
index 4404cf8..7b43bf7 100644
--- a/src/QGst/Ui/videowidget.cpp
+++ b/src/QGst/Ui/videowidget.cpp
@@ -45,11 +45,7 @@ public:
{
WId windowId = widget()->winId(); //create a new X window (if we are on X11 with alien widgets)
QApplication::syncX(); //inform other applications about the new window (on X11)
-#ifdef Q_OS_WIN
- m_sink->setWindowId(reinterpret_cast<ulong>(windowId));
-#else
- m_sink->setWindowId(windowId);
-#endif
+ m_sink->setWindowHandle(windowId);
widget()->installEventFilter(this);
widget()->setAttribute(Qt::WA_NoSystemBackground, true);
@@ -59,7 +55,7 @@ public:
virtual ~XOverlayRenderer()
{
- m_sink->setWindowId(0);
+ m_sink->setWindowHandle(0);
widget()->removeEventFilter(this);
widget()->setAttribute(Qt::WA_NoSystemBackground, false);
widget()->setAttribute(Qt::WA_PaintOnScreen, false);
diff --git a/src/QGst/xoverlay.cpp b/src/QGst/xoverlay.cpp
index ebc6b35..ac5e650 100644
--- a/src/QGst/xoverlay.cpp
+++ b/src/QGst/xoverlay.cpp
@@ -25,9 +25,9 @@ void XOverlay::expose()
gst_x_overlay_expose(object<GstXOverlay>());
}
-void XOverlay::setWindowId(ulong id)
+void XOverlay::setWindowHandle(WId id)
{
- gst_x_overlay_set_xwindow_id(object<GstXOverlay>(), id);
+ gst_x_overlay_set_window_handle(object<GstXOverlay>(), id);
}
void XOverlay::setHandleEvents(bool enabled)
diff --git a/src/QGst/xoverlay.h b/src/QGst/xoverlay.h
index 52cad99..5a69f0a 100644
--- a/src/QGst/xoverlay.h
+++ b/src/QGst/xoverlay.h
@@ -18,6 +18,8 @@
#define QGST_XOVERLAY_H
#include "element.h"
+#include <QtGui/qwindowdefs.h>
+
class QRect;
namespace QGst {
@@ -30,7 +32,7 @@ class XOverlay : public Element
QGST_WRAPPER(XOverlay)
public:
void expose();
- void setWindowId(ulong id);
+ void setWindowHandle(WId id);
void setHandleEvents(bool enabled);
bool setRenderRectangle(int x, int y, int width, int height);
bool setRenderRectangle(const QRect & rect);