mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
final cruft fixage
Original commit message from CVS: final cruft fixage
This commit is contained in:
parent
89858fc1b7
commit
e33d96ba60
2 changed files with 20 additions and 20 deletions
|
@ -1988,11 +1988,11 @@ restart:
|
|||
if (GST_IS_REAL_PAD (pad)) {
|
||||
GstRealPad *peer;
|
||||
gboolean pad_loop, pad_get;
|
||||
gboolean done = FALSE, pad_random = FALSE;
|
||||
gboolean done = FALSE;
|
||||
|
||||
/* see if the pad has a loop function and grab
|
||||
* the peer */
|
||||
pad_get = gst_pad_check_pull_range (pad, &pad_random);
|
||||
pad_get = gst_pad_check_pull_range (pad);
|
||||
GST_LOCK (pad);
|
||||
pad_loop = GST_RPAD_LOOPFUNC (pad) != NULL;
|
||||
peer = GST_RPAD_PEER (pad);
|
||||
|
@ -2000,21 +2000,20 @@ restart:
|
|||
gst_object_ref (GST_OBJECT (peer));
|
||||
GST_UNLOCK (pad);
|
||||
|
||||
GST_DEBUG ("pad %s:%s: get: %d, random: %d, loop: %d",
|
||||
GST_DEBUG_PAD_NAME (pad), pad_get, pad_random, pad_loop);
|
||||
GST_DEBUG ("pad %s:%s: get: %d, loop: %d",
|
||||
GST_DEBUG_PAD_NAME (pad), pad_get, pad_loop);
|
||||
|
||||
if (peer) {
|
||||
gboolean peer_loop, peer_get;
|
||||
gboolean peer_random = FALSE;
|
||||
GstActivateMode mode;
|
||||
|
||||
/* see if the peer has a getrange function */
|
||||
peer_get = gst_pad_check_pull_range (GST_PAD_CAST (peer), &peer_random);
|
||||
peer_get = gst_pad_check_pull_range (GST_PAD_CAST (peer));
|
||||
/* see if the peer has a loop function */
|
||||
peer_loop = GST_RPAD_LOOPFUNC (peer) != NULL;
|
||||
|
||||
GST_DEBUG ("peer %s:%s: get: %d, random: %d, loop: %d",
|
||||
GST_DEBUG_PAD_NAME (peer), peer_get, peer_random, peer_loop);
|
||||
GST_DEBUG ("peer %s:%s: get: %d, loop: %d",
|
||||
GST_DEBUG_PAD_NAME (peer), peer_get, peer_loop);
|
||||
|
||||
/* If the pad is a sink with loop and the peer has a get function,
|
||||
* we can activate the sinkpad, FIXME, logic is reversed as
|
||||
|
@ -2025,8 +2024,7 @@ restart:
|
|||
"%sactivating pad %s pull mode", (active ? "" : "(de)"),
|
||||
GST_OBJECT_NAME (pad));
|
||||
/* only one of pad_random and peer_random can be true */
|
||||
mode = (pad_random || peer_random)
|
||||
? GST_ACTIVATE_PULL_RANGE : GST_ACTIVATE_PULL;
|
||||
mode = GST_ACTIVATE_PULL;
|
||||
result &= gst_pad_set_active (pad, active ? mode : GST_ACTIVATE_NONE);
|
||||
done = TRUE;
|
||||
}
|
||||
|
|
22
gst/gstpad.c
22
gst/gstpad.c
|
@ -2493,12 +2493,12 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent)
|
|||
gchar *name = NULL;
|
||||
|
||||
while (field) {
|
||||
if (!strcmp (field->name, "name")) {
|
||||
name = xmlNodeGetContent (field);
|
||||
if (!strcmp ((char *) field->name, "name")) {
|
||||
name = (gchar *) xmlNodeGetContent (field);
|
||||
pad = gst_element_get_pad (GST_ELEMENT (parent), name);
|
||||
g_free (name);
|
||||
} else if (!strcmp (field->name, "peer")) {
|
||||
peer = xmlNodeGetContent (field);
|
||||
} else if (!strcmp ((char *) field->name, "peer")) {
|
||||
peer = (gchar *) xmlNodeGetContent (field);
|
||||
}
|
||||
field = field->next;
|
||||
}
|
||||
|
@ -2562,7 +2562,8 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
|
||||
realpad = GST_REAL_PAD (object);
|
||||
|
||||
xmlNewChild (parent, NULL, "name", GST_PAD_NAME (realpad));
|
||||
xmlNewChild (parent, NULL, (xmlChar *) "name",
|
||||
(xmlChar *) GST_PAD_NAME (realpad));
|
||||
if (GST_RPAD_PEER (realpad) != NULL) {
|
||||
gchar *content;
|
||||
|
||||
|
@ -2571,10 +2572,10 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
|
|||
/* we just save it off */
|
||||
content = g_strdup_printf ("%s.%s",
|
||||
GST_OBJECT_NAME (GST_PAD_PARENT (peer)), GST_PAD_NAME (peer));
|
||||
xmlNewChild (parent, NULL, "peer", content);
|
||||
xmlNewChild (parent, NULL, (xmlChar *) "peer", (xmlChar *) content);
|
||||
g_free (content);
|
||||
} else
|
||||
xmlNewChild (parent, NULL, "peer", "");
|
||||
xmlNewChild (parent, NULL, (xmlChar *) "peer", NULL);
|
||||
|
||||
return parent;
|
||||
}
|
||||
|
@ -2595,9 +2596,10 @@ gst_ghost_pad_save_thyself (GstPad * pad, xmlNodePtr parent)
|
|||
|
||||
g_return_val_if_fail (GST_IS_GHOST_PAD (pad), NULL);
|
||||
|
||||
self = xmlNewChild (parent, NULL, "ghostpad", NULL);
|
||||
xmlNewChild (self, NULL, "name", GST_PAD_NAME (pad));
|
||||
xmlNewChild (self, NULL, "parent", GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
|
||||
self = xmlNewChild (parent, NULL, (xmlChar *) "ghostpad", NULL);
|
||||
xmlNewChild (self, NULL, (xmlChar *) "name", (xmlChar *) GST_PAD_NAME (pad));
|
||||
xmlNewChild (self, NULL, (xmlChar *) "parent",
|
||||
(xmlChar *) GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
|
||||
|
||||
/* FIXME FIXME FIXME! */
|
||||
|
||||
|
|
Loading…
Reference in a new issue