mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
gst_adapter_prev_timestamp -> gst_adapter_prev_pts
https://bugzilla.gnome.org/show_bug.cgi?id=675598
This commit is contained in:
parent
7de757a0d4
commit
71e46b2478
4 changed files with 4 additions and 4 deletions
|
@ -907,7 +907,7 @@ gst_audio_visualizer_chain (GstPad * pad, GstObject * parent,
|
|||
GstVideoFrame outframe;
|
||||
|
||||
/* get timestamp of the current adapter content */
|
||||
ts = gst_adapter_prev_timestamp (scope->adapter, &dist);
|
||||
ts = gst_adapter_prev_pts (scope->adapter, &dist);
|
||||
if (GST_CLOCK_TIME_IS_VALID (ts)) {
|
||||
/* convert bytes to time */
|
||||
dist /= bps;
|
||||
|
|
|
@ -1229,7 +1229,7 @@ gst_audio_decoder_push_buffers (GstAudioDecoder * dec, gboolean force)
|
|||
len = av;
|
||||
}
|
||||
/* track upstream ts, but do not get stuck if nothing new upstream */
|
||||
ts = gst_adapter_prev_timestamp (priv->adapter, &distance);
|
||||
ts = gst_adapter_prev_pts (priv->adapter, &distance);
|
||||
if (ts != priv->prev_ts || distance <= priv->prev_distance) {
|
||||
priv->prev_ts = ts;
|
||||
priv->prev_distance = distance;
|
||||
|
|
|
@ -674,7 +674,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf,
|
|||
if (!enc->priv->perfect_ts) {
|
||||
guint64 ts, distance;
|
||||
|
||||
ts = gst_adapter_prev_timestamp (priv->adapter, &distance);
|
||||
ts = gst_adapter_prev_pts (priv->adapter, &distance);
|
||||
g_assert (distance % ctx->info.bpf == 0);
|
||||
distance /= ctx->info.bpf;
|
||||
GST_LOG_OBJECT (enc, "%" G_GUINT64_FORMAT " samples past prev_ts %"
|
||||
|
|
|
@ -583,7 +583,7 @@ gst_rtp_base_audio_payload_flush (GstRTPBaseAudioPayload * baseaudiopayload,
|
|||
|
||||
if (timestamp == -1) {
|
||||
/* calculate the timestamp */
|
||||
timestamp = gst_adapter_prev_timestamp (adapter, &distance);
|
||||
timestamp = gst_adapter_prev_pts (adapter, &distance);
|
||||
|
||||
GST_LOG_OBJECT (baseaudiopayload,
|
||||
"last timestamp %" GST_TIME_FORMAT ", distance %" G_GUINT64_FORMAT,
|
||||
|
|
Loading…
Reference in a new issue