[0.11] gst-plugins-good: tests: flvmux: Fix flvmux' s tests after fix for request pads handling

Wim Taymans wtay at kemper.freedesktop.org
Wed Sep 28 03:45:28 PDT 2011


Module: gst-plugins-good
Branch: 0.11
Commit: c78048bc25c6b0b7018a442bab24227452b6dd57
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=c78048bc25c6b0b7018a442bab24227452b6dd57

Author: Thiago Santos <thiago.sousa.santos at collabora.co.uk>
Date:   Mon Sep 12 09:21:47 2011 -0300

tests: flvmux: Fix flvmux's tests after fix for request pads handling

Now that flvmux doesn't release its request pads on PAUSED->READY the
test doesn't need to re-request them for every reuse test start.

---

 tests/check/elements/flvmux.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/tests/check/elements/flvmux.c b/tests/check/elements/flvmux.c
index 6930ac7..fe10282 100644
--- a/tests/check/elements/flvmux.c
+++ b/tests/check/elements/flvmux.c
@@ -50,6 +50,7 @@ static void
 mux_pcm_audio (guint num_buffers, guint repeat)
 {
   GstElement *src, *sink, *flvmux, *conv, *pipeline;
+  GstPad *sinkpad, *srcpad;
   gint counter;
 
   GST_LOG ("num_buffers = %u", num_buffers);
@@ -83,24 +84,23 @@ mux_pcm_audio (guint num_buffers, guint repeat)
   fail_unless (gst_element_link (src, conv));
   fail_unless (gst_element_link (flvmux, sink));
 
-  do {
-    GstStateChangeReturn state_ret;
-    GstMessage *msg;
-    GstPad *sinkpad, *srcpad;
+  /* now link the elements */
+  sinkpad = gst_element_get_request_pad (flvmux, "audio");
+  fail_unless (sinkpad != NULL, "Could not get audio request pad");
 
-    GST_LOG ("repeat=%d", repeat);
+  srcpad = gst_element_get_static_pad (conv, "src");
+  fail_unless (srcpad != NULL, "Could not get audioconvert's source pad");
 
-    /* now link the elements */
-    sinkpad = gst_element_get_request_pad (flvmux, "audio");
-    fail_unless (sinkpad != NULL, "Could not get audio request pad");
+  fail_unless_equals_int (gst_pad_link (srcpad, sinkpad), GST_PAD_LINK_OK);
 
-    srcpad = gst_element_get_static_pad (conv, "src");
-    fail_unless (srcpad != NULL, "Could not get audioconvert's source pad");
+  gst_object_unref (srcpad);
+  gst_object_unref (sinkpad);
 
-    fail_unless_equals_int (gst_pad_link (srcpad, sinkpad), GST_PAD_LINK_OK);
+  do {
+    GstStateChangeReturn state_ret;
+    GstMessage *msg;
 
-    gst_object_unref (srcpad);
-    gst_object_unref (sinkpad);
+    GST_LOG ("repeat=%d", repeat);
 
     counter = 0;
 



More information about the gstreamer-commits mailing list