diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-03-29 17:41:53 +0200 |
commit | 860ccd414dbb313fabf065b92838f0f39037584b (patch) | |
tree | 0d5c0d3510db3ca3d7e6487420e8d09f74ae1961 /gst/faceoverlay | |
parent | a9ec4d62a89dd53aa295af02c7d5f57ef936359b (diff) | |
parent | d84d98943af42ce645ee022207bcf04e747d2d4a (diff) | |
download | gstreamer-plugins-bad-860ccd414dbb313fabf065b92838f0f39037584b.tar.gz |
Merge remote-tracking branch 'origin/0.10'
Conflicts:
NEWS
RELEASE
common
configure.ac
docs/libs/gst-plugins-bad-libs-sections.txt
docs/plugins/gst-plugins-bad-plugins.args
docs/plugins/gst-plugins-bad-plugins.hierarchy
docs/plugins/gst-plugins-bad-plugins.interfaces
docs/plugins/inspect/plugin-adpcmdec.xml
docs/plugins/inspect/plugin-adpcmenc.xml
docs/plugins/inspect/plugin-assrender.xml
docs/plugins/inspect/plugin-audiovisualizers.xml
docs/plugins/inspect/plugin-autoconvert.xml
docs/plugins/inspect/plugin-bayer.xml
docs/plugins/inspect/plugin-bz2.xml
docs/plugins/inspect/plugin-camerabin2.xml
docs/plugins/inspect/plugin-celt.xml
docs/plugins/inspect/plugin-dataurisrc.xml
docs/plugins/inspect/plugin-debugutilsbad.xml
docs/plugins/inspect/plugin-dtmf.xml
docs/plugins/inspect/plugin-dtsdec.xml
docs/plugins/inspect/plugin-dvbsuboverlay.xml
docs/plugins/inspect/plugin-dvdspu.xml
docs/plugins/inspect/plugin-faac.xml
docs/plugins/inspect/plugin-faad.xml
docs/plugins/inspect/plugin-gsm.xml
docs/plugins/inspect/plugin-h264parse.xml
docs/plugins/inspect/plugin-mms.xml
docs/plugins/inspect/plugin-modplug.xml
docs/plugins/inspect/plugin-mpeg2enc.xml
docs/plugins/inspect/plugin-mpegdemux2.xml
docs/plugins/inspect/plugin-mpegtsdemux.xml
docs/plugins/inspect/plugin-mpegvideoparse.xml
docs/plugins/inspect/plugin-mplex.xml
docs/plugins/inspect/plugin-pcapparse.xml
docs/plugins/inspect/plugin-rawparse.xml
docs/plugins/inspect/plugin-rtpmux.xml
docs/plugins/inspect/plugin-rtpvp8.xml
docs/plugins/inspect/plugin-scaletempo.xml
docs/plugins/inspect/plugin-schro.xml
docs/plugins/inspect/plugin-sdp.xml
docs/plugins/inspect/plugin-segmentclip.xml
docs/plugins/inspect/plugin-shm.xml
docs/plugins/inspect/plugin-videomaxrate.xml
docs/plugins/inspect/plugin-videoparsersbad.xml
docs/plugins/inspect/plugin-vp8.xml
docs/plugins/inspect/plugin-y4mdec.xml
ext/celt/gstceltdec.c
ext/dts/gstdtsdec.c
ext/modplug/gstmodplug.cc
ext/opus/gstopusenc.c
gst-libs/gst/video/gstbasevideocodec.c
gst-libs/gst/video/gstbasevideocodec.h
gst-libs/gst/video/gstbasevideodecoder.c
gst-libs/gst/video/gstbasevideodecoder.h
gst-libs/gst/video/gstbasevideoencoder.c
gst-libs/gst/video/gstbasevideoencoder.h
gst/adpcmdec/Makefile.am
gst/audiovisualizers/gstbaseaudiovisualizer.c
gst/h264parse/gsth264parse.c
gst/mpegdemux/mpegtsparse.c
gst/mpegtsdemux/mpegtsbase.c
gst/mpegtsdemux/mpegtspacketizer.c
gst/mpegtsdemux/mpegtsparse.c
gst/mpegtsdemux/tsdemux.c
gst/mpegtsdemux/tsdemux.h
gst/mxf/mxfdemux.c
gst/rawparse/gstaudioparse.c
gst/videoparsers/gsth263parse.c
gst/videoparsers/gsth264parse.c
sys/d3dvideosink/d3dvideosink.c
sys/decklink/gstdecklinksink.cpp
sys/dvb/gstdvbsrc.c
sys/shm/gstshmsrc.c
sys/vdpau/h264/gstvdph264dec.c
sys/vdpau/mpeg/gstvdpmpegdec.c
tests/examples/opencv/gst_element_print_properties.c
win32/common/config.h
Diffstat (limited to 'gst/faceoverlay')
-rw-r--r-- | gst/faceoverlay/gstfaceoverlay.c | 358 | ||||
-rw-r--r-- | gst/faceoverlay/gstfaceoverlay.h | 9 |
2 files changed, 162 insertions, 205 deletions
diff --git a/gst/faceoverlay/gstfaceoverlay.c b/gst/faceoverlay/gstfaceoverlay.c index feb07b5bd..01c8f1b72 100644 --- a/gst/faceoverlay/gstfaceoverlay.c +++ b/gst/faceoverlay/gstfaceoverlay.c @@ -1,5 +1,4 @@ -/* - * GStreamer faceoverlay plugin +/* GStreamer faceoverlay plugin * Copyright (C) 2011 Laura Lucas Alday <lauralucas@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a @@ -52,7 +51,6 @@ * <title>Example launch line</title> * |[ * gst-launch autovideosrc ! ffmpegcolorspace ! faceoverlay location=/path/to/gnome-video-effects/pixmaps/bow.svg x=-5 y=-15 w=0.3 h=0.1 ! ffmpegcolorspace ! autovideosink - * ]| * </refsect2> */ @@ -70,19 +68,6 @@ GST_DEBUG_CATEGORY_STATIC (gst_face_overlay_debug); #define GST_CAT_DEFAULT gst_face_overlay_debug -#if G_BYTE_ORDER == G_LITTLE_ENDIAN -#define GST_STR_VIDEO_CAPS GST_VIDEO_CAPS_BGRA -#else -#define GST_STR_VIDEO_CAPS GST_VIDEO_CAPS_ARGB -#endif - -/* Filter signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - enum { PROP_0, @@ -93,17 +78,16 @@ enum PROP_H }; -/* the capabilities of the inputs and outputs. */ static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_STR_VIDEO_CAPS) + GST_STATIC_CAPS ("video/x-raw-rgb; video/x-raw-yuv") ); static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS (GST_STR_VIDEO_CAPS) + GST_STATIC_CAPS ("video/x-raw-rgb; video/x-raw-yuv") ); GST_BOILERPLATE (GstFaceOverlay, gst_face_overlay, GstBin, GST_TYPE_BIN); @@ -117,121 +101,62 @@ static void gst_face_overlay_message_handler (GstBin * bin, static GstStateChangeReturn gst_face_overlay_change_state (GstElement * element, GstStateChange transition); static gboolean gst_face_overlay_create_children (GstFaceOverlay * filter); -static gboolean gst_face_overlay_reset (GstFaceOverlay * filter); -static gboolean gst_face_overlay_create_pad (GstFaceOverlay * filter, - GstPad * filter_pad, const char *pad_name, GstElement * child_element); -static gboolean toggle_pads_link_state (GstPad * pad1, GstPad * pad2); - - -static gboolean -toggle_pads_link_state (GstPad * pad1, GstPad * pad2) -{ - gboolean ok = TRUE; - if (gst_pad_is_linked (pad1)) { - if (gst_pad_get_direction (pad1) == GST_PAD_SINK) - gst_pad_unlink (pad2, pad1); - else - gst_pad_unlink (pad1, pad2); - } else { - if (gst_pad_get_direction (pad1) == GST_PAD_SINK) - ok &= (gst_pad_link (pad2, pad1) == 0); - else - ok &= (gst_pad_link (pad1, pad2) == 0); - } - - return ok; -} - -/* Unlinks and removes the pad that was created in gst_face_overlay_init () - * and adds the internal element ghost pad instead */ static gboolean -gst_face_overlay_create_pad (GstFaceOverlay * filter, GstPad * filter_pad, - const char *pad_name, GstElement * child_element) +gst_face_overlay_create_children (GstFaceOverlay * filter) { - GstPad *peer = NULL; - GstPad *pad = NULL; - gboolean ok = TRUE; + GstElement *csp, *face_detect, *overlay; + GstPad *pad; - /* get the outside world pad connected to faceoverlay src/sink pad */ - peer = gst_pad_get_peer (filter_pad); + csp = gst_element_factory_make ("ffmpegcolorspace", NULL); + face_detect = gst_element_factory_make ("facedetect", NULL); + overlay = gst_element_factory_make ("rsvgoverlay", NULL); - /* unlink and remove the faceoverlay src/sink pad */ - toggle_pads_link_state (peer, filter_pad); + /* FIXME: post missing-plugin messages on NULL->READY if needed */ + if (csp == NULL || face_detect == NULL || overlay == NULL) + goto missing_element; - gst_element_remove_pad (GST_ELEMENT (filter), filter_pad); + g_object_set (face_detect, "display", FALSE, NULL); - /* add a ghost pad pointing to the child element pad (facedetect sink or - * svg_overlay src depending on filter_pad direction) and add it to - * faceoverlay bin */ - pad = gst_element_get_static_pad (child_element, pad_name); - filter_pad = gst_ghost_pad_new (pad_name, pad); - gst_object_unref (GST_OBJECT (pad)); + gst_bin_add_many (GST_BIN (filter), face_detect, csp, overlay, NULL); + filter->svg_overlay = overlay; - gst_element_add_pad (GST_ELEMENT (filter), filter_pad); + if (!gst_element_link_many (face_detect, csp, overlay, NULL)) + GST_ERROR_OBJECT (filter, "couldn't link elements"); - /* link the child element pad to the outside world thru the ghost pad */ - toggle_pads_link_state (peer, filter_pad); + pad = gst_element_get_static_pad (face_detect, "sink"); + if (!gst_ghost_pad_set_target (GST_GHOST_PAD (filter->sinkpad), pad)) + GST_ERROR_OBJECT (filter->sinkpad, "couldn't set sinkpad target"); + gst_object_unref (pad); - g_object_unref (peer); - - return ok; -} - -static gboolean -gst_face_overlay_reset (GstFaceOverlay * filter) -{ - gst_element_set_state (filter->face_detect, GST_STATE_NULL); - gst_bin_remove (GST_BIN (filter), filter->face_detect); - filter->face_detect = NULL; - - gst_element_set_state (filter->svg_overlay, GST_STATE_NULL); - gst_bin_remove (GST_BIN (filter), filter->svg_overlay); - filter->svg_overlay = NULL; - - gst_element_set_state (filter->colorspace, GST_STATE_NULL); - gst_bin_remove (GST_BIN (filter), filter->colorspace); - filter->colorspace = NULL; + pad = gst_element_get_static_pad (overlay, "src"); + if (!gst_ghost_pad_set_target (GST_GHOST_PAD (filter->srcpad), pad)) + GST_ERROR_OBJECT (filter->srcpad, "couldn't set srcpad target"); + gst_object_unref (pad); return TRUE; -} -static gboolean -gst_face_overlay_create_children (GstFaceOverlay * filter) -{ - gboolean ret = TRUE; +/* ERRORS */ +missing_element: + { + /* clean up */ + if (csp == NULL) + GST_ERROR_OBJECT (filter, "ffmpegcolorspace element not found"); + else + gst_object_unref (csp); - if ((filter->colorspace = gst_element_factory_make ("ffmpegcolorspace", - NULL)) == NULL) { - return FALSE; - } + if (face_detect == NULL) + GST_ERROR_OBJECT (filter, "facedetect element not found (opencv plugin)"); + else + gst_object_unref (face_detect); - if ((filter->face_detect = gst_element_factory_make ("facedetect", - NULL)) == NULL) { - return FALSE; - } - g_object_set (filter->face_detect, "display", 0, NULL); + if (overlay == NULL) + GST_ERROR_OBJECT (filter, "rsvgoverlay element not found (rsvg plugin)"); + else + gst_object_unref (overlay); - if ((filter->svg_overlay = gst_element_factory_make ("rsvgoverlay", - NULL)) == NULL) { return FALSE; } - - gst_bin_add_many (GST_BIN (filter), - filter->face_detect, filter->colorspace, filter->svg_overlay, NULL); - - ret &= gst_element_link_pads (filter->face_detect, "src", - filter->colorspace, "sink"); - ret &= gst_element_link_pads (filter->colorspace, "src", - filter->svg_overlay, "sink"); - - ret &= gst_face_overlay_create_pad (filter, filter->sinkpad, "sink", - filter->face_detect); - ret &= gst_face_overlay_create_pad (filter, filter->srcpad, "src", - filter->svg_overlay); - - return ret; - } static GstStateChangeReturn @@ -242,8 +167,13 @@ gst_face_overlay_change_state (GstElement * element, GstStateChange transition) switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: - if (!gst_face_overlay_create_children (filter)) + if (filter->svg_overlay == NULL) { + GST_ELEMENT_ERROR (filter, CORE, MISSING_PLUGIN, (NULL), + ("Some required plugins are missing, probably either the opencv " + "facedetect element or rsvgoverlay")); return GST_STATE_CHANGE_FAILURE; + } + filter->update_svg = TRUE; break; default: break; @@ -252,9 +182,6 @@ gst_face_overlay_change_state (GstElement * element, GstStateChange transition) ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition); switch (transition) { - case GST_STATE_CHANGE_READY_TO_NULL: - gst_face_overlay_reset (filter); - break; default: break; } @@ -263,65 +190,91 @@ gst_face_overlay_change_state (GstElement * element, GstStateChange transition) } static void +gst_face_overlay_handle_faces (GstFaceOverlay * filter, const GstStructure * s) +{ + guint x, y, width, height; + gint svg_x, svg_y, svg_width, svg_height; + const GstStructure *face; + const GValue *faces_list, *face_val; + gchar *new_location = NULL; + gint face_count; + +#if 0 + /* optionally draw the image once every two messages for better performance */ + filter->process_message = !filter->process_message; + if (!filter->process_message) + return; +#endif + + faces_list = gst_structure_get_value (s, "faces"); + face_count = gst_value_list_get_size (faces_list); + GST_LOG_OBJECT (filter, "face count: %d", face_count); + + if (face_count == 0) { + GST_DEBUG_OBJECT (filter, "no face, clearing overlay"); + g_object_set (filter->svg_overlay, "location", NULL, NULL); + GST_OBJECT_LOCK (filter); + filter->update_svg = TRUE; + GST_OBJECT_UNLOCK (filter); + return; + } + + /* The last face in the list seems to be the right one, objects mistakenly + * detected as faces for a couple of frames seem to be in the list + * beginning. TODO: needs confirmation. */ + face_val = gst_value_list_get_value (faces_list, face_count - 1); + face = gst_value_get_structure (face_val); + gst_structure_get_uint (face, "x", &x); + gst_structure_get_uint (face, "y", &y); + gst_structure_get_uint (face, "width", &width); + gst_structure_get_uint (face, "height", &height); + + /* Apply x and y offsets relative to face position and size. + * Set image width and height as a fraction of face width and height. + * Cast to int since face position and size will never be bigger than + * G_MAX_INT and we may have negative values as svg_x or svg_y */ + + GST_OBJECT_LOCK (filter); + + svg_x = (gint) x + (gint) (filter->x * width); + svg_y = (gint) y + (gint) (filter->y * height); + + svg_width = (gint) (filter->w * width); + svg_height = (gint) (filter->h * height); + + if (filter->update_svg) { + new_location = g_strdup (filter->location); + filter->update_svg = FALSE; + } + GST_OBJECT_UNLOCK (filter); + + if (new_location != NULL) { + GST_DEBUG_OBJECT (filter, "set rsvgoverlay location=%s", new_location); + g_object_set (filter->svg_overlay, "location", new_location, NULL); + g_free (new_location); + } + + GST_LOG_OBJECT (filter, "overlay dimensions: %d x %d @ %d,%d", + svg_width, svg_height, svg_x, svg_y); + + g_object_set (filter->svg_overlay, + "x", svg_x, "y", svg_y, "width", svg_width, "height", svg_height, NULL); +} + +static void gst_face_overlay_message_handler (GstBin * bin, GstMessage * message) { - if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT && - strcmp (gst_structure_get_name (message->structure), "facedetect") == 0) { - GstFaceOverlay *filter = GST_FACEOVERLAY (bin); - - /* optionally draw the image once every two messages for better performance - * filter->process_message = !filter->process_message; - * if(!filter->process_message) - * return; - */ - - guint x, y, width, height; - int delta_x, delta_y, svg_x, svg_y, svg_width, svg_height; - const GstStructure *face; - int face_count; - - face_count = - gst_value_list_get_size (gst_structure_get_value (message->structure, - "faces")); - - /* The last face in the list seems to be the right one, objects mistakenly - * detected as faces for a couple of frames seem to be in the list - * beginning. TODO: needs confirmation. */ - face = - gst_value_get_structure (gst_value_list_get_value - (gst_structure_get_value (message->structure, "faces"), - face_count - 1)); - gst_structure_get_uint (face, "x", &x); - gst_structure_get_uint (face, "y", &y); - gst_structure_get_uint (face, "width", &width); - gst_structure_get_uint (face, "height", &height); - - /* Apply x and y offsets relative to face position and size. - * Set image width and height as a fraction of face width and height. - * Cast to int since face position and size will never be bigger than - * G_MAX_INT and we may have negative values as svg_x or svg_y */ - - delta_x = (int) (filter->x * (int) width); - svg_x = (int) x + delta_x; - - delta_y = (int) (filter->y * (int) height); - svg_y = (int) y + delta_y; - - svg_width = (int) width *filter->w; - svg_height = (int) height *filter->h; - - g_object_set (filter->svg_overlay, - "location", filter->location, - "x", svg_x, "y", svg_y, "width", svg_width, "height", svg_height, NULL); + if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ELEMENT) { + const GstStructure *s = gst_message_get_structure (message); + if (gst_structure_has_name (s, "facedetect")) { + gst_face_overlay_handle_faces (GST_FACEOVERLAY (bin), s); + } } GST_BIN_CLASS (parent_class)->handle_message (bin, message); } -/* GObject vmethod implementations */ -/* the _base_init() function is meant to initialize class and child class - * properties during each new child class creation */ static void gst_face_overlay_base_init (gpointer gclass) { @@ -339,10 +292,6 @@ gst_face_overlay_base_init (gpointer gclass) gst_static_pad_template_get (&sink_factory)); } -/* initialize the faceoverlay's class */ -/* the _class_init() function is used to initialise the class only once - * (specifying what signals, arguments and virtual functions the class has and - * setting up global state) */ static void gst_face_overlay_class_init (GstFaceOverlayClass * klass) { @@ -382,34 +331,32 @@ gst_face_overlay_class_init (GstFaceOverlayClass * klass) GST_DEBUG_FUNCPTR (gst_face_overlay_message_handler); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_face_overlay_change_state); - } -/* initialize the new element - * instantiate pads and add them to element - * set pad calback functions - * initialize instance structure - * the _init() function is used to initialise a specific instance of this type. - */ static void gst_face_overlay_init (GstFaceOverlay * filter, GstFaceOverlayClass * gclass) { + GstPadTemplate *tmpl; + filter->x = 0; filter->y = 0; filter->w = 1; filter->h = 1; - filter->colorspace = NULL; filter->svg_overlay = NULL; - filter->face_detect = NULL; filter->location = NULL; filter->process_message = TRUE; - filter->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); + tmpl = gst_static_pad_template_get (&sink_factory); + filter->sinkpad = gst_ghost_pad_new_no_target_from_template ("sink", tmpl); + gst_object_unref (tmpl); gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); - filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); + tmpl = gst_static_pad_template_get (&src_factory); + filter->srcpad = gst_ghost_pad_new_no_target_from_template ("src", tmpl); + gst_object_unref (tmpl); gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); + gst_face_overlay_create_children (filter); } static void @@ -420,19 +367,31 @@ gst_face_overlay_set_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: + GST_OBJECT_LOCK (filter); + g_free (filter->location); filter->location = g_value_dup_string (value); + filter->update_svg = TRUE; + GST_OBJECT_UNLOCK (filter); break; case PROP_X: + GST_OBJECT_LOCK (filter); filter->x = g_value_get_float (value); + GST_OBJECT_UNLOCK (filter); break; case PROP_Y: + GST_OBJECT_LOCK (filter); filter->y = g_value_get_float (value); + GST_OBJECT_UNLOCK (filter); break; case PROP_W: + GST_OBJECT_LOCK (filter); filter->w = g_value_get_float (value); + GST_OBJECT_UNLOCK (filter); break; case PROP_H: + GST_OBJECT_LOCK (filter); filter->h = g_value_get_float (value); + GST_OBJECT_UNLOCK (filter); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -448,19 +407,29 @@ gst_face_overlay_get_property (GObject * object, guint prop_id, switch (prop_id) { case PROP_LOCATION: + GST_OBJECT_LOCK (filter); g_value_set_string (value, filter->location); + GST_OBJECT_UNLOCK (filter); break; case PROP_X: + GST_OBJECT_LOCK (filter); g_value_set_float (value, filter->x); + GST_OBJECT_UNLOCK (filter); break; case PROP_Y: + GST_OBJECT_LOCK (filter); g_value_set_float (value, filter->y); + GST_OBJECT_UNLOCK (filter); break; case PROP_W: + GST_OBJECT_LOCK (filter); g_value_set_float (value, filter->w); + GST_OBJECT_UNLOCK (filter); break; case PROP_H: + GST_OBJECT_LOCK (filter); g_value_set_float (value, filter->h); + GST_OBJECT_UNLOCK (filter); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -468,14 +437,9 @@ gst_face_overlay_get_property (GObject * object, guint prop_id, } } -/* entry point to initialize the plug-in - * initialize the plug-in itself - * register the element factories and other features - */ static gboolean faceoverlay_init (GstPlugin * faceoverlay) { - /* debug category for fltering log messages */ GST_DEBUG_CATEGORY_INIT (gst_face_overlay_debug, "faceoverlay", 0, "SVG Face Overlay"); @@ -483,18 +447,8 @@ faceoverlay_init (GstPlugin * faceoverlay) GST_TYPE_FACEOVERLAY); } -/* PACKAGE: this is usually set by autotools depending on some _INIT macro - * in configure.ac and then written into and defined in config.h, but we can - * just set it ourselves here in case someone doesn't use autotools to - * compile this code. GST_PLUGIN_DEFINE needs PACKAGE to be defined. - */ -#ifndef PACKAGE -#define PACKAGE "faceoverlay" -#endif - -/* gstreamer looks for this structure to register plugins */ GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, GST_VERSION_MINOR, "faceoverlay", "SVG Face Overlay", - faceoverlay_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/") + faceoverlay_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/faceoverlay/gstfaceoverlay.h b/gst/faceoverlay/gstfaceoverlay.h index 7b8e50c00..c21327b11 100644 --- a/gst/faceoverlay/gstfaceoverlay.h +++ b/gst/faceoverlay/gstfaceoverlay.h @@ -1,5 +1,4 @@ -/* - * GStreamer faceoverlay plugin +/* GStreamer faceoverlay plugin * Copyright (C) 2011 Laura Lucas Alday <lauralucas@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a @@ -47,7 +46,7 @@ #include <gst/gst.h> G_BEGIN_DECLS -/* #defines don't like whitespacey bits */ + #define GST_TYPE_FACEOVERLAY \ (gst_face_overlay_get_type()) #define GST_FACEOVERLAY(obj) \ @@ -58,6 +57,7 @@ G_BEGIN_DECLS (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_FACEOVERLAY)) #define GST_IS_FACEOVERLAY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FACEOVERLAY)) + typedef struct _GstFaceOverlay GstFaceOverlay; typedef struct _GstFaceOverlayClass GstFaceOverlayClass; @@ -73,6 +73,8 @@ struct _GstFaceOverlay gboolean process_message; + gboolean update_svg; + gchar *location; gfloat x; gfloat y; @@ -88,4 +90,5 @@ struct _GstFaceOverlayClass GType gst_face_overlay_get_type (void); G_END_DECLS + #endif /* __GST_FACEOVERLAY_H__ */ |