Bug 11410 - gtk-play visualizations seem broken again
Summary: gtk-play visualizations seem broken again
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M4
Assignee: Maxin B. John
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-25 08:03 UTC by Jussi Kukkonen
Modified: 2017-05-02 08:12 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
GST_DEBUG=3 gtk-play a2002011001-e02.wav (7.90 KB, text/plain)
2017-04-25 08:40 UTC, Jussi Kukkonen
no flags Details
GST_DEBUG_DUMP_DOT_DIR (final state) (43.12 KB, text/plain)
2017-04-25 08:44 UTC, Jussi Kukkonen
no flags Details
GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! goom ! videoconvert ! vaapisink (3.50 KB, text/plain)
2017-04-26 08:26 UTC, Maxin B. John
no flags Details
GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! synaescope ! videoconvert ! vaapisink (3.50 KB, text/plain)
2017-04-26 08:28 UTC, Maxin B. John
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jussi Kukkonen 2017-04-25 08:03:26 UTC
sound playback does not work with gtk-play apparently because the visualizations do not work. Generally speaking sound does work: e.g. gst-play is fine. Currently bug 11311 prevents accelerated video playback but even after fixing that (poky-contrib jku/gst-vaapi-fix branch) this keeps happening.

gtk-play works if visualizations are disabled in the code.

We really need better qa during multimedia stack upgrades :(

I'll try to get a useful log...
Comment 1 Jussi Kukkonen 2017-04-25 08:40:24 UTC
Created attachment 3751 [details]
GST_DEBUG=3 gtk-play a2002011001-e02.wav
Comment 2 Jussi Kukkonen 2017-04-25 08:44:45 UTC
Created attachment 3752 [details]
GST_DEBUG_DUMP_DOT_DIR (final state)
Comment 3 Jussi Kukkonen 2017-04-25 09:20:10 UTC
This works:

gst-launch-1.0 filesrc location=file.wav ! decodebin ! goom ! videoconvert ! xvimagesink

Something goes wrong in playbin -- possibly where goom ends up adding "pixel-aspect-ratio 0/1" to props...
Comment 4 Jussi Kukkonen 2017-04-25 11:35:44 UTC
This works on debian (plays sound, shows visualization):
  gst-launch playbin uri=<audio-uri> vis-plugin=goom

It plays on yocto as well but the visualization never ends up in the pipeline (I can see how the Playbin has a "vis-plugin=(GstGoom)goom0" property but the pipeline doesn't have the display branch at all). On debian the same pipeline has branches into audio and video playback... Not sure if this really is the same issue.
Comment 5 Jussi Kukkonen 2017-04-25 12:03:48 UTC
(In reply to comment #4)
> This works on debian (plays sound, shows visualization):
>   gst-launch playbin uri=<audio-uri> vis-plugin=goom

oops, forget that: debian defaults to gst-launch-0.10 !
The visualization is not included on debian either with 1.0
Comment 6 Jussi Kukkonen 2017-04-25 13:18:50 UTC
After looking at this for the day: My suggestion is we disable the visualizations. We can enable them later if they're seen as useful for something: so far (over a couple of years) they've just been easy to break and a hindrance to getting audio playback properly QAd.

The only real drawback here is that the trivial fix is _very_ ugly: doing gst_player_set_visualizations_enabled(player, FALSE) leaves us with a drawingarea that nothing draws on: with matchbox that means the window is there for clicking but it's never updated and you see the window content below -- or whatever was the last thing on screen before the player window opened.
Comment 7 Maxin B. John 2017-04-25 14:50:20 UTC
Also tested on the Intel NUC D54250WYK - sound doesn't work when we enable Visualizations in gtk-play.
Comment 8 Jussi Kukkonen 2017-04-26 07:53:21 UTC
Everything works on qemu btw (slowly but still).

The only differences in the pipeline between qemu and the nuc:
* pixel-aspect-ratio on qemu is "1/1" instead of "0/1"
* the final videosink is XImagesink instead of VaapiImageSink
Comment 9 Maxin B. John 2017-04-26 08:26:16 UTC
Created attachment 3754 [details]
GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! goom ! videoconvert ! vaapisink

vaapisink doesn't behave as expected with audio visualisation elements (goom and synaescope)
Comment 10 Maxin B. John 2017-04-26 08:28:49 UTC
Created attachment 3755 [details]
GST_DEBUG=3 gst-launch-1.0 audiotestsrc ! synaescope  ! videoconvert ! vaapisink
Comment 11 Maxin B. John 2017-04-26 08:33:58 UTC
vaapisink works fine with videotestsrc.

# gst-launch-1.0 videotestsrc ! vaapisink

Also xvimagesink, ximagesink and glimagesink works well with audio visualization elements ( xvimagesink doesn't use the fullscreen though )

eg: 
# gst-launch-1.0 audiotestsrc ! goom  ! videoconvert ! ximagesink
works as expected.
Comment 12 Jussi Kukkonen 2017-04-26 11:59:00 UTC
Upstream bug: 
  https://bugzilla.gnome.org/show_bug.cgi?id=781759
Comment 13 Jussi Kukkonen 2017-05-02 08:12:49 UTC
I'm marking this fixed with

commit 1565a2491847370939b87f6fd0c281b7f317ab1c
Author: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date:   Fri Apr 28 14:54:34 2017 +0300

    gst-player: Disable visualizations as workaround
    
    Audio playback in gtk-play is broken with vaapi because the
    visualizations do not work: disable visualizations as workaround.
    This should be reverted as soon as [YOCTO #11410] is fixed.
    
    (From OE-Core rev: 1092a8d4bc78a53f60ad0137aeb08b31853db9eb)


I've filed bug 11437 as the "root cause issue"