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 788280 - glvideoflip/glimagesink: surface not reusable on android
glvideoflip/glimagesink: surface not reusable on android
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.x
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-09-28 10:06 UTC by Nicola
Modified: 2017-11-06 16:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
modified android tutorial 3 that shows the issue (13.98 KB, text/x-csrc)
2017-09-28 10:06 UTC, Nicola
Details

Description Nicola 2017-09-28 10:06:30 UTC
Created attachment 360588 [details]
modified android tutorial 3 that shows the issue

On android if you have a pipeline like this:

videotestsrc ! glupload! glcolorconvert ! glvideoflip name=vflip ! glimagesink

you can set the pipeline to PLAYING->NULL->PLAYING with no issue until you change video-direction on video-flip.

After changing video-direction if you set the pipeline to NULL and then to PLAYING you'll get an error like this:

E/libEGL: eglCreateWindowSurface: native_window_api_connect (win=0xb39e1808) failed (0xffffffea) (already connected to another API?)

this seems some sort of clenaup issue.

I attach a modified tutorial 3:

1) when you click on pause button the pipeline will be setted to NULL and recreated
2) when you click on play button while the pipeline is already playing the video will be flipped.

Please follow these steps to reproduce the issue with the modified tutorial 3:

1) start the app and click PLAY, this should work
2) stop the video and start it again using the play button. No video flip was done, this should work
3) stop the video
4) start the video
5) click the play button again, the video direction will change
6) stop the video
7) try to start the video again, you should see the error
Comment 1 Matthew Waters (ystreet00) 2017-11-06 13:10:52 UTC
This fixes a rather serious leak that could happen in your case (and any other case involving a GL filter).  Feel free to reopen if the leak still exists.

commit b495af21acda8f8b3669406c7b24fea99708ef66
Author: Matthew Waters <matthew@centricular.com>
Date:   Tue Nov 7 00:07:42 2017 +1100

    glbasefilter: actually indicate start internally
    
    Otherwise when we stop, the necessary stop functions will not be called
    and things may be leaked.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788280
Comment 2 Nicola 2017-11-06 16:51:52 UTC
I tested on iOS and it works now, thanks!

If this bug

https://bugzilla.gnome.org/show_bug.cgi?id=785766

could be fixed too opengl support on iOS would be really good