summaryrefslogtreecommitdiff
path: root/gst/faceoverlay
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2012-03-15 22:58:11 +0100
committerStefan Sauer <ensonic@users.sf.net>2012-03-15 22:58:11 +0100
commit288c6fa26cb87fad9d6695ac4e52f0a090379178 (patch)
treef127678ad2cb46db76d7e46cb7791123add0a5e5 /gst/faceoverlay
parenta31a698943b2402da2e23886b46e61f9d143ce4e (diff)
downloadgstreamer-plugins-bad-288c6fa26cb87fad9d6695ac4e52f0a090379178.tar.gz
faceoverlay: code cleanups
Use glib types and simply expressions in the message handler.
Diffstat (limited to 'gst/faceoverlay')
-rw-r--r--gst/faceoverlay/gstfaceoverlay.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gst/faceoverlay/gstfaceoverlay.c b/gst/faceoverlay/gstfaceoverlay.c
index 7d87fc726..56c0522f3 100644
--- a/gst/faceoverlay/gstfaceoverlay.c
+++ b/gst/faceoverlay/gstfaceoverlay.c
@@ -194,11 +194,11 @@ static void
gst_face_overlay_handle_faces (GstFaceOverlay * filter, const GstStructure * s)
{
guint x, y, width, height;
- int delta_x, delta_y, svg_x, svg_y, svg_width, svg_height;
+ gint svg_x, svg_y, svg_width, svg_height;
const GstStructure *face;
const GValue *faces_list, *face_val;
gchar *new_location = NULL;
- int face_count;
+ gint face_count;
#if 0
/* optionally draw the image once every two messages for better performance */
@@ -237,14 +237,11 @@ gst_face_overlay_handle_faces (GstFaceOverlay * filter, const GstStructure * s)
GST_OBJECT_LOCK (filter);
- delta_x = (int) (filter->x * (int) width);
- svg_x = (int) x + delta_x;
+ svg_x = (gint) x + (gint) (filter->x * width);
+ svg_y = (gint) y + (gint) (filter->y * height);
- 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;
+ svg_width = (gint) (filter->w * width);
+ svg_height = (gint) (filter->h * height);
if (filter->update_svg) {
new_location = g_strdup (filter->location);