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 732664 - add other-context support to GstGLMixer
add other-context support to GstGLMixer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.3.90
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-03 05:40 UTC by comicfans44
Modified: 2014-11-11 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add other context property to GstGLMixer (2.96 KB, patch)
2014-07-03 05:40 UTC, comicfans44
none Details | Review

Description comicfans44 2014-07-03 05:40:51 UTC
Created attachment 279817 [details] [review]
add other context property to GstGLMixer

add other-context property to GstGLMixer to support context share, this patch just copy some code from GstGLFilter to GstGLMixer
Comment 1 Nicolas Dufresne (ndufresne) 2014-07-03 15:55:32 UTC
Hmm, this should be negotiated, using property for that is most likely a relic from before GstContext.
Comment 2 Nicolas Dufresne (ndufresne) 2014-07-03 15:56:12 UTC
Isn't that bug a dup of #732662 ?
Comment 3 comicfans44 2014-07-04 00:29:32 UTC
(In reply to comment #1)
> Hmm, this should be negotiated, using property for that is most likely a relic
> from before GstContext.

I have a little question about GstGLContext, seems that upstream gl element getting GstGLContext from downstream gl element , but in context share scenario,
GstGLMixer may be the last element of GL pipeline (consider  videotestsrc ! glvideomixer ! fakesink  ,then getting texture from fakesink to custom share context OpenGL app , like qglwtextureshare demo) , and GstGLMixer can not use context share since there's no downstream gl element. 

if this is expected behaviour , I must use a GstGLFiter after GstGLMixer to giving GstGLMixer a proper shared context, this makes GstGLMixer/Filter different

please corrent me if there's some misunderstood
Comment 4 Nicolas Dufresne (ndufresne) 2014-07-04 12:12:15 UTC
(In reply to comment #3)
> (In reply to comment #1)
> > Hmm, this should be negotiated, using property for that is most likely a relic
> > from before GstContext.
> 
> I have a little question about GstGLContext, seems that upstream gl element
> getting GstGLContext from downstream gl element , but in context share
> scenario,

It tries both, downstream, then upstream, then ask the app, and if nothing found it create the context.

> GstGLMixer may be the last element of GL pipeline (consider  videotestsrc !
> glvideomixer ! fakesink  ,then getting texture from fakesink to custom share
> context OpenGL app , like qglwtextureshare demo) , and GstGLMixer can not use
> context share since there's no downstream gl element.

Right, in this case, glvideomixer would have it's own context, and it would not be shared.

> 
> if this is expected behaviour , I must use a GstGLFiter after GstGLMixer to
> giving GstGLMixer a proper shared context, this makes GstGLMixer/Filter
> different

No, each element are responsible for creating a context if none is found.
Comment 5 comicfans44 2014-07-04 13:25:49 UTC
greate thanks for the explanation
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #1)
> > > Hmm, this should be negotiated, using property for that is most likely a relic
> > > from before GstContext.
> > 
> > I have a little question about GstGLContext, seems that upstream gl element
> > getting GstGLContext from downstream gl element , but in context share
> > scenario,
> 
> It tries both, downstream, then upstream, then ask the app, and if nothing
> found it create the context.

how could my app respond for GstGLContext request? I only found GST_MESSAGE_NEED_CONTEXT with GstGLDisplay type in _gst_gl_display_context_query , but it didn't carry GstGLContext, did I missed something ?

> > if this is expected behaviour , I must use a GstGLFiter after GstGLMixer to 
> >giving GstGLMixer a proper shared context, this makes GstGLMixer/Filter 
> >different 
> No, each element are responsible for creating a context if none is found.
yes, each element can create context, but GstGLMixer can not create from shared context like GstGLFilter. in myself usage, gstreamer opengl pipeline is part of my app (through fakesink and context share) ,if GstGLMixer is the only element, I must add a nop gleffects together to do context share (if #732662 resolved) , which this is different to that only one glfilterxxx in pipeline.
Comment 6 Matthew Waters (ystreet00) 2014-07-05 07:55:41 UTC
The other-context property is to allow the app to provide an external context with which we share our internal GL context with.  This should probably be exposed through the GstContext mechanism.  Probably after 1.4 is out.

The internal GL context(s) are not shared using the GstContext mechanism but through the allocation query.
Comment 7 comicfans44 2014-07-06 23:56:05 UTC
(In reply to comment #6)
> The other-context property is to allow the app to provide an external context
> with which we share our internal GL context with.  This should probably be
> exposed through the GstContext mechanism.  Probably after 1.4 is out.
> 
> The internal GL context(s) are not shared using the GstContext mechanism but
> through the allocation query.

Thanks for explanation
Comment 8 Matthew Waters (ystreet00) 2014-11-11 05:42:10 UTC
commit e40d70c69a96daf9081275dbca5c79bdd37438cc
Author: Matthew Waters <ystreet00@gmail.com>
Date:   Thu Aug 14 23:29:00 2014 +1000

    gl: propogate other-context using GstContext