diff --git a/gst/gstpad.c b/gst/gstpad.c index 54968035a6..0cdad3018b 100644 --- a/gst/gstpad.c +++ b/gst/gstpad.c @@ -2493,12 +2493,12 @@ gst_pad_load_and_link (xmlNodePtr self, GstObject * parent) gchar *name = NULL; while (field) { - if (!strcmp ((char *) field->name, "name")) { - name = (gchar *) xmlNodeGetContent (field); + if (!strcmp (field->name, "name")) { + name = xmlNodeGetContent (field); pad = gst_element_get_pad (GST_ELEMENT (parent), name); g_free (name); - } else if (!strcmp ((char *) field->name, "peer")) { - peer = (gchar *) xmlNodeGetContent (field); + } else if (!strcmp (field->name, "peer")) { + peer = xmlNodeGetContent (field); } field = field->next; } @@ -2562,8 +2562,7 @@ gst_pad_save_thyself (GstObject * object, xmlNodePtr parent) realpad = GST_REAL_PAD (object); - xmlNewChild (parent, NULL, (xmlChar *) "name", - (xmlChar *) GST_PAD_NAME (realpad)); + xmlNewChild (parent, NULL, "name", GST_PAD_NAME (realpad)); if (GST_RPAD_PEER (realpad) != NULL) { gchar *content; @@ -2572,10 +2571,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, (xmlChar *) "peer", (xmlChar *) content); + xmlNewChild (parent, NULL, "peer", content); g_free (content); } else - xmlNewChild (parent, NULL, (xmlChar *) "peer", (xmlChar *) ""); + xmlNewChild (parent, NULL, "peer", ""); return parent; } @@ -2596,10 +2595,9 @@ gst_ghost_pad_save_thyself (GstPad * pad, xmlNodePtr parent) g_return_val_if_fail (GST_IS_GHOST_PAD (pad), NULL); - 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))); + 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))); /* FIXME FIXME FIXME! */ @@ -2779,7 +2777,7 @@ no_function: * MT safe. */ gboolean -gst_pad_check_pull_range (GstPad * pad, gboolean * random_access) +gst_pad_check_pull_range (GstPad * pad) { GstRealPad *peer; gboolean ret; @@ -2799,14 +2797,13 @@ gst_pad_check_pull_range (GstPad * pad, gboolean * random_access) /* see note in above function */ if (G_LIKELY ((checkgetrangefunc = peer->checkgetrangefunc) == NULL)) { - *random_access = FALSE; ret = GST_RPAD_GETRANGEFUNC (peer) != NULL; } else { GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "calling checkgetrangefunc %s of peer pad %s:%s", GST_DEBUG_FUNCPTR_NAME (checkgetrangefunc), GST_DEBUG_PAD_NAME (peer)); - ret = checkgetrangefunc (GST_PAD_CAST (peer), random_access); + ret = checkgetrangefunc (GST_PAD_CAST (peer)); } gst_object_unref (GST_OBJECT_CAST (peer)); @@ -2817,7 +2814,6 @@ gst_pad_check_pull_range (GstPad * pad, gboolean * random_access) wrong_direction: { GST_UNLOCK (pad); - *random_access = FALSE; return FALSE; } not_connected: @@ -2825,7 +2821,6 @@ not_connected: GST_CAT_LOG_OBJECT (GST_CAT_SCHEDULING, pad, "checking pull range, but it was not linked"); GST_UNLOCK (pad); - *random_access = FALSE; return FALSE; } } diff --git a/gst/gstpad.h b/gst/gstpad.h index 046423ec4c..3b5cf2e37e 100644 --- a/gst/gstpad.h +++ b/gst/gstpad.h @@ -114,7 +114,6 @@ typedef enum { GST_ACTIVATE_NONE, GST_ACTIVATE_PUSH, GST_ACTIVATE_PULL, - GST_ACTIVATE_PULL_RANGE, } GstActivateMode; #define GST_PAD_MODE_ACTIVATE(mode) ((mode) != GST_ACTIVATE_NONE) @@ -139,7 +138,7 @@ typedef void (*GstPadLoopFunction) (GstPad *pad); typedef GstFlowReturn (*GstPadChainFunction) (GstPad *pad, GstBuffer *buffer); typedef GstFlowReturn (*GstPadGetRangeFunction) (GstPad *pad, guint64 offset, guint length, GstBuffer **buffer); -typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad, gboolean *random_access); +typedef gboolean (*GstPadCheckGetRangeFunction) (GstPad *pad); typedef gboolean (*GstPadEventFunction) (GstPad *pad, GstEvent *event); /* convert/query/format functions */ @@ -524,7 +523,7 @@ GstCaps * gst_pad_get_negotiated_caps (GstPad * pad); /* data passing functions */ GstFlowReturn gst_pad_push (GstPad *pad, GstBuffer *buffer); -gboolean gst_pad_check_pull_range (GstPad *pad, gboolean *random_access); +gboolean gst_pad_check_pull_range (GstPad *pad); GstFlowReturn gst_pad_pull_range (GstPad *pad, guint64 offset, guint size, GstBuffer **buffer); gboolean gst_pad_push_event (GstPad *pad, GstEvent *event);