Hi,
There's a way to modify uniform variables for the glshader element. The following is an example of changing simple value types like float. uniforms = Gst.Structure.new_empty("uniforms") u1.set_float(hdegree)u1 = GObject.Value(GObject.TYPE_FLOAT) uniforms.set_value("u1", u1) shader.set_property("uniforms", uniforms) uniforms.free() But it is common in GLSL shader we use data types like Vec2/Vec3. The following code did not work. v1 = Graphene.Vec2() v1.init(0.5,0.5) uniforms.set_value("v1", v1) Should I create GObject.Value() with GObject.TYPE_?? for Graphene.Vec2? How to set the Graphene.Vec2 object to the GObject.Value? Thanks. Regards, Yu _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hi,
On 6/5/21 9:40 pm, Yu You via
gstreamer-devel wrote:
This may depend on if your GStreamer GL set up was built with graphene enabled at compile time The code is definitely there for this: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/blob/master/ext/gl/gstglfiltershader.c#L365. Setting GST_DEBUG=3 in the environment will get you the GST_FIXME below if the glshader element doesn't understand the GValue's type. Cheers -Matt
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel OpenPGP_signature (505 bytes) Download Attachment |
Thanks Matt Yes, I am sure I have Graphene compiled to the gst-plugin-base. The question is how to create a GObject.Value with "Graphene.Vec2"? The sample code is shown in Python. I simply could not find any document about how to assign a "Graphene.Vec2" object as the GObject.Value to the Gst.Structure. Should I define the value as a boxed one? Thanks. BRs, Yu On Thu, 6 May 2021 at 16:18, Matthew Waters <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |