[gst-cvs] gstreamer: benchmark: cleanup last change in capsnego benchmark

Stefan Kost ensonic at kemper.freedesktop.org
Thu Aug 5 00:37:13 PDT 2010


Module: gstreamer
Branch: master
Commit: ced3d517ebec9736832432b9de32bb76cc88e74a
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=ced3d517ebec9736832432b9de32bb76cc88e74a

Author: Stefan Kost <ensonic at users.sf.net>
Date:   Tue Jul  6 18:20:40 2010 +0300

benchmark: cleanup last change in capsnego benchmark

A pad name is not a factory name.

---

 tests/benchmarks/capsnego.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/tests/benchmarks/capsnego.c b/tests/benchmarks/capsnego.c
index 8f6df8e..d3df889 100644
--- a/tests/benchmarks/capsnego.c
+++ b/tests/benchmarks/capsnego.c
@@ -43,15 +43,19 @@ enum
 {
   ELEM_SRC = 0,
   ELEM_MIX,
-  SINKPAD_MIX,
   ELEM_PROC,
   ELEM_CONV,
   NUM_ELEM
 };
 
 static const gchar *factories[NUM_FLAVOURS][NUM_ELEM] = {
-  {"audiotestsrc", "adder", "sink%d", "volume", "audioconvert"},
-  {"videotestsrc", "videomixer", "sink_%d", "videoscale", "ffmpegcolorspace"}
+  {"audiotestsrc", "adder", "volume", "audioconvert"},
+  {"videotestsrc", "videomixer", "videoscale", "ffmpegcolorspace"}
+};
+
+static const gchar *sink_pads[NUM_FLAVOURS][NUM_ELEM] = {
+  {NULL, "sink%d", NULL, NULL},
+  {NULL, "sink_%d", NULL, NULL}
 };
 
 
@@ -103,7 +107,7 @@ create_nodes (GstBin * bin, GstElement * sink, gint depth, gint children,
 
   for (i = 0; i < children; i++) {
     if (depth > 0) {
-      if (!create_node (bin, sink, factories[flavour][SINKPAD_MIX], &new_sink,
+      if (!create_node (bin, sink, sink_pads[flavour][ELEM_MIX], &new_sink,
               children, flavour)) {
         return FALSE;
       }
@@ -118,7 +122,7 @@ create_nodes (GstBin * bin, GstElement * sink, gint depth, gint children,
       }
       gst_bin_add (bin, src);
       if (!gst_element_link_pads_full (src, "src", sink,
-              factories[flavour][SINKPAD_MIX], GST_PAD_LINK_CHECK_NOTHING)) {
+              sink_pads[flavour][ELEM_MIX], GST_PAD_LINK_CHECK_NOTHING)) {
         GST_WARNING ("can't link elements");
         return FALSE;
       }





More information about the Gstreamer-commits mailing list