Commit 57939fd9 authored by Jan Schmidt's avatar Jan Schmidt

splitmux test: Use passed first/last timestamps

Don't hard-code the expected timestamp range, use the
values the caller is passing in.
parent 91080c48
...@@ -189,8 +189,8 @@ receive_handoff (GstElement * object G_GNUC_UNUSED, GstBuffer * buf, ...@@ -189,8 +189,8 @@ receive_handoff (GstElement * object G_GNUC_UNUSED, GstBuffer * buf,
} }
static void static void
test_playback (const gchar * in_pattern, GstClockTime first_time, test_playback (const gchar * in_pattern, GstClockTime exp_first_time,
GstClockTime last_time) GstClockTime exp_last_time)
{ {
GstMessage *msg; GstMessage *msg;
GstElement *pipeline; GstElement *pipeline;
...@@ -233,11 +233,13 @@ test_playback (const gchar * in_pattern, GstClockTime first_time, ...@@ -233,11 +233,13 @@ test_playback (const gchar * in_pattern, GstClockTime first_time,
fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS); fail_unless (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_EOS);
gst_message_unref (msg); gst_message_unref (msg);
/* Check we saw the entire range of values */ /* Check we saw the entire range of values */
fail_unless (first_ts == 0, fail_unless (first_ts == exp_first_time,
"Expected start of playback range 0, got %" GST_TIME_FORMAT, "Expected start of playback range %" GST_TIME_FORMAT
", got %" GST_TIME_FORMAT, GST_TIME_ARGS (exp_first_time),
GST_TIME_ARGS (first_ts)); GST_TIME_ARGS (first_ts));
fail_unless (last_ts == (3 * GST_SECOND), fail_unless (last_ts == exp_last_time,
"Expected end of playback range 3s, got %" GST_TIME_FORMAT, "Expected end of playback range %" GST_TIME_FORMAT
", got %" GST_TIME_FORMAT, GST_TIME_ARGS (exp_last_time),
GST_TIME_ARGS (last_ts)); GST_TIME_ARGS (last_ts));
gst_object_unref (pipeline); gst_object_unref (pipeline);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment