tests: fix more tests

This commit is contained in:
Wim Taymans 2012-02-06 15:52:49 +01:00
parent 6674b029e4
commit 9a76a00a4d
3 changed files with 7 additions and 18 deletions

View file

@ -24,18 +24,6 @@
typedef void (CheckTagsFunc) (const GstTagList * tags, const gchar * file);
static void
pad_added_cb (GstElement * id3demux, GstPad * pad, GstBin * pipeline)
{
GstElement *sink;
sink = gst_bin_get_by_name (pipeline, "fakesink");
fail_unless (gst_element_link (id3demux, sink));
gst_object_unref (sink);
gst_element_set_state (sink, GST_STATE_PAUSED);
}
static GstBusSyncReply
error_cb (GstBus * bus, GstMessage * msg, gpointer user_data)
{
@ -91,9 +79,7 @@ read_tags_from_file (const gchar * file, gboolean push_mode)
fail_unless (gst_element_link (src, sep));
fail_unless (gst_element_link (sep, id3demux));
/* can't link id3demux and sink yet, do that later */
g_signal_connect (id3demux, "pad-added", G_CALLBACK (pad_added_cb), pipeline);
fail_unless (gst_element_link (id3demux, sink));
path = g_build_filename (GST_TEST_FILES_PATH, file, NULL);
GST_LOG ("reading file '%s'", path);

View file

@ -36,14 +36,17 @@ GstPad *mysrcpad, *mysinkpad;
#define LEVEL_CAPS_TEMPLATE_STRING \
"audio/x-raw, " \
"format = (string) { S8, "GST_AUDIO_NE(S16)" }, " \
"layout = (string) interleaved, " \
"rate = (int) [ 1, MAX ], " \
"channels = (int) [ 1, 8 ]"
#define LEVEL_CAPS_STRING \
"audio/x-raw, " \
"format = (string) "GST_AUDIO_NE(S16)", " \
"layout = (string) interleaved, " \
"rate = (int) 1000, " \
"channels = (int) 2"
"channels = (int) 2, " \
"channel-mask = (bitmask) 3" \
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,

View file

@ -161,10 +161,10 @@ GST_START_TEST (test_multifilesink_key_unit)
buf = gst_buffer_new_and_alloc (4);
gst_buffer_fill (buf, 0, "foo", 4);
fail_if (gst_pad_chain (sink, gst_buffer_ref (buf)) != GST_FLOW_OK);
fail_if (gst_pad_chain (sink, gst_buffer_copy (buf)) != GST_FLOW_OK);
gst_buffer_fill (buf, 0, "bar", 4);
fail_if (gst_pad_chain (sink, gst_buffer_ref (buf)) != GST_FLOW_OK);
fail_if (gst_pad_chain (sink, gst_buffer_copy (buf)) != GST_FLOW_OK);
fail_unless (gst_pad_send_event (sink,
gst_video_event_new_downstream_force_key_unit (GST_CLOCK_TIME_NONE,