1 /* GStreamer 2 * Copyright (C) 2010 Olivier Aubert <olivier.aubert@liris.cnrs.fr> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_RSVG_OVERLAY_H__ 21 #define __GST_RSVG_OVERLAY_H__ 22 23 #include <librsvg/rsvg.h> 24 #include <gst/gst.h> 25 #include <gst/video/video.h> 26 #include <gst/video/gstvideofilter.h> 27 #include <gst/base/gstadapter.h> 28 29 G_BEGIN_DECLS 30 #define GST_TYPE_RSVG_OVERLAY (gst_rsvg_overlay_get_type()) 31 #define GST_RSVG_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_RSVG_OVERLAY,GstRsvgOverlay)) 32 #define GST_RSVG_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_RSVG_OVERLAY,GstRsvgOverlayClass)) 33 #define GST_IS_RSVG_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_RSVG_OVERLAY)) 34 #define GST_IS_RSVG_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_RSVG_OVERLAY)) 35 typedef struct _GstRsvgOverlay GstRsvgOverlay; 36 typedef struct _GstRsvgOverlayClass GstRsvgOverlayClass; 37 38 /** 39 * GstRsvgOverlay: 40 * 41 * Opaque object data structure. 42 */ 43 struct _GstRsvgOverlay 44 { 45 GstVideoFilter element; 46 47 /* < private > */ 48 GMutex rsvg_lock; 49 50 RsvgHandle *handle; 51 52 /* width and height of the SVG data */ 53 int svg_width; 54 int svg_height; 55 56 int x_offset; 57 int y_offset; 58 float x_relative; 59 float y_relative; 60 61 int width; 62 int height; 63 float width_relative; 64 float height_relative; 65 66 GstPad *data_sinkpad; 67 GstAdapter *adapter; 68 }; 69 70 struct _GstRsvgOverlayClass 71 { 72 GstVideoFilterClass parent_class; 73 }; 74 75 GType gst_rsvg_overlay_get_type (void); 76 77 G_END_DECLS 78 #endif /* __GST_RSVG_OVERLAY_H__ */ 79