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 796977 - avwait: Start video and audio together if audio starts late
avwait: Start video and audio together if audio starts late
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
unspecified
Other All
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-08-16 14:49 UTC by Vivia Nikolaidou
Modified: 2018-08-17 12:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
avwait: Start video and audio together if audio starts late (11.27 KB, patch)
2018-08-16 14:49 UTC, Vivia Nikolaidou
none Details | Review
avwait: Start video and audio together if audio starts late (12.26 KB, patch)
2018-08-17 09:54 UTC, Vivia Nikolaidou
none Details | Review
avwait: Start video and audio together if audio starts late (12.58 KB, patch)
2018-08-17 11:58 UTC, Vivia Nikolaidou
committed Details | Review

Description Vivia Nikolaidou 2018-08-16 14:49:02 UTC
See commit message
Comment 1 Vivia Nikolaidou 2018-08-16 14:49:08 UTC
Created attachment 373359 [details] [review]
avwait: Start video and audio together if audio starts late

Also add test to meson
Comment 2 Sebastian Dröge (slomo) 2018-08-16 15:12:24 UTC
Review of attachment 373359 [details] [review]:

::: gst/timecode/gstavwait.c
@@ +754,3 @@
   }
+  while (self->mode == MODE_VIDEO_FIRST
+      && self->first_audio_running_time == GST_CLOCK_TIME_NONE) {

Need to check for flushing flag here, and probably EOS too (and set such flags)

Flushing the audio pad should not unblock the video pad, flushing the video pad should not unblock the audio pad. They should only unblock the corresponding pad itself.

Shutting down the element should unblock both pads.

@@ +873,3 @@
           GST_TIME_ARGS (self->running_time_to_wait_for), inbuf);
+      if (self->mode != MODE_VIDEO_FIRST ||
+          self->first_audio_running_time <= running_time) {

Probably need to handle the case here where audio ended before the video running time?
Comment 3 Vivia Nikolaidou 2018-08-17 09:54:59 UTC
Created attachment 373370 [details] [review]
avwait: Start video and audio together if audio starts late

Also add test to meson
Comment 4 Vivia Nikolaidou 2018-08-17 09:55:19 UTC
Thanks, fixed. Please review again.
Comment 5 Sebastian Dröge (slomo) 2018-08-17 11:42:19 UTC
Review of attachment 373370 [details] [review]:

::: gst/timecode/gstavwait.c
@@ +906,3 @@
         }
+      } else {
+        /* First audio buffer arrived too late */

Please add a comment here about the actual condition when we get in here, all those boolean flags above are not too easy to decipher. And it's not that the first audio buffer is too late, just that it's after the video
Comment 6 Vivia Nikolaidou 2018-08-17 11:58:27 UTC
Created attachment 373376 [details] [review]
avwait: Start video and audio together if audio starts late

Also add test to meson
Comment 7 Vivia Nikolaidou 2018-08-17 12:02:30 UTC
Review of attachment 373376 [details] [review]:

commit ff952374b5b7961fd45bc3fb5218e212cae9f434 (HEAD -> upstream_master, upstream/master)
Author: Vivia Nikolaidou <vivia@ahiru.eu>
Date:   Thu Aug 16 17:47:55 2018 +0300

    avwait: Start video and audio together if audio starts late

    Also add test to meson

    https://bugzilla.gnome.org/show_bug.cgi?id=796977