From cc145719cd0605b4aee494fdeb2aceceb5287375 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Thu, 17 Jun 2004 17:07:50 +0000 Subject: [PATCH] notify; don't overlimit Original commit message from CVS: notify; don't overlimit --- ChangeLog | 7 +++++++ gst/videorate/gstvideorate.c | 9 ++++++--- gst/videoscale/videoscale.c | 4 ++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2904b3..22cf1ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2004-06-17 Thomas Vander Stichele + * gst/videorate/gstvideorate.c: (gst_videorate_chain): + notify drops and duplicates + * gst/videoscale/videoscale.c: (videoscale_get_structure): + no good reason to limit ourselves to 100x100 + +2004-06-17 Thomas Vander Stichele + * sys/v4l/gstv4lsrc.c: (gst_v4lsrc_class_init), (gst_v4lsrc_init), (gst_v4lsrc_open), (gst_v4lsrc_src_link), (gst_v4lsrc_getcaps), (gst_v4lsrc_get), (gst_v4lsrc_set_property), diff --git a/gst/videorate/gstvideorate.c b/gst/videorate/gstvideorate.c index 05ec2d4..f2c315f 100644 --- a/gst/videorate/gstvideorate.c +++ b/gst/videorate/gstvideorate.c @@ -348,12 +348,15 @@ gst_videorate_chain (GstPad * pad, GstData * data) while (diff1 <= diff2); /* if we outputed the first buffer more then once, we have dups */ - if (count > 1) + if (count > 1) { videorate->dup += count - 1; + g_object_notify (G_OBJECT (videorate), "duplicate"); + } /* if we didn't output the first buffer, we have a drop */ - else if (count == 0) + else if (count == 0) { videorate->drop++; - + g_object_notify (G_OBJECT (videorate), "drop"); + } // g_print ("swap: diff1 %lld, diff2 %lld, in %d, out %d, drop %d, dup %d\n", diff1, diff2, // videorate->in, videorate->out, videorate->drop, videorate->dup); diff --git a/gst/videoscale/videoscale.c b/gst/videoscale/videoscale.c index 04a15f8..d466d02 100644 --- a/gst/videoscale/videoscale.c +++ b/gst/videoscale/videoscale.c @@ -141,8 +141,8 @@ videoscale_get_structure (struct videoscale_format_struct *format) } gst_structure_set (structure, - "width", GST_TYPE_INT_RANGE, 100, G_MAXINT, - "height", GST_TYPE_INT_RANGE, 100, G_MAXINT, + "width", GST_TYPE_INT_RANGE, 16, G_MAXINT, + "height", GST_TYPE_INT_RANGE, 16, G_MAXINT, "framerate", GST_TYPE_DOUBLE_RANGE, 0.0, G_MAXDOUBLE, NULL); return structure; -- 2.7.4