tests: update for gstcheck API change

This commit is contained in:
René Stadler 2011-11-24 21:42:39 +01:00
parent e6df0b672f
commit 30b40510ab
7 changed files with 21 additions and 18 deletions

View file

@ -128,7 +128,7 @@ setup_asfmux (GstStaticPadTemplate * srctemplate, const gchar * sinkname)
asfmux = gst_check_setup_element ("asfmux");
mysrcpad = setup_src_pad (asfmux, srctemplate, NULL, sinkname);
mysinkpad = gst_check_setup_sink_pad (asfmux, &sinktemplate, NULL);
mysinkpad = gst_check_setup_sink_pad (asfmux, &sinktemplate);
gst_pad_set_active (mysrcpad, TRUE);
gst_pad_set_active (mysinkpad, TRUE);
return asfmux;

View file

@ -115,9 +115,9 @@ GST_START_TEST (test_autoconvert_simple)
set_autoconvert_factories (autoconvert);
test_src_pad = gst_check_setup_src_pad (autoconvert, &src_factory, NULL);
test_src_pad = gst_check_setup_src_pad (autoconvert, &src_factory);
gst_pad_set_active (test_src_pad, TRUE);
test_sink_pad = gst_check_setup_sink_pad (autoconvert, &sink_factory, NULL);
test_sink_pad = gst_check_setup_sink_pad (autoconvert, &sink_factory);
gst_pad_set_active (test_sink_pad, TRUE);
gst_element_set_state (GST_ELEMENT_CAST (autoconvert), GST_STATE_PLAYING);

View file

@ -126,8 +126,8 @@ GST_START_TEST (count_in_out)
/* setup up */
elem = gst_check_setup_element ("testscope");
srcpad = gst_check_setup_src_pad (elem, &srctemplate, NULL);
sinkpad = gst_check_setup_sink_pad (elem, &sinktemplate, NULL);
srcpad = gst_check_setup_src_pad (elem, &srctemplate);
sinkpad = gst_check_setup_sink_pad (elem, &sinktemplate);
gst_pad_set_active (srcpad, TRUE);
gst_pad_set_active (sinkpad, TRUE);
fail_unless (gst_element_set_state (elem,

View file

@ -71,8 +71,9 @@ setup_legacyresample (int channels, int inrate, int outrate)
GST_STATE_PAUSED) == GST_STATE_CHANGE_SUCCESS,
"could not set to paused");
mysrcpad = gst_check_setup_src_pad (legacyresample, &srctemplate, caps);
gst_pad_set_caps (mysrcpad, caps);
mysrcpad = gst_check_setup_src_pad (legacyresample, &srctemplate);
gst_pad_set_active (mysrcpad, TRUE);
fail_unless (gst_pad_set_caps (mysrcpad, caps));
gst_caps_unref (caps);
caps = gst_caps_from_string (RESAMPLE_CAPS_TEMPLATE_STRING);
@ -81,16 +82,14 @@ setup_legacyresample (int channels, int inrate, int outrate)
"rate", G_TYPE_INT, outrate, NULL);
fail_unless (gst_caps_is_fixed (caps));
mysinkpad = gst_check_setup_sink_pad (legacyresample, &sinktemplate, caps);
mysinkpad = gst_check_setup_sink_pad (legacyresample, &sinktemplate);
gst_pad_set_active (mysinkpad, TRUE);
/* this installs a getcaps func that will always return the caps we set
* later */
gst_pad_set_caps (mysinkpad, caps);
fail_unless (gst_pad_set_caps (mysinkpad, caps));
gst_pad_use_fixed_caps (mysinkpad);
gst_caps_unref (caps);
gst_pad_set_active (mysinkpad, TRUE);
gst_pad_set_active (mysrcpad, TRUE);
return legacyresample;
}

View file

@ -147,10 +147,12 @@ setup_element (const gchar * factory, ElementSetup setup,
} else {
element = gst_check_setup_element (factory);
}
srcpad = gst_check_setup_src_pad (element, src_template, src_caps);
sinkpad = gst_check_setup_sink_pad (element, sink_template, sink_caps);
srcpad = gst_check_setup_src_pad (element, src_template);
sinkpad = gst_check_setup_sink_pad (element, sink_template);
gst_pad_set_active (srcpad, TRUE);
gst_pad_set_active (sinkpad, TRUE);
fail_unless (gst_pad_set_caps (srcpad, src_caps));
fail_unless (gst_pad_set_caps (sinkpad, sink_caps));
bus = gst_bus_new ();
gst_element_set_bus (element, bus);

View file

@ -76,10 +76,11 @@ setup_vp8dec (const gchar * src_caps_str)
gst_element_add_pad (bin, ghostpad);
gst_object_unref (targetpad);
srcpad = gst_check_setup_src_pad (bin, &srctemplate, srccaps);
sinkpad = gst_check_setup_sink_pad (bin, &sinktemplate, NULL);
srcpad = gst_check_setup_src_pad (bin, &srctemplate);
sinkpad = gst_check_setup_sink_pad (bin, &sinktemplate);
gst_pad_set_active (srcpad, TRUE);
gst_pad_set_active (sinkpad, TRUE);
fail_unless (gst_pad_set_caps (srcpad, srccaps));
bus = gst_bus_new ();
gst_element_set_bus (bin, bus);

View file

@ -51,10 +51,11 @@ setup_vp8enc (const gchar * src_caps_str)
vp8enc = gst_check_setup_element ("vp8enc");
fail_unless (vp8enc != NULL);
srcpad = gst_check_setup_src_pad (vp8enc, &srctemplate, srccaps);
sinkpad = gst_check_setup_sink_pad (vp8enc, &sinktemplate, NULL);
srcpad = gst_check_setup_src_pad (vp8enc, &srctemplate);
sinkpad = gst_check_setup_sink_pad (vp8enc, &sinktemplate);
gst_pad_set_active (srcpad, TRUE);
gst_pad_set_active (sinkpad, TRUE);
fail_unless (gst_pad_set_caps (srcpad, srccaps));
bus = gst_bus_new ();
gst_element_set_bus (vp8enc, bus);