From: Wim Taymans Date: Fri, 2 Aug 2013 10:42:08 +0000 (+0200) Subject: jitterbuffer: move method up X-Git-Tag: 1.19.3~509^2~5492 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebd6b8f8ab177a3a93317d3964a5992b2fba94c4;p=platform%2Fupstream%2Fgstreamer.git jitterbuffer: move method up --- diff --git a/gst/rtpmanager/gstrtpjitterbuffer.c b/gst/rtpmanager/gstrtpjitterbuffer.c index 57a989e..899a0ec 100644 --- a/gst/rtpmanager/gstrtpjitterbuffer.c +++ b/gst/rtpmanager/gstrtpjitterbuffer.c @@ -1278,6 +1278,24 @@ post_buffering_percent (GstRtpJitterBuffer * jitterbuffer, gint percent) gst_element_post_message (GST_ELEMENT_CAST (jitterbuffer), message); } +static GstClockTime +apply_offset (GstRtpJitterBuffer * jitterbuffer, GstClockTime timestamp) +{ + GstRtpJitterBufferPrivate *priv; + + priv = jitterbuffer->priv; + + if (timestamp == -1) + return -1; + + /* apply the timestamp offset, this is used for inter stream sync */ + timestamp += priv->ts_offset; + /* add the offset, this is used when buffering */ + timestamp += priv->out_offset; + + return timestamp; +} + static TimerData * find_timer (GstRtpJitterBuffer * jitterbuffer, TimerType type, guint16 seqnum) { @@ -1738,24 +1756,6 @@ duplicate: } static GstClockTime -apply_offset (GstRtpJitterBuffer * jitterbuffer, GstClockTime timestamp) -{ - GstRtpJitterBufferPrivate *priv; - - priv = jitterbuffer->priv; - - if (timestamp == -1) - return -1; - - /* apply the timestamp offset, this is used for inter stream sync */ - timestamp += priv->ts_offset; - /* add the offset, this is used when buffering */ - timestamp += priv->out_offset; - - return timestamp; -} - -static GstClockTime compute_elapsed (GstRtpJitterBuffer * jitterbuffer, GstBuffer * outbuf) { guint64 ext_time, elapsed;