GNOME Bugzilla – Bug 740111
omxvideodec: renders video flipped upside down when using egl_render
Last modified: 2016-12-01 17:36:38 UTC
When using egl_render, video is rendered upside down. Apparently, there is a line of code in gstomxvideodec.c that reads:
I assume this was some kind of workaround for some firmware bug, but it no longer is necessary. This line should be removed.
This was needed for the Raspberry Pi because the decoder renderers (or rendered?) the video frames in GL orientation (0,0 is bottom left corner). Unfortunately the expected coordinate system for the EGLImages is not defined by the OMX spec or anything IIRC, so we will have to use different values here depending on what the hardware does.
That should make it to the config I think. Default code should assume things are rendered streight, and then config quirks should fix it.
Are you running this on Raspberry Pi ?
Yes, I am testing this on the RPi, and currently any video playing through egl_render -> eglglessink is rendered upside down. This is why I said, this was probably some firmware bug that has been fixed now.
Which gst-omx version are you using ? ( just to know, I can see the line you pointed is still there in upstream)
Have you tried with glimagesink ?
FYI Raspbian still ship 1.2.0.
I'm using the version from raspbian (gst-omx 1.0.0 + patches / gstreamer 1.2.x).
I tried to use glimagesink (by compiling gst 1.4 / gst-omx 1.2.0), but it crashed and I didn't have the time to investigate.
Could you try with glimagesink from gst-plugins-bad 1.4.0 and 1.4.1 ? (Last time I had a Pi it was just before 1.4.0 released)
I can't reproduce this issue with current git master and glimagesink on my RPi2.
Philippe could you try to remove the line:
in gstomxvideodec.c ?
I am pretty sure it is obsolete as George said.
Also in -bad/gst-libs/gst/gl/egl/gsteglimagememory.c I can see:
gst_egl_image_memory_get_orientation (GstMemory * mem)
g_return_val_if_fail (gst_is_egl_image_memory (mem),
Can be safely removed indeed :)
George feel free to make the patch and push it.
Author: Matthew Waters <firstname.lastname@example.org>
Date: Thu Nov 17 19:56:35 2016 +1100
videodecoder: remove use of EGLImage orientation
New code should use GstVideoTransformationMeta
(The defaults do the right thing here though).