From: Benjamin O. <co...@pd...> - 2004-06-29 00:34:53
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: company Date: Tue Jun 29 2004 10:34:50 EST Log message: * gst/gstpad.c: (gst_pad_get_caps): throw an error if the getcaps function does not return a subset of the template caps. * libs/gst/bytestream/filepad.c: (gst_file_pad_chain): make disconts without position info an error in debugging * tests/spidey_bench.c: (handoff), (main): don't count first try when averaging Modified files: . : ChangeLog gst : gstpad.c libs/gst/bytestream: filepad.c tests : spidey_bench.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.616&r2=1.617 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.327&r2=1.328 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/bytestream/filepad.c.diff?r1=1.2&r2=1.3 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/tests/spidey_bench.c.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.616 retrieving revision 1.617 diff -u -d -r1.616 -r1.617 --- ChangeLog 26 Jun 2004 13:11:31 -0000 1.616 +++ ChangeLog 29 Jun 2004 00:34:37 -0000 1.617 @@ -1,3 +1,13 @@ +2004-06-28 Benjamin Otte <in...@pu...> + + * gst/gstpad.c: (gst_pad_get_caps): + throw an error if the getcaps function does not return a subset of + the template caps. + * libs/gst/bytestream/filepad.c: (gst_file_pad_chain): + make disconts without position info an error in debugging + * tests/spidey_bench.c: (handoff), (main): + don't count first try when averaging 2004-06-26 Thomas Vander Stichele <thomas at apestaart dot org> * docs/gst/Makefile.am: Index: gstpad.c RCS file: /home/cvs/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.327 retrieving revision 1.328 diff -u -d -r1.327 -r1.328 --- gstpad.c 20 Jun 2004 19:42:58 -0000 1.327 +++ gstpad.c 29 Jun 2004 00:34:37 -0000 1.328 @@ -2625,13 +2625,33 @@ if (caps == NULL) { g_critical ("pad %s:%s returned NULL caps from getcaps function\n", - GST_ELEMENT_NAME (GST_PAD_PARENT (GST_PAD (realpad))), - GST_PAD_NAME (realpad)); - caps = gst_caps_new_any (); - } + GST_DEBUG_PAD_NAME (realpad)); + } else { +#ifndef G_DISABLE_ASSERT + /* check that the returned caps are a real subset of the template caps */ + if (GST_PAD_PAD_TEMPLATE (realpad)) { + const GstCaps *templ_caps = + GST_PAD_TEMPLATE_CAPS (GST_PAD_PAD_TEMPLATE (realpad)); + if (!gst_caps_is_subset (caps, templ_caps)) { + GstCaps *temp; - return caps; - } else if (GST_PAD_PAD_TEMPLATE (realpad)) { + GST_CAT_ERROR_OBJECT (GST_CAT_CAPS, pad, + "pad returned caps %" GST_PTR_FORMAT + " which are not a real subset of its template caps %" + GST_PTR_FORMAT, caps, templ_caps); + g_warning + ("pad %s:%s returned caps that are not a real subset of its template caps", + GST_DEBUG_PAD_NAME (realpad)); + temp = gst_caps_intersect (templ_caps, caps); + gst_caps_free (caps); + caps = temp; + } + } +#endif + return caps; + } + } + if (GST_PAD_PAD_TEMPLATE (realpad)) { GstPadTemplate *templ = GST_PAD_PAD_TEMPLATE (realpad); const GstCaps *caps; Index: filepad.c RCS file: /home/cvs/gstreamer/gstreamer/libs/gst/bytestream/filepad.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- filepad.c 24 Jun 2004 02:18:59 -0000 1.2 +++ filepad.c 29 Jun 2004 00:34:38 -0000 1.3 @@ -129,7 +129,7 @@ GST_INFO_OBJECT (pad, "got discont to %" G_GINT64_FORMAT, value); pad->position = value; } else { - GST_WARNING_OBJECT (pad, "got discont without position"); + GST_ERROR_OBJECT (pad, "got discont without position"); if (pad->position == -1) { GST_WARNING_OBJECT (pad, "need to reset position to 0 because we have no position info"); Index: spidey_bench.c RCS file: /home/cvs/gstreamer/gstreamer/tests/spidey_bench.c,v retrieving revision 1.1 diff -u -d -r1.1 -r1.2 --- spidey_bench.c 8 May 2004 17:38:24 -0000 1.1 +++ spidey_bench.c 29 Jun 2004 00:34:38 -0000 1.2 @@ -21,6 +21,7 @@ static GTimeVal start_time; gboolean done = FALSE; GstClockTime total = 0; +guint counted = 0; static void handoff (GstElement * fakesink, GstBuffer * data) @@ -37,7 +38,9 @@ g_print ("time to launch spider pipeline: %" GST_TIME_FORMAT "\n", GST_TIME_ARGS (diff)); done = TRUE; - total += diff; + /* don't count first try, it loads the plugins */ + if (counted++) + total += diff; } gint @@ -61,7 +64,7 @@ ("filesrc location=\"%s\" ! spider ! audio/x-raw-int ! fakesink name = sink", file); - for (i = 0; i < count; i++) { + for (i = 0; i <= count; i++) { GstElement *sink; g_get_current_time (&start_time); |