From 4a246a0d9d3bba695bd84532ee4a6fca19415e1b Mon Sep 17 00:00:00 2001 From: Edgard Lima Date: Thu, 11 May 2006 17:59:59 +0000 Subject: Changes proposed by Wingo in bug #338818. Original commit message from CVS: Changes proposed by Wingo in bug #338818. --- sys/v4l2/gstv4l2xoverlay.h | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'sys/v4l2/gstv4l2xoverlay.h') 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 + * Copyright (C) 2006 Edgard Lima * * 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 + #include #include -#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__ */ -- cgit v1.2.1