static
void
cb_playbin_notify_source(GObject
*
obj, GParamSpec
*
param, gpointer u_data)
{
// check whether this is rtsp source
gchar * objname = GST_OBJECT_NAME(obj);
g_message( " objname is %s " , objname);
// check whether has a `protocols' property
if (g_object_class_find_property(G_OBJECT_GET_CLASS(obj), " source " )) {
GObject * source_element;
g_object_get(obj, " source " , & source_element, NULL);
if (g_object_class_find_property(G_OBJECT_GET_CLASS(source_element), " protocols " )) {
g_object_set(source_element, " protocols " , 1 , NULL);
}
g_object_unref(source_element);
}
}
// connect signal
g_signal_connect(G_OBJECT(playbin), " notify::source " , G_CALLBACK(cb_playbin_notify_source), NULL);
{
// check whether this is rtsp source
gchar * objname = GST_OBJECT_NAME(obj);
g_message( " objname is %s " , objname);
// check whether has a `protocols' property
if (g_object_class_find_property(G_OBJECT_GET_CLASS(obj), " source " )) {
GObject * source_element;
g_object_get(obj, " source " , & source_element, NULL);
if (g_object_class_find_property(G_OBJECT_GET_CLASS(source_element), " protocols " )) {
g_object_set(source_element, " protocols " , 1 , NULL);
}
g_object_unref(source_element);
}
}
// connect signal
g_signal_connect(G_OBJECT(playbin), " notify::source " , G_CALLBACK(cb_playbin_notify_source), NULL);