Bug 7787 - media player (gtk-play) doesn't work with any QEMU target
Summary: media player (gtk-play) doesn't work with any QEMU target
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.0
Assignee: Alexander Kanavin
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-05-18 22:38 UTC by Gary Thomas
Modified: 2015-10-27 11:44 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Thomas 2015-05-18 22:38:35 UTC
Try to run gtk-play on any QEMU target - result is a blank window.  Obviously the player thinks something is happening as the "progress bar" moves, but there is no video.

To duplicate, build core-image-sato for any QEMU target with these [additional] settings:
CORE_IMAGE_EXTRA_INSTALL = "rsync gstreamer1.0-libav"
LICENSE_FLAGS_WHITELIST ?= "commercial_gstreamer1.0-libav \
                            commercial_libav \
"

Tested against Poky/Yocto master rev fab7da4f8030a4067db0522f77eaa6d3b501c68f
Comment 1 Gary Thomas 2015-05-18 22:41:58 UTC
Note: the extra settings allow easy import of video files, along with settings to be able to play .mp4 files such as:
  https://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4
Comment 2 Ross Burton 2015-07-23 10:56:12 UTC
GStreamer probably thinks "I'll use GL" and that just fails miserably as it's old-school software GL.  Can we make this M3?
Comment 3 Ross Burton 2015-07-27 12:39:25 UTC
Presumably this is just video and audio plays?
Comment 4 Gary Thomas 2015-07-27 12:46:32 UTC
(In reply to comment #3)
> Presumably this is just video and audio plays?

Correct, just trying to play any audio+video (mostly interested in video as audio may not be available in qemu).  Any video file would do, the setup above is just to allow use of .mp4 video files.
Comment 5 Alexander Kanavin 2015-09-23 14:38:06 UTC
Gstreamer defaults to GL sink - if you use a different sink, e.g. this:

gst-play-1.0 --videosink ximagesink sintel_trailer-1080p.mp4

then video displays fine.

Is GL sink supposed to work in QEMU, or should we find out how to make something else the default?
Comment 6 Ross Burton 2015-09-23 14:47:10 UTC
GL is *meant* to work in qemu using the software renderer, but we don't use the LLVM-based software renderer yet so we need a way of forcing it to use something else.
Comment 7 Gary Thomas 2015-09-23 14:50:58 UTC
(In reply to comment #6)
> GL is *meant* to work in qemu using the software renderer, but we don't use
> the LLVM-based software renderer yet so we need a way of forcing it to use
> something else.

The point of the bug is that a user who tries to use gtk-play via the GUI won't have this kind of control and he's left with no video whatsoever.

So I would say that yes you either need to change the default or I would think it better to have the current default be functional in QEMU
Comment 8 Alexander Kanavin 2015-09-23 15:02:21 UTC
At build time, gstreamer1.0-plugins-bad.inc enables or disables opengl depending on whether opengl is in DISTRO_FEATURES.

At run time, I don't think you can disable a gstreamer plugin that is already installed on the target (through a config file or environment variable), but not 100% certain here.

Ideas?
Comment 9 Alexander Kanavin 2015-09-23 15:28:53 UTC
A related issue is that typically gstreamer installations use xvimagesink for rendering video (because it has a higher rank than other video sinks), but in qemu sato image it doesn't work: "No Xv port available".

Still unsure how to proceed.
Comment 10 Ross Burton 2015-09-23 15:30:38 UTC
I wonder if there's any virtual graphics drivers that support xv...
Comment 11 Alexander Kanavin 2015-09-23 15:34:37 UTC
So is it possible to remove opengl from gstreamer's PACKAGECONFIG, but on qemu images only?
Comment 12 Ross Burton 2015-09-23 15:43:23 UTC
Not without making gstreamer machine-specific.

https://bugzilla.gnome.org/show_bug.cgi?id=751684 is relevant and has a draft (doesn't compile) patch that makes glsink refuse to work on software renderers.
Comment 13 Alexander Kanavin 2015-09-23 15:53:00 UTC
Until that patch shows up in upstream, we can unconditionally downrank glimagesink so that ximagesink always comes up first. If someone wants GL rendering, they would have to hardcode the sink name into where the pipeline is formed.
Comment 14 Alexander Kanavin 2015-09-23 16:45:55 UTC
I'm a bit reluctant to fix it that way, because there may be OE users out there who rely on GL being the default without being explicit about it (when Xv is not available), and things will suddenly break/change for them.
Comment 15 Gary Thomas 2015-09-23 16:51:28 UTC
(In reply to comment #14)
> I'm a bit reluctant to fix it that way, because there may be OE users out
> there who rely on GL being the default without being explicit about it (when
> Xv is not available), and things will suddenly break/change for them.

Why not make such a change QEMU [target] dependent, then it won't affect those users?
Comment 16 Ross Burton 2015-09-23 19:04:21 UTC
Nobody in their right mind is relying the software renderer in Mesa, as this bug demonstrates it's utterly broken.  Clutter can't start up against it either, pretty much the only app that works fine is glxgears.
Comment 17 Alexander Kanavin 2015-09-24 11:00:59 UTC
Yeah, but I had in mind those who use hardware GL. They will be affected too, no?
Comment 18 Ross Burton 2015-09-24 11:06:21 UTC
The gstreamer patch checked that the GL implementation didn't declare itself a software renderer, so if you have proper drivers the gl sink still works.
Comment 19 Alexander Kanavin 2015-09-24 14:12:30 UTC
Yeah, but that patch is incomplete and doesn't compile, and work on it seems to have stalled. Let's just downgrade the GL sink unconditionally, I'll be submitting that to ML shortly.
Comment 21 Ross Burton 2015-09-29 12:23:53 UTC
Merged in oe-core ab1bb8db62df4246c2ed3a3135d6d71003ee9386.
Comment 22 Bogdan Alexandru Voiculescu 2015-10-27 11:44:10 UTC
Verified on master 8a0d8eee432924433c3e70198aaeab3161476c5f.

Player barely works with the provided 1080p video - but it works. 

So there are performance issues with default settings.