After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 792042 - decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing
decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 781776
Blocks:
 
 
Reported: 2017-12-29 13:16 UTC by Vivia Nikolaidou
Modified: 2018-01-04 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing (3.30 KB, patch)
2017-12-29 13:16 UTC, Vivia Nikolaidou
none Details | Review
decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing (3.27 KB, patch)
2018-01-04 13:51 UTC, Vivia Nikolaidou
committed Details | Review

Description Vivia Nikolaidou 2017-12-29 13:16:37 UTC
See commit message
Comment 1 Vivia Nikolaidou 2017-12-29 13:16:42 UTC
Created attachment 366075 [details] [review]
decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing

Sometimes we might get an audio packet without a corresponding video
frame. In these cases, the stream and hardware reference timestamps
would be missing, because they're called on the video frame. Instead of
potentially breaking stuff downstream that might depend on these, we now
extrapolate them.
Comment 2 Sebastian Dröge (slomo) 2017-12-30 09:26:18 UTC
Review of attachment 366075 [details] [review]:

::: sys/decklink/gstdecklinkaudiosrc.cpp
@@ +709,3 @@
   self->processed += sample_count;
+  if (self->expected_stream_time != GST_CLOCK_TIME_NONE
+      && p.stream_timestamp == GST_CLOCK_TIME_NONE && !p.no_signal) {

The same should also happen if there is no signal. There's not really any difference here for timestamps

@@ +716,3 @@
+  }
+  if (self->last_hardware_time != GST_CLOCK_TIME_NONE
+      && p.hardware_timestamp == GST_CLOCK_TIME_NONE && !p.no_signal) {

Same
Comment 3 Vivia Nikolaidou 2018-01-04 13:51:37 UTC
Created attachment 366296 [details] [review]
decklinkaudiosrc: Extrapolate stream/hw reference timestamps when video frame is missing

Sometimes we might get an audio packet without a corresponding video
frame. In these cases, the stream and hardware reference timestamps
would be missing, because they're called on the video frame. Instead of
potentially breaking stuff downstream that might depend on these, we now
extrapolate them.
Comment 4 Vivia Nikolaidou 2018-01-04 13:52:14 UTC
Fixed, thanks.
Comment 5 Sebastian Dröge (slomo) 2018-01-04 20:13:04 UTC
Review of attachment 366296 [details] [review]:

Good to go
Comment 6 Vivia Nikolaidou 2018-01-04 20:15:01 UTC
Thanks, pushed.