mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
jitterbuffer: signal timestamp discont
We can now use the RESYNC buffer flag to mark a timestamp discont when we update the ts-offset property.
This commit is contained in:
parent
4258ddcc36
commit
4bd2ffb26e
1 changed files with 6 additions and 3 deletions
|
@ -131,6 +131,7 @@ struct _GstRtpJitterBufferPrivate
|
|||
GCond jbuf_cond;
|
||||
gboolean waiting;
|
||||
gboolean discont;
|
||||
gboolean ts_discont;
|
||||
gboolean active;
|
||||
guint64 out_offset;
|
||||
|
||||
|
@ -1883,6 +1884,10 @@ push_buffer:
|
|||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_DISCONT);
|
||||
priv->discont = FALSE;
|
||||
}
|
||||
if (G_UNLIKELY (priv->ts_discont)) {
|
||||
GST_BUFFER_FLAG_SET (outbuf, GST_BUFFER_FLAG_RESYNC);
|
||||
priv->ts_discont = FALSE;
|
||||
}
|
||||
|
||||
/* apply timestamp with offset to buffer now */
|
||||
GST_BUFFER_PTS (outbuf) = out_time;
|
||||
|
@ -2320,9 +2325,7 @@ gst_rtp_jitter_buffer_set_property (GObject * object,
|
|||
case PROP_TS_OFFSET:
|
||||
JBUF_LOCK (priv);
|
||||
priv->ts_offset = g_value_get_int64 (value);
|
||||
/* FIXME, we don't really have a method for signaling a timestamp
|
||||
* DISCONT without also making this a data discont. */
|
||||
/* priv->discont = TRUE; */
|
||||
priv->ts_discont = TRUE;
|
||||
JBUF_UNLOCK (priv);
|
||||
break;
|
||||
case PROP_DO_LOST:
|
||||
|
|
Loading…
Reference in a new issue