gst: remove more unnecessary cast when using g_signal_*()

This commit is contained in:
Tim-Philipp Müller 2009-10-03 21:08:54 +01:00
parent 6ce1f0cbce
commit 3c6db4ed95
6 changed files with 12 additions and 14 deletions

View file

@ -1096,7 +1096,7 @@ no_state_recalc:
elem_name);
g_free (elem_name);
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_ADDED], 0, element);
g_signal_emit (bin, gst_bin_signals[ELEMENT_ADDED], 0, element);
return TRUE;
@ -1385,7 +1385,7 @@ no_state_recalc:
GST_OBJECT_FLAG_UNSET (element, GST_ELEMENT_UNPARENTING);
GST_OBJECT_UNLOCK (element);
g_signal_emit (G_OBJECT (bin), gst_bin_signals[ELEMENT_REMOVED], 0, element);
g_signal_emit (bin, gst_bin_signals[ELEMENT_REMOVED], 0, element);
/* element is really out of our control now */
gst_object_unref (element);
@ -2254,7 +2254,7 @@ gst_bin_recalculate_latency (GstBin * bin)
{
gboolean res;
g_signal_emit (G_OBJECT (bin), gst_bin_signals[DO_LATENCY], 0, &res);
g_signal_emit (bin, gst_bin_signals[DO_LATENCY], 0, &res);
GST_DEBUG_OBJECT (bin, "latency returned %d", res);
return res;

View file

@ -723,7 +723,7 @@ gst_index_add_entry (GstIndex * index, GstIndexEntry * entry)
iclass->add_entry (index, entry);
}
g_signal_emit (G_OBJECT (index), gst_index_signals[ENTRY_ADDED], 0, entry);
g_signal_emit (index, gst_index_signals[ENTRY_ADDED], 0, entry);
}
/**

View file

@ -1704,8 +1704,8 @@ gst_pad_unlink (GstPad * srcpad, GstPad * sinkpad)
/* fire off a signal to each of the pads telling them
* that they've been unlinked */
g_signal_emit (G_OBJECT (srcpad), gst_pad_signals[PAD_UNLINKED], 0, sinkpad);
g_signal_emit (G_OBJECT (sinkpad), gst_pad_signals[PAD_UNLINKED], 0, srcpad);
g_signal_emit (srcpad, gst_pad_signals[PAD_UNLINKED], 0, sinkpad);
g_signal_emit (sinkpad, gst_pad_signals[PAD_UNLINKED], 0, srcpad);
GST_CAT_INFO (GST_CAT_ELEMENT_PADS, "unlinked %s:%s and %s:%s",
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad));
@ -2040,8 +2040,8 @@ gst_pad_link (GstPad * srcpad, GstPad * sinkpad)
/* fire off a signal to each of the pads telling them
* that they've been linked */
g_signal_emit (G_OBJECT (srcpad), gst_pad_signals[PAD_LINKED], 0, sinkpad);
g_signal_emit (G_OBJECT (sinkpad), gst_pad_signals[PAD_LINKED], 0, srcpad);
g_signal_emit (srcpad, gst_pad_signals[PAD_LINKED], 0, sinkpad);
g_signal_emit (sinkpad, gst_pad_signals[PAD_LINKED], 0, srcpad);
GST_CAT_INFO (GST_CAT_PADS, "linked %s:%s and %s:%s, successful",
GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad));

View file

@ -417,8 +417,7 @@ gst_pad_template_get_caps (GstPadTemplate * templ)
void
gst_pad_template_pad_created (GstPadTemplate * templ, GstPad * pad)
{
g_signal_emit (G_OBJECT (templ),
gst_pad_template_signals[TEMPL_PAD_CREATED], 0, pad);
g_signal_emit (templ, gst_pad_template_signals[TEMPL_PAD_CREATED], 0, pad);
}
static void

View file

@ -345,8 +345,7 @@ gst_xml_object_loaded (GstObject * private, GstObject * object, xmlNodePtr self,
GstXML *xml = GST_XML (data);
/* FIXME check that this element was created from the same xmlDocPtr... */
g_signal_emit (G_OBJECT (xml), gst_xml_signals[OBJECT_LOADED], 0, object,
self);
g_signal_emit (xml, gst_xml_signals[OBJECT_LOADED], 0, object, self);
}
/**

View file

@ -392,7 +392,7 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
data->parent = element;
data->name = g_strdup(value);
data->value_str = g_strdup(pos);
data->signal_id = g_signal_connect(GST_OBJECT (element),"child-added", G_CALLBACK (gst_parse_new_child), data);
data->signal_id = g_signal_connect(element, "child-added", G_CALLBACK (gst_parse_new_child), data);
}
else {
SET_ERROR (graph->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, \
@ -481,7 +481,7 @@ gst_parse_perform_delayed_link (GstElement *src, const gchar *src_pad,
} else {
data->caps = NULL;
}
data->signal_id = g_signal_connect (G_OBJECT (src), "pad-added",
data->signal_id = g_signal_connect (src, "pad-added",
G_CALLBACK (gst_parse_found_pad), data);
return TRUE;
}