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 796553 - playsink: broken audio visualization support
playsink: broken audio visualization support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.14.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-06-10 14:37 UTC by Philippe Normand
Modified: 2018-08-16 18:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (5.45 KB, patch)
2018-06-16 13:38 UTC, Philippe Normand
committed Details | Review

Description Philippe Normand 2018-06-10 14:37:28 UTC
The stream_finish_cond is not signaled and thus EOS isn't forwarded.

Thread 22 (Thread 0x7fa7ab954700 (LWP 32613))

  • #0 syscall
    at ../sysdeps/unix/sysv/linux/x86_64/syscall.S line 38
  • #1 g_cond_wait
  • #2 gst_stream_synchronizer_wait
    at ../subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c line 262
  • #3 gst_stream_synchronizer_sink_event
    at ../subprojects/gst-plugins-base/gst/playback/gststreamsynchronizer.c line 629
  • #4 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #5 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #6 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #7 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #8 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #9 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #10 event_forward_func
    at ../subprojects/gstreamer/gst/gstpad.c line 3055
  • #11 gst_pad_forward
    at ../subprojects/gstreamer/gst/gstpad.c line 3009
  • #12 gst_pad_event_default
    at ../subprojects/gstreamer/gst/gstpad.c line 3106
  • #13 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #14 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #15 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #16 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #17 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #18 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #19 event_forward_func
    at ../subprojects/gstreamer/gst/gstpad.c line 3055
  • #20 gst_pad_forward
    at ../subprojects/gstreamer/gst/gstpad.c line 3009
  • #21 gst_pad_event_default
    at ../subprojects/gstreamer/gst/gstpad.c line 3106
  • #22 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #23 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #24 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #25 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #26 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #27 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #28 gst_concat_sink_event
    at ../subprojects/gstreamer/plugins/elements/gstconcat.c line 608
  • #29 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #30 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #31 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #32 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #33 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #34 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #35 event_forward_func
    at ../subprojects/gstreamer/gst/gstpad.c line 3055
  • #36 gst_pad_forward
    at ../subprojects/gstreamer/gst/gstpad.c line 3009
  • #37 gst_pad_event_default
    at ../subprojects/gstreamer/gst/gstpad.c line 3106
  • #38 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #39 gst_pad_push_event_unchecked
  • #40 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #41 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #42 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #43 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #44 event_forward_func
    at ../subprojects/gstreamer/gst/gstpad.c line 3055
  • #45 gst_pad_forward
    at ../subprojects/gstreamer/gst/gstpad.c line 3009
  • #46 gst_pad_event_default
    at ../subprojects/gstreamer/gst/gstpad.c line 3106
  • #47 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #48 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #49 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #50 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #51 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #52 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #53 gst_audio_decoder_push_event
    at ../subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c line 602
  • #54 gst_audio_decoder_sink_eventfunc
    at ../subprojects/gst-plugins-base/gst-libs/gst/audio/gstaudiodecoder.c line 2240
  • #55 gst_pad_send_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5756
  • #56 gst_pad_push_event_unchecked
    at ../subprojects/gstreamer/gst/gstpad.c line 5409
  • #57 push_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3932
  • #58 events_foreach
    at ../subprojects/gstreamer/gst/gstpad.c line 612
  • #59 check_sticky
    at ../subprojects/gstreamer/gst/gstpad.c line 3992
  • #60 gst_pad_push_event
    at ../subprojects/gstreamer/gst/gstpad.c line 5543
  • #61 gst_single_queue_push_one
    at ../subprojects/gstreamer/plugins/elements/gstmultiqueue.c line 1692
  • #62 gst_multi_queue_loop
    at ../subprojects/gstreamer/plugins/elements/gstmultiqueue.c line 1963
  • #63 gst_task_func
    at ../subprojects/gstreamer/gst/gsttask.c line 332
  • #64 0x00007fa7cf1ce7d0 in
  • #65 0x00007fa7cf1cde05 in
  • #66 start_thread
    at pthread_create.c line 463
  • #67 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 95

Comment 1 Sebastian Dröge (slomo) 2018-06-11 05:31:00 UTC
I assume the problem here is that the EOS goes via the audio path, thus gets send to two pads of the streamsynchronizer (audio and video), and then one of them waits for the other and blocks the other from ever receiving the EOS event.

Can you confirm? Another queue might be needed somewhere to prevent that.
Comment 2 Philippe Normand 2018-06-11 09:26:54 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> I assume the problem here is that the EOS goes via the audio path, thus gets
> send to two pads of the streamsynchronizer (audio and video), and then one
> of them waits for the other and blocks the other from ever receiving the EOS
> event.
> 
> Can you confirm?

Yes this is the issue.

> Another queue might be needed somewhere to prevent that.

playsink actually has code for this but it's not executed when if the visualization is configured after playback started. So this is a playsink bug :)
Comment 3 Philippe Normand 2018-06-13 17:55:11 UTC
I started working on a patch.
Comment 4 Philippe Normand 2018-06-16 13:38:17 UTC
Created attachment 372694 [details] [review]
patch
Comment 5 Philippe Normand 2018-08-16 09:52:19 UTC
It would be great if a reviewer finds time to look at this patch, thanks in advance :)
Comment 6 Philippe Normand 2018-08-16 18:01:31 UTC
Thanks! Pushed in master and 1.14:

commit a6536585fc431de14e550ba7961382669683a814 (HEAD -> 1.14, origin/1.14)
Author: Philippe Normand <philn@igalia.com>
Date:   Sat Jun 16 14:27:20 2018 +0100

    playsink: audio visualization support fixes
    
    The queue between the audiotee and the audio chain wasn't properly added to the
    bin, leading to streamsynchronizer locks on EOS. Reconfiguration of the
    visualization chain wasn't working as expected either. It is now possible to
    dynamically enable/disable the audio visualization support.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=796553