<div dir="ltr">Thanks Matt<div><br></div><div>Yes, I am sure I have Graphene compiled to the gst-plugin-base.</div><div><br></div><div>The question is how to create a GObject.Value with "Graphene.Vec2"? The sample code is shown in <b>Python</b>. 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? </div><div><br></div><div>Thanks.</div><div><br></div><div>BRs,</div><div><br></div><div>Yu</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 6 May 2021 at 16:18, Matthew Waters <<a href="mailto:ystreet00@gmail.com">ystreet00@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    Hi,<br>
    <br>
    <div>On 6/5/21 9:40 pm, Yu You via
      gstreamer-devel wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>There's a way to modify uniform variables for the glshader
          element.</div>
        <div>The following is an example of changing simple value types
          like float.</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div>    uniforms = Gst.Structure.new_empty("uniforms")<br>
              u1 = GObject.Value(GObject.TYPE_FLOAT)<br>
        </div>
            u1.set_float(hdegree)<br>
            uniforms.set_value("u1", u1)
        <div>    shader.set_property("uniforms", uniforms)<br>
              uniforms.free()<br>
        </div>
        <div><br>
        </div>
        <div>But it is common in GLSL shader we use data types like
          Vec2/Vec3.</div>
        <div>The following code did not work.</div>
        <div>    v1 = Graphene.Vec2()<br>
              v1.init(0.5,0.5)<br>
              uniforms.set_value("v1", v1)<br>
        </div>
        <div><br>
        </div>
        <div>Should I create GObject.Value() with GObject.TYPE_??
          for Graphene.Vec2?</div>
        <div>How to set the  Graphene.Vec2 object to the GObject.Value?</div>
      </div>
    </blockquote>
    <br>
    This may depend on if your GStreamer GL set up was built with
    graphene enabled at compile time<br>
    <br>
    The code is definitely there for this: <a href="https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/blob/master/ext/gl/gstglfiltershader.c#L365" target="_blank">https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/blob/master/ext/gl/gstglfiltershader.c#L365</a>.<br>
    <br>
    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.<br>
    <br>
    Cheers<br>
    -Matt<br>
    <br>
    <blockquote type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Thanks.</div>
        <div><br>
        </div>
        <div>Regards,</div>
        <div><br>
        </div>
        <div>Yu</div>
        <div><br>
        </div>
        <div>  </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gstreamer-devel mailing list
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </div>

</blockquote></div>