summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Normand <pnormand@igalia.com>2010-09-21 12:49:31 +0200
committerEdward Hervey <bilboed@bilboed.com>2010-09-21 13:40:33 +0200
commit672bfc3369830d12b46b00e7f9ea2dedeb8ae00e (patch)
treef748cd750d531e94916040cf060cc822fd5d07b9
parent720369c06e9e4895549b90b269e1132943f4eb74 (diff)
v4l2: use the xoverlay APIs
-rw-r--r--sys/v4l2/gstv4l2xoverlay.c7
-rw-r--r--sys/v4l2/gstv4l2xoverlay.h12
2 files changed, 10 insertions, 9 deletions
diff --git a/sys/v4l2/gstv4l2xoverlay.c b/sys/v4l2/gstv4l2xoverlay.c
index 5ac302063..4c13e5bfd 100644
--- a/sys/v4l2/gstv4l2xoverlay.c
+++ b/sys/v4l2/gstv4l2xoverlay.c
@@ -127,7 +127,7 @@ gst_v4l2_xoverlay_open (GstV4l2Object * v4l2object)
v4l2object->xv = v4l2xv;
if (v4l2object->xwindow_id) {
- gst_v4l2_xoverlay_set_xwindow_id (v4l2object, v4l2object->xwindow_id);
+ gst_v4l2_xoverlay_set_window_handle (v4l2object, v4l2object->xwindow_id);
}
}
@@ -140,7 +140,7 @@ gst_v4l2_xoverlay_close (GstV4l2Object * v4l2object)
return;
if (v4l2object->xwindow_id) {
- gst_v4l2_xoverlay_set_xwindow_id (v4l2object, 0);
+ gst_v4l2_xoverlay_set_window_handle (v4l2object, 0);
}
XCloseDisplay (v4l2xv->dpy);
@@ -189,10 +189,11 @@ idle_refresh (gpointer data)
}
void
-gst_v4l2_xoverlay_set_xwindow_id (GstV4l2Object * v4l2object, XID xwindow_id)
+gst_v4l2_xoverlay_set_window_handle (GstV4l2Object * v4l2object, guintptr id)
{
GstV4l2Xv *v4l2xv;
XWindowAttributes attr;
+ XID xwindow_id = id;
gboolean change = (v4l2object->xwindow_id != xwindow_id);
GST_LOG_OBJECT (v4l2object->element, "Setting XID to %lx",
diff --git a/sys/v4l2/gstv4l2xoverlay.h b/sys/v4l2/gstv4l2xoverlay.h
index 3d15ce90a..bd77e8a2d 100644
--- a/sys/v4l2/gstv4l2xoverlay.h
+++ b/sys/v4l2/gstv4l2xoverlay.h
@@ -37,25 +37,25 @@ void gst_v4l2_xoverlay_start (GstV4l2Object *v4l2object);
void gst_v4l2_xoverlay_stop (GstV4l2Object *v4l2object);
void gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass);
-void gst_v4l2_xoverlay_set_xwindow_id (GstV4l2Object * v4l2object,
- XID xwindow_id);
+void gst_v4l2_xoverlay_set_window_handle (GstV4l2Object * v4l2object,
+ guintptr id);
#define GST_IMPLEMENT_V4L2_XOVERLAY_METHODS(Type, interface_as_function) \
\
static void \
-interface_as_function ## _xoverlay_set_xwindow_id (GstXOverlay * xoverlay, \
- XID xwindow_id) \
+interface_as_function ## _xoverlay_set_window_handle (GstXOverlay * xoverlay, \
+ guintptr id) \
{ \
Type *this = (Type*) xoverlay; \
- gst_v4l2_xoverlay_set_xwindow_id (this->v4l2object, xwindow_id); \
+ gst_v4l2_xoverlay_set_window_handle (this->v4l2object, id); \
} \
\
static void \
interface_as_function ## _xoverlay_interface_init (GstXOverlayClass * klass) \
{ \
/* default virtual functions */ \
- klass->set_xwindow_id = interface_as_function ## _xoverlay_set_xwindow_id; \
+ klass->set_window_handle = interface_as_function ## _xoverlay_set_window_handle; \
\
gst_v4l2_xoverlay_interface_init(klass); \
} \