From: Wim Taymans Date: Mon, 20 Dec 2010 10:10:22 +0000 (+0100) Subject: jitterbuffer: provide a clock. X-Git-Tag: 1.19.3~509^2~7916^2~313 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6cb0efede4f3c208c09855172c362b40252a96f2;p=platform%2Fupstream%2Fgstreamer.git jitterbuffer: provide a clock. since we are using the clock for sync, we need to also provide a clock for good measure. The reason is that even if downstream elements provide a clock, we don't want to have that clock selected because it might not be running yet. --- diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 5b7e126..fcaef01 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -235,6 +235,7 @@ static GstPad *gst_rtp_jitter_buffer_request_new_pad (GstElement * element, GstPadTemplate * templ, const gchar * name); static void gst_rtp_jitter_buffer_release_pad (GstElement * element, GstPad * pad); +static GstClock *gst_rtp_jitter_buffer_provide_clock (GstElement * element); /* pad overrides */ static GstCaps *gst_rtp_jitter_buffer_getcaps (GstPad * pad); @@ -439,6 +440,8 @@ gst_rtp_jitter_buffer_class_init (GstRtpJitterBufferClass * klass) GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_request_new_pad); gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_release_pad); + gstelement_class->provide_clock = + GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_provide_clock); klass->clear_pt_map = GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_clear_pt_map); klass->set_active = GST_DEBUG_FUNCPTR (gst_rtp_jitter_buffer_set_active); @@ -651,6 +654,12 @@ wrong_pad: } } +static GstClock * +gst_rtp_jitter_buffer_provide_clock (GstElement * element) +{ + return gst_system_clock_obtain (); +} + static void gst_rtp_jitter_buffer_clear_pt_map (GstRtpJitterBuffer * jitterbuffer) {