tests: Remove usage of the system clock from the rtprtx test

This commit is contained in:
Olivier Crête 2013-12-12 23:05:43 -05:00 committed by George Kiagiadakis
parent f0a4f26fa7
commit 8a143dfcbc

View file

@ -21,7 +21,6 @@
#include <gst/check/gstcheck.h> #include <gst/check/gstcheck.h>
#include <gst/check/gstconsistencychecker.h> #include <gst/check/gstconsistencychecker.h>
#include <gst/check/gsttestclock.h>
#include <gst/rtp/gstrtpbuffer.h> #include <gst/rtp/gstrtpbuffer.h>
@ -58,7 +57,6 @@ static void
setup_rtprtx (GstElement * rtprtxsend, GstElement * rtprtxreceive, setup_rtprtx (GstElement * rtprtxsend, GstElement * rtprtxreceive,
gint num_buffers) gint num_buffers)
{ {
GstClock *clock;
GstBuffer *buffer; GstBuffer *buffer;
GstPad *sendsrcpad; GstPad *sendsrcpad;
GstPad *receivesinkpad; GstPad *receivesinkpad;
@ -78,11 +76,6 @@ setup_rtprtx (GstElement * rtprtxsend, GstElement * rtprtxreceive,
GstClockTime tso = gst_util_uint64_scale (RTP_FRAME_SIZE, GST_SECOND, 8000); GstClockTime tso = gst_util_uint64_scale (RTP_FRAME_SIZE, GST_SECOND, 8000);
gint i; gint i;
/* we need a clock here */
clock = gst_system_clock_obtain ();
gst_element_set_clock (rtprtxsend, clock);
gst_object_unref (clock);
srcpad = gst_check_setup_src_pad (rtprtxsend, &srctemplate); srcpad = gst_check_setup_src_pad (rtprtxsend, &srctemplate);
sendsrcpad = gst_element_get_static_pad (rtprtxsend, "src"); sendsrcpad = gst_element_get_static_pad (rtprtxsend, "src");
ret = gst_pad_set_active (srcpad, TRUE); ret = gst_pad_set_active (srcpad, TRUE);
@ -128,15 +121,6 @@ static GstStateChangeReturn
start_rtprtx (GstElement * element) start_rtprtx (GstElement * element)
{ {
GstStateChangeReturn ret; GstStateChangeReturn ret;
GstClockTime now;
GstClock *clock;
clock = gst_element_get_clock (element);
if (clock) {
now = gst_clock_get_time (clock);
gst_object_unref (clock);
gst_element_set_base_time (element, now);
}
ret = gst_element_set_state (element, GST_STATE_PLAYING); ret = gst_element_set_state (element, GST_STATE_PLAYING);
ck_assert_int_ne (ret, GST_STATE_CHANGE_FAILURE); ck_assert_int_ne (ret, GST_STATE_CHANGE_FAILURE);