mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
decklinkaudiosrc: Don't subtract the duration from the capture time
We already have the real capture time, not the time when we received the end of the packet.
This commit is contained in:
parent
44c913413c
commit
1f9d37c924
1 changed files with 3 additions and 6 deletions
|
@ -427,6 +427,8 @@ gst_decklink_audio_src_got_packet (GstElement * element,
|
||||||
gst_decklink_video_src_convert_to_external_clock (videosrc, &capture_time,
|
gst_decklink_video_src_convert_to_external_clock (videosrc, &capture_time,
|
||||||
NULL);
|
NULL);
|
||||||
gst_object_unref (videosrc);
|
gst_object_unref (videosrc);
|
||||||
|
GST_LOG_OBJECT (self, "Actual timestamp %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (capture_time));
|
||||||
}
|
}
|
||||||
|
|
||||||
g_mutex_lock (&self->lock);
|
g_mutex_lock (&self->lock);
|
||||||
|
@ -496,14 +498,9 @@ gst_decklink_audio_src_create (GstPushSrc * bsrc, GstBuffer ** buffer)
|
||||||
ap->input = self->input->input;
|
ap->input = self->input->input;
|
||||||
ap->input->AddRef ();
|
ap->input->AddRef ();
|
||||||
|
|
||||||
|
timestamp = p->capture_time;
|
||||||
duration =
|
duration =
|
||||||
gst_util_uint64_scale_int (sample_count, GST_SECOND, self->info.rate);
|
gst_util_uint64_scale_int (sample_count, GST_SECOND, self->info.rate);
|
||||||
// Our capture time is the end timestamp, subtract the
|
|
||||||
// duration to get the start timestamp
|
|
||||||
if (p->capture_time >= duration)
|
|
||||||
timestamp = p->capture_time - duration;
|
|
||||||
else
|
|
||||||
timestamp = 0;
|
|
||||||
|
|
||||||
// Jitter and discontinuity handling, based on audiobasesrc
|
// Jitter and discontinuity handling, based on audiobasesrc
|
||||||
start_time = timestamp;
|
start_time = timestamp;
|
||||||
|
|
Loading…
Reference in a new issue