summaryrefslogtreecommitdiffstats
path: root/sys/v4l2/gstv4l2xoverlay.h
diff options
context:
space:
mode:
authorEdgard Lima <edgard.lima@indt.org.br>2006-05-11 17:59:59 +0000
committerEdgard Lima <edgard.lima@indt.org.br>2006-05-11 17:59:59 +0000
commit9edc0c0365f79ab07ff2e65461c6696e3931a3f0 (patch)
treeeb081684e6e2b5e8f88d7ef2672f5cef07fcb841 /sys/v4l2/gstv4l2xoverlay.h
parenta3c4acecbd4e9abd29b9a0f0f65a270f3913cc05 (diff)
Changes proposed by Wingo in bug #338818.
Original commit message from CVS: Changes proposed by Wingo in bug #338818.
Diffstat (limited to 'sys/v4l2/gstv4l2xoverlay.h')
-rw-r--r--sys/v4l2/gstv4l2xoverlay.h36
1 files changed, 32 insertions, 4 deletions
diff --git a/sys/v4l2/gstv4l2xoverlay.h b/sys/v4l2/gstv4l2xoverlay.h
index a0c25abc..1f39cc75 100644
--- a/sys/v4l2/gstv4l2xoverlay.h
+++ b/sys/v4l2/gstv4l2xoverlay.h
@@ -1,5 +1,6 @@
/* G-Streamer generic V4L2 element - X overlay interface implementation
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
+ * Copyright (C) 2006 Edgard Lima <edgard.lima@indt.org.br>
*
* gstv4l2xoverlay.h: tv mixer interface implementation for V4L2
*
@@ -22,16 +23,43 @@
#ifndef __GST_V4L2_X_OVERLAY_H__
#define __GST_V4L2_X_OVERLAY_H__
+#include <X11/X.h>
+
#include <gst/gst.h>
#include <gst/interfaces/xoverlay.h>
-#include "gstv4l2element.h"
+#include "gstv4l2object.h"
G_BEGIN_DECLS
-void gst_v4l2_xoverlay_interface_init (GstXOverlayClass *klass);
+void gst_v4l2_xoverlay_start (GstV4l2Object *v4l2object);
+void gst_v4l2_xoverlay_stop (GstV4l2Object *v4l2object);
+
+extern void gst_v4l2_xoverlay_set_xwindow_id (GstV4l2Object *v4l2object,
+ XID xwindow_id);
+
+extern void
+gst_v4l2_xoverlay_interface_init (GstXOverlayClass * klass);
+
+#define GST_IMPLEMENT_V4L2_XOVERLAY_METHODS(Type, interface_as_function) \
+ \
+static void \
+interface_as_function ## _xoverlay_set_xwindow_id (GstXOverlay * xoverlay, \
+ XID xwindow_id) \
+{ \
+ Type *this = (Type*) xoverlay; \
+ gst_v4l2_xoverlay_set_xwindow_id (this->v4l2object, xwindow_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; \
+ \
+ gst_v4l2_xoverlay_interface_init(GstXOverlayClass * klass); \
+} \
+ \
-void gst_v4l2_xoverlay_start (GstV4l2Element *v4l2element);
-void gst_v4l2_xoverlay_stop (GstV4l2Element *v4l2element);
#endif /* __GST_V4L2_X_OVERLAY_H__ */