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 729588 - glimagesink: cannot play 1080p on RPI
glimagesink: cannot play 1080p on RPI
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal blocker
: 1.3.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-05 17:56 UTC by Julien Isorce
Modified: 2014-05-09 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gl/upload: set initted to TRUE when _init_upload succeeded (663 bytes, patch)
2014-05-08 14:50 UTC, Julien Isorce
accepted-commit_now Details | Review
gl/upload: add gst_gl_upload_set_lazy and set it not lazy by default (2.17 KB, patch)
2014-05-08 14:50 UTC, Julien Isorce
rejected Details | Review
gl/bufferpool: ensure to not initialize a frame buffer object to upload an EGLImage (1.45 KB, patch)
2014-05-08 14:50 UTC, Julien Isorce
rejected Details | Review

Description Julien Isorce 2014-05-05 17:56:34 UTC
720p is ok, but it's not possible to play a 1080p stream whereas it was possible with eglglessink on RPI, with gpu_mem=128.

It fails when creating the 4th eglimage: eglCreateImageKHR:  failed to create image for buffer 0x5 target 12465 error 0x300c.

I thought recent improvement in gstglbufferpool/upload may have safe enough resources but still not enough.

I should mention that this when using also omxvideodec, and it complains about having not enough resources. If I use fakevideodec then it works.

So I guess the diff with eglglessink is maybe that we are leaking a texture or we generate an additional FBO. I'll investigate this one.
Comment 1 Julien Isorce 2014-05-06 14:43:58 UTC
commit 2115f11f0b29b0f48e377557fc4ca2ae3a0701e7
Author: Julien Isorce <julien.isorce@collabora.co.uk>
Date:   Tue May 6 11:27:47 2014 +0100

    gl: no need to initialize a frame buffer object to upload an eglimage
    
    Fix https://bugzilla.gnome.org/show_bug.cgi?id=729588
Comment 2 Julien Isorce 2014-05-07 07:56:34 UTC
It seems my fix http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=2115f11f0b29b0f48e377557fc4ca2ae3a0701e7 made too many assumptions.

Indeed http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=6f4fd7086745720c39cc1d6bfd7a1c4c845caf99 breaks it.

Well the proper fix would be to know in gst_gl_upload_init_format(GstGLUpload * upload, GstVideoInfo * in_info) that it will be an eglimage.

I'm thinking about changing API a bit to add a third parameter: gst_gl_upload_init_format (GstGLUpload * upload, GstVideoInfo * in_info, const gchar *mem_type)

any suggestion ?
Comment 3 Matthew Waters (ystreet00) 2014-05-07 09:23:36 UTC
Either that or make the whole upload process lazy and init the GL stuff on the first buffer passed through.  Should be fairly simple to do.
Comment 4 Julien Isorce 2014-05-08 14:49:30 UTC
I think once the caps are negotiated and fixed, in set_caps it's a good time to initialize stuffs like FBO. Doing it at rendering time could lead to some sync problems. There is generally a pre rolled buffer but I think we cannot rely on that.

So best thing is to keep FBO initialization when it's done currently. Just need a way to tell gstglupload to pre-init stuffs or not. And do pre-init by default.
Comment 5 Julien Isorce 2014-05-08 14:50:05 UTC
Created attachment 276166 [details] [review]
gl/upload: set initted to TRUE when _init_upload succeeded
Comment 6 Julien Isorce 2014-05-08 14:50:31 UTC
Created attachment 276167 [details] [review]
gl/upload: add gst_gl_upload_set_lazy and set it not lazy by default
Comment 7 Julien Isorce 2014-05-08 14:50:55 UTC
Created attachment 276168 [details] [review]
gl/bufferpool: ensure to not initialize a frame buffer object to upload an EGLImage
Comment 8 Julien Isorce 2014-05-08 14:51:57 UTC
I just have a doubt for 276166 as you made changes today :)
Comment 9 Matthew Waters (ystreet00) 2014-05-09 02:20:24 UTC
Review of attachment 276167 [details] [review]:

I'm not a fan of this.  The use case you are presenting is for not allocating a fbo when using EGLImages however the concept of uploading (using EGLImages) and converting (where the fbo is) are two seperate processes.  glupload is now only really concerned with getting the data onto the GPU, which does not use a fbo.  You will need to change the colorconvert code to support the fast path of not converting when the video info's are the same.
Comment 10 Matthew Waters (ystreet00) 2014-05-09 02:23:05 UTC
Review of attachment 276168 [details] [review]:

See previous review and bug #729278
Comment 11 Julien Isorce 2014-05-09 08:15:19 UTC
All right, I prefer to focus on bug #729278

And I confirm your commit a49a3717109db6a29f03a2ec2f561d1fbb56adaf fixed back the current bug.

commit a49a3717109db6a29f03a2ec2f561d1fbb56adaf
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Thu May 8 13:46:29 2014 +1000

    gl/upload: implement lazy init
    
    Rename init_format to set_format


Also I'll push attachment 276167 [details] [review] separately