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 766538 - glimagesink: New signal for after redraw has happened
glimagesink: New signal for after redraw has happened
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-16 23:59 UTC by Gregoire
Modified: 2016-09-22 07:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Draw-final callback in glimagesink (3.46 KB, patch)
2016-05-16 23:59 UTC, Gregoire
rejected Details | Review

Description Gregoire 2016-05-16 23:59:34 UTC
Created attachment 328030 [details] [review]
Draw-final callback in glimagesink

Here is a patch against head to add a callback to the glimagesink plugin after redraw has occurred.

It seems to be a no-risk patch and add a very handy feature if one wants to add a complex overlay in opengl after the redraw has occurred - for instance an overlay that can't be done with the gstreamer overlay feature which is great but very basic.
Comment 1 Sebastian Dröge (slomo) 2016-05-17 06:49:36 UTC
You probably also want to add this to glsinkbin and others. Why can't your use-case be done with client-draw?
Comment 2 Gregoire 2016-05-17 06:58:04 UTC
My case is really to add an overlay after the frame has been rendered. I don't touch the frame content and its rendering. So I prefer to let Gstreamer does the frame rendering (it's well optimized and if something changes in the future, it will be in the glimagesink code) and once it's done, I paint my opengles stuff.

In a sense, my use case is very similar to this gstreamer feature that can do overlay on top of glimagesink (I don't recall the name and I can't find it). I experimented but my overlay is pure opengles so it was too limiting.
Comment 3 Sebastian Dröge (slomo) 2016-05-17 07:07:20 UTC
That doesn't sound very different to how the client-draw signal is used elsewhere, e.g. in the examples to render the video on a cube.

Maybe a name like client-draw-finished would make it more explicit though when this is called.
Comment 4 Gregoire 2016-05-17 16:15:39 UTC
client-draw-finished naming would make more sense indeed.
Comment 5 Matthew Waters (ystreet00) 2016-05-17 18:11:11 UTC
For overlay's I would strongly suggest you implement/use an overlay element in your pipeline with the meta:GstVideoOverlayCompositionMeta which glimagesink understands.

If overlaying is the only reason you want this signal, IMHO this is not really necessary and will be marked WONTFIX.
Comment 6 Gregoire 2016-05-17 18:23:31 UTC
That's exactly my point! In comment #2, I was searching for this name: GstVideoOverlayCompositionMeta.

I tried to use GstVideoOverlayCompositionMeta but you can't do a complex overlay involving opengles. You can insert a png file and stuff like that which is great, but you can't overlay code that involves opengles.

This signal is to extend GstVideoOverlayCompositionMeta when this feature is too limited.
Comment 7 Matthew Waters (ystreet00) 2016-05-17 19:09:14 UTC
You can create your own element that will create the overlay for the stream.  Another more extensible option is to use glvideomixer and compose your stream that way.  Adding another signal is not the right way to approach this when there are multiple other mechanisms for this exact problem.
Comment 8 Matthew Waters (ystreet00) 2016-09-22 07:48:04 UTC
Marking as WONTFIX.  If a use case can be created for this that isn't covered by the above comment, then please reopen.