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
@ -907,7 +907,7 @@ gst_audio_visualizer_chain (GstPad * pad, GstObject * parent,
|
|||||||
GstVideoFrame outframe;
|
GstVideoFrame outframe;
|
||||||
|
|
||||||
/* get timestamp of the current adapter content */
|
/* 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)) {
|
if (GST_CLOCK_TIME_IS_VALID (ts)) {
|
||||||
/* convert bytes to time */
|
/* convert bytes to time */
|
||||||
dist /= bps;
|
dist /= bps;
|
||||||
|
@ -1229,7 +1229,7 @@ gst_audio_decoder_push_buffers (GstAudioDecoder * dec, gboolean force)
|
|||||||
len = av;
|
len = av;
|
||||||
}
|
}
|
||||||
/* track upstream ts, but do not get stuck if nothing new upstream */
|
/* 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) {
|
if (ts != priv->prev_ts || distance <= priv->prev_distance) {
|
||||||
priv->prev_ts = ts;
|
priv->prev_ts = ts;
|
||||||
priv->prev_distance = distance;
|
priv->prev_distance = distance;
|
||||||
|
@ -674,7 +674,7 @@ gst_audio_encoder_finish_frame (GstAudioEncoder * enc, GstBuffer * buf,
|
|||||||
if (!enc->priv->perfect_ts) {
|
if (!enc->priv->perfect_ts) {
|
||||||
guint64 ts, distance;
|
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);
|
g_assert (distance % ctx->info.bpf == 0);
|
||||||
distance /= ctx->info.bpf;
|
distance /= ctx->info.bpf;
|
||||||
GST_LOG_OBJECT (enc, "%" G_GUINT64_FORMAT " samples past prev_ts %"
|
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) {
|
if (timestamp == -1) {
|
||||||
/* calculate the timestamp */
|
/* calculate the timestamp */
|
||||||
timestamp = gst_adapter_prev_timestamp (adapter, &distance);
|
timestamp = gst_adapter_prev_pts (adapter, &distance);
|
||||||
|
|
||||||
GST_LOG_OBJECT (baseaudiopayload,
|
GST_LOG_OBJECT (baseaudiopayload,
|
||||||
"last timestamp %" GST_TIME_FORMAT ", distance %" G_GUINT64_FORMAT,
|
"last timestamp %" GST_TIME_FORMAT ", distance %" G_GUINT64_FORMAT,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user