final cruft fixage

Original commit message from CVS:
final cruft fixage
This commit is contained in:
Andy Wingo 2005-05-05 21:59:53 +00:00
parent 89858fc1b7
commit e33d96ba60
2 changed files with 20 additions and 20 deletions

View file

@ -1988,11 +1988,11 @@ restart:
if (GST_IS_REAL_PAD (pad)) { if (GST_IS_REAL_PAD (pad)) {
GstRealPad *peer; GstRealPad *peer;
gboolean pad_loop, pad_get; gboolean pad_loop, pad_get;
gboolean done = FALSE, pad_random = FALSE; gboolean done = FALSE;
/* see if the pad has a loop function and grab /* see if the pad has a loop function and grab
* the peer */ * the peer */
pad_get = gst_pad_check_pull_range (pad, &pad_random); pad_get = gst_pad_check_pull_range (pad);
GST_LOCK (pad); GST_LOCK (pad);
pad_loop = GST_RPAD_LOOPFUNC (pad) != NULL; pad_loop = GST_RPAD_LOOPFUNC (pad) != NULL;
peer = GST_RPAD_PEER (pad); peer = GST_RPAD_PEER (pad);
@ -2000,21 +2000,20 @@ restart:
gst_object_ref (GST_OBJECT (peer)); gst_object_ref (GST_OBJECT (peer));
GST_UNLOCK (pad); GST_UNLOCK (pad);
GST_DEBUG ("pad %s:%s: get: %d, random: %d, loop: %d", GST_DEBUG ("pad %s:%s: get: %d, loop: %d",
GST_DEBUG_PAD_NAME (pad), pad_get, pad_random, pad_loop); GST_DEBUG_PAD_NAME (pad), pad_get, pad_loop);
if (peer) { if (peer) {
gboolean peer_loop, peer_get; gboolean peer_loop, peer_get;
gboolean peer_random = FALSE;
GstActivateMode mode; GstActivateMode mode;
/* see if the peer has a getrange function */ /* 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 */ /* see if the peer has a loop function */
peer_loop = GST_RPAD_LOOPFUNC (peer) != NULL; peer_loop = GST_RPAD_LOOPFUNC (peer) != NULL;
GST_DEBUG ("peer %s:%s: get: %d, random: %d, loop: %d", GST_DEBUG ("peer %s:%s: get: %d, loop: %d",
GST_DEBUG_PAD_NAME (peer), peer_get, peer_random, peer_loop); GST_DEBUG_PAD_NAME (peer), peer_get, peer_loop);
/* If the pad is a sink with loop and the peer has a get function, /* 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 * we can activate the sinkpad, FIXME, logic is reversed as
@ -2025,8 +2024,7 @@ restart:
"%sactivating pad %s pull mode", (active ? "" : "(de)"), "%sactivating pad %s pull mode", (active ? "" : "(de)"),
GST_OBJECT_NAME (pad)); GST_OBJECT_NAME (pad));
/* only one of pad_random and peer_random can be true */ /* only one of pad_random and peer_random can be true */
mode = (pad_random || peer_random) mode = GST_ACTIVATE_PULL;
? GST_ACTIVATE_PULL_RANGE : GST_ACTIVATE_PULL;
result &= gst_pad_set_active (pad, active ? mode : GST_ACTIVATE_NONE); result &= gst_pad_set_active (pad, active ? mode : GST_ACTIVATE_NONE);
done = TRUE; done = TRUE;
} }

View file

@ -2493,12 +2493,12 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent)
gchar *name = NULL; gchar *name = NULL;
while (field) { while (field) {
if (!strcmp (field->name, "name")) { if (!strcmp ((char *) field->name, "name")) {
name = xmlNodeGetContent (field); name = (gchar *) xmlNodeGetContent (field);
pad = gst_element_get_pad (GST_ELEMENT (parent), name); pad = gst_element_get_pad (GST_ELEMENT (parent), name);
g_free (name); g_free (name);
} else if (!strcmp (field->name, "peer")) { } else if (!strcmp ((char *) field->name, "peer")) {
peer = xmlNodeGetContent (field); peer = (gchar *) xmlNodeGetContent (field);
} }
field = field->next; field = field->next;
} }
@ -2562,7 +2562,8 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
realpad = GST_REAL_PAD (object); 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) { if (GST_RPAD_PEER (realpad) != NULL) {
gchar *content; gchar *content;
@ -2571,10 +2572,10 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent)
/* we just save it off */ /* we just save it off */
content = g_strdup_printf ("%s.%s", content = g_strdup_printf ("%s.%s",
GST_OBJECT_NAME (GST_PAD_PARENT (peer)), GST_PAD_NAME (peer)); 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); g_free (content);
} else } else
xmlNewChild (parent, NULL, "peer", ""); xmlNewChild (parent, NULL, (xmlChar *) "peer", NULL);
return parent; 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); g_return_val_if_fail (GST_IS_GHOST_PAD (pad), NULL);
self = xmlNewChild (parent, NULL, "ghostpad", NULL); self = xmlNewChild (parent, NULL, (xmlChar *) "ghostpad", NULL);
xmlNewChild (self, NULL, "name", GST_PAD_NAME (pad)); xmlNewChild (self, NULL, (xmlChar *) "name", (xmlChar *) GST_PAD_NAME (pad));
xmlNewChild (self, NULL, "parent", GST_OBJECT_NAME (GST_PAD_PARENT (pad))); xmlNewChild (self, NULL, (xmlChar *) "parent",
(xmlChar *) GST_OBJECT_NAME (GST_PAD_PARENT (pad)));
/* FIXME FIXME FIXME! */ /* FIXME FIXME FIXME! */