mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
jitterbuffer: move method up
This commit is contained in:
parent
f6b6797874
commit
ebd6b8f8ab
1 changed files with 18 additions and 18 deletions
|
@ -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)
|
||||
{
|
||||
|
@ -1737,24 +1755,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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue