White frames with v4l2 source & GstGLUploadElement

Gottfried Haider gottfried.haider at gmail.com
Sun May 1 21:19:08 UTC 2016


Hi Nicolas,

Thanks for looking into this! I was using GStreamer 1.8.1 on a Raspberry Pi
with the binary GLES2 driver.

As noted in a separate message to the list ("v4l2src & GstGLUpload"), I
could reproduce this problem with the default testegl example in gst-omx as
well. While playback of H.264 video files works just fine, there's only a
blank frame when I try the v4l2src uri as part of the playbin pipeline.

I think the point that the OMX case is easier than the V4L2 one is an
important one. I believe this difference is where things go amiss (perhaps
in combination with the difficulties of GL context sharing).

One thing that strikes me as odd in this regard is for the V4L2 case, I am
still see the message "Prepare texture for GLMemory", which comes from
testegl.c:729 [1]. The testegl example is written to handle three types of
buffers it gets handed to: memory:EGLImage, memory:GLMemory
and GstVideoGLTextureUploadMeta. The GLMemory case is the only one that
doesn't do the upload - it strikes me as odd that this would be the case
for the v4l2src. Could it be that some other element in the pipeline is
doing the GLUpload for us, but somehow being at odds with the
context-sharing, or the fact that it is not Desktop GL?

Best
Gottfried

[1]
https://cgit.freedesktop.org/gstreamer/gst-omx/tree/examples/egl/testegl.c#n729

On Sun, May 1, 2016 at 5:43 PM, Nicolas Dufresne <nicolas.dufresne at gmail.com
> wrote:

> Le mardi 26 avril 2016 à 21:58 +0200, Gottfried Haider a écrit :
> > I am trying to make an application [1] that uses GStreamer's GL API
> > in
> > a very similar way to the testegl.c [2] example work with v4l2
> > sources, but I am only getting white frames.
> >
> > The code previously had a playbin with uri=file:///..., which worked.
> > Now I am trying uri=v4l2:///dev/video0, which points to a webcam.
> >
> > Running "gst-launch-1.0 playbin uri=v4l2:///dev/video0" in the
> > terminal also works, and shows reasonable images from the camera.
> >
> > Is there anything obvious that I am missing here? (I see the format
> > is
> > YUY2 all the way to the end of the pipeline, is this perhaps what
> > needs changing?)
> >
> > I uploaded a DOT file [3], as well as the debug output [4] when using
> > the webcam. The same for playing back a regular H.264 encoded video
> > file as well [5].
> >
> > Thanks for any leads!
>
> Sorry that it took a while before someone answer this one. There is
> nothing obvious in your pipeline that could explain white frames.
> Sounds like GL incompatibility issue. Which GStreamer version are you
> using ? What is the paltform / GL stack involved here ?
>
> For the from-file case, you'll notice you are using omxdecoder with
> EGLImage support, that is much easyer to render on screen, as you only
> have to bind the EGLImage to a texture and display it. While in the
> v4l2 case, you have raw image that you need to upload and transform
> using shaders.
>
> cheers,
> Nicolas
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160501/f8a2736d/attachment.html>


More information about the gstreamer-devel mailing list