Hi I trying to control the position property of a smptealpha element. It controls the opacity of the alpha channel, it varies from 0.0 to 1.0.<br>The duration of this setting is 500ms.<br><br>I am working around this problem, it happens at runtime, I can't figure out what it's wrong.<br>
<br>Thanks and regards,<br><br>Rossana<br><br><br>Here's the code;<br>_____________<br><br><br>gst_interpolation_control_source_set: assertion `G_VALUE_TYPE (value) == self->priv->type' failed<br><br>// Agrego Controlador<br>
<br> gdouble duracion = 500;<br> GstController * ctrl = gst_object_control_properties(G_OBJECT(smpte), "position",NULL);<br><br> if (ctrl == NULL)<br> { <br> GST_WARNING ("No puede controlar el elemento fuente\n");<br>
return 0;<br> }<br> <br><br> // Todo valor GValue debe inicializarse en 0<br> GValue val_double = { 0, };<br> g_value_init (&val_double, G_TYPE_DOUBLE);<br><br> <br> // Seteo modo de interpolacion<br><br>
GstInterpolationControlSource * csource = gst_interpolation_control_source_new();<br><br> gst_interpolation_control_source_set_interpolation_mode(csource,GST_INTERPOLATE_LINEAR);<br><br> // Seteo primer valor<br> g_value_set_double(&val_double, 0.0);<br>
gst_interpolation_control_source_set(csource,(0 * GST_MSECOND),&val_double);<br><br> // Seteo segundo valor<br> g_value_set_double (&val_double, 1.0);<br> gst_interpolation_control_source_set(csource,(duracion*GST_MSECOND),&val_double);<br>
<br> gst_controller_set_control_source (ctrl, "position", GST_CONTROL_SOURCE (csource));<br><br> g_object_unref (csource);<br> g_value_unset (&val_double);<br>