Dynamic change of glshader element

Holger weber at telerob.de
Thu Sep 1 12:52:17 UTC 2016


I created the pipeline in C because I thought there might be a problem with
the python wrapper.
But the program crashes at the same function call.

// part of the pipeline
elGlshader = gst_element_factory_make("glshader", "shader");
g_object_set(G_OBJECT(elGlshader), "fragment", g_gcharShaderPrg, NULL);
g_timeout_add_seconds (1, timeout_cb, elGlshader);


// the pipeline is running as expected and crashes after the timer expires
static gboolean timeout_cb (gpointer user_data)
{
   g_print("Timer\n");
   GValue * value;
   GstGLShader *pShader;
   g_object_get_property(G_OBJECT(user_data),"shader", value);
   pShader = g_value_get_pointer(value);
   if (pShader != NULL)
   {
      gst_gl_shader_set_uniform_1f(pShader , "separation", -0.1); // Gives
an exception violation 
   }
   else
   {
      g_print("NO SHADER!!!\n");
   }
   return TRUE;
}

Calling gst_gl_shader.... causes a segmentation fault (as it does in
python). Is my code wrong, did I forget to lock something or is it the same
error described before???? I use the gst-1.8.3 on windows7.





--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-change-of-glshader-element-tp4669514p4679352.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list