Small cleanups

Original commit message from CVS:
Small cleanups
This commit is contained in:
Wim Taymans 2002-02-02 13:27:33 +00:00
parent f0e4bd3b5c
commit 991b6231ea
3 changed files with 17 additions and 17 deletions

View file

@ -201,7 +201,7 @@ gst_autoplugger_init (GstAutoplugger *autoplugger)
} }
static void G_GNUC_UNUSED static void
gst_autoplugger_external_sink_connected(GstPad *pad, GstPad *peerpad, GstAutoplugger *autoplugger) gst_autoplugger_external_sink_connected(GstPad *pad, GstPad *peerpad, GstAutoplugger *autoplugger)
{ {
GstPadTemplate *peertemplate; GstPadTemplate *peertemplate;
@ -226,7 +226,7 @@ gst_autoplugger_external_sink_connected(GstPad *pad, GstPad *peerpad, GstAutoplu
} }
} }
static void G_GNUC_UNUSED static void
gst_autoplugger_external_src_connected(GstPad *pad, GstPad *peerpad, GstAutoplugger *autoplugger) gst_autoplugger_external_src_connected(GstPad *pad, GstPad *peerpad, GstAutoplugger *autoplugger)
{ {
GstPadTemplate *peertemplate; GstPadTemplate *peertemplate;
@ -349,9 +349,6 @@ gst_autoplugger_external_sink_caps_nego_failed(GstPad *pad, gboolean *result, Gs
if (gst_autoplugger_autoplug(autoplugger,autoplugger->cache_srcpad,sinkpad_peer_caps,srcpad_peer_caps)) if (gst_autoplugger_autoplug(autoplugger,autoplugger->cache_srcpad,sinkpad_peer_caps,srcpad_peer_caps))
*result = TRUE; *result = TRUE;
/* force renego */
gst_pad_renegotiate(GST_PAD(GST_PAD_PEER(autoplugger->cache_sinkpad)));
autoplugger->paused--; autoplugger->paused--;
if (autoplugger->paused == 0) if (autoplugger->paused == 0)
/* try to PLAY the whole thing */ /* try to PLAY the whole thing */

View file

@ -27,7 +27,7 @@
#define GST_AUTOPLUG_MAX_COST 999999 #define GST_AUTOPLUG_MAX_COST 999999
typedef guint (*GstAutoplugCostFunction) (gpointer src, gpointer dest, gpointer data); typedef guint (*GstAutoplugCostFunction) (gpointer src, gpointer dest, gpointer data);
typedef GList* (*GstAutoplugListFunction) (gpointer data); typedef const GList* (*GstAutoplugListFunction) (gpointer data);
static void gst_static_autoplug_class_init (GstStaticAutoplugClass *klass); static void gst_static_autoplug_class_init (GstStaticAutoplugClass *klass);
@ -156,7 +156,7 @@ gst_autoplug_pads_autoplug_func (GstElement *src, GstPad *pad, GstElement *sink)
/* if we have a match, connect the pads */ /* if we have a match, connect the pads */
if (gst_pad_get_direction(sinkpad) == GST_PAD_SINK && if (gst_pad_get_direction(sinkpad) == GST_PAD_SINK &&
!GST_PAD_CONNECTED(sinkpad)) !GST_PAD_IS_CONNECTED(sinkpad))
{ {
if (gst_caps_check_compatibility (gst_pad_get_caps(pad), gst_pad_get_caps(sinkpad))) { if (gst_caps_check_compatibility (gst_pad_get_caps(pad), gst_pad_get_caps(sinkpad))) {
gst_pad_connect(pad, sinkpad); gst_pad_connect(pad, sinkpad);
@ -233,7 +233,7 @@ gst_autoplug_pads_autoplug (GstElement *src, GstElement *sink)
} }
} }
static GList* static const GList*
gst_autoplug_elementfactory_get_list (gpointer data) gst_autoplug_elementfactory_get_list (gpointer data)
{ {
return gst_elementfactory_get_list (); return gst_elementfactory_get_list ();
@ -575,7 +575,7 @@ gst_autoplug_func (gpointer src, gpointer sink,
gpointer iNode, iPrev; gpointer iNode, iPrev;
gint iDist, i, iCost; gint iDist, i, iCost;
GList *elements = g_list_copy (list_function(data)); GList *elements = g_list_copy ((GList *)list_function(data));
GList *factories; GList *factories;
guint num_factories; guint num_factories;

View file

@ -169,6 +169,8 @@ gst_basic_scheduler_class_init (GstBasicSchedulerClass * klass)
gstscheduler_class->pad_disconnect = GST_DEBUG_FUNCPTR (gst_basic_scheduler_pad_disconnect); gstscheduler_class->pad_disconnect = GST_DEBUG_FUNCPTR (gst_basic_scheduler_pad_disconnect);
gstscheduler_class->pad_select = GST_DEBUG_FUNCPTR (gst_basic_scheduler_pad_select); gstscheduler_class->pad_select = GST_DEBUG_FUNCPTR (gst_basic_scheduler_pad_select);
gstscheduler_class->iterate = GST_DEBUG_FUNCPTR (gst_basic_scheduler_iterate); gstscheduler_class->iterate = GST_DEBUG_FUNCPTR (gst_basic_scheduler_iterate);
gstscheduler_class->show = GST_DEBUG_FUNCPTR (gst_basic_scheduler_show);
} }
static void static void
@ -335,7 +337,7 @@ gst_basic_scheduler_src_wrapper (int argc, char *argv[])
} }
} }
} while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element)); } while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element));
exit:
GST_FLAG_UNSET (element, GST_ELEMENT_COTHREAD_STOPPING); GST_FLAG_UNSET (element, GST_ELEMENT_COTHREAD_STOPPING);
GST_DEBUG_LEAVE (""); GST_DEBUG_LEAVE ("");
@ -485,7 +487,6 @@ gst_basic_scheduler_cothreaded_chain (GstBin * bin, GstSchedulerChain * chain)
elements = chain->elements; elements = chain->elements;
while (elements) { while (elements) {
gboolean decoupled; gboolean decoupled;
gint same_sched = 0;
element = GST_ELEMENT_CAST (elements->data); element = GST_ELEMENT_CAST (elements->data);
elements = g_list_next (elements); elements = g_list_next (elements);
@ -832,6 +833,7 @@ gst_basic_scheduler_chain_elements (GstBasicScheduler * sched, GstElement * elem
/* FIXME chain changed here */ /* FIXME chain changed here */
/* gst_basic_scheduler_cothreaded_chain(chain->sched->parent,chain); */ /* gst_basic_scheduler_cothreaded_chain(chain->sched->parent,chain); */
} }
} }
@ -913,7 +915,6 @@ static void
gst_basic_scheduler_reset (GstScheduler *sched) gst_basic_scheduler_reset (GstScheduler *sched)
{ {
cothread_context *ctx; cothread_context *ctx;
GstBin *bin = GST_BIN (GST_SCHEDULER_PARENT (sched));
GList *elements = GST_BASIC_SCHEDULER_CAST (sched)->elements; GList *elements = GST_BASIC_SCHEDULER_CAST (sched)->elements;
while (elements) { while (elements) {
@ -943,9 +944,11 @@ gst_basic_scheduler_add_element (GstScheduler * sched, GstElement * element)
GST_INFO (GST_CAT_SCHEDULING, "adding element \"%s\" to scheduler", GST_ELEMENT_NAME (element)); GST_INFO (GST_CAT_SCHEDULING, "adding element \"%s\" to scheduler", GST_ELEMENT_NAME (element));
/* if the element already has a different scheduler, remove the element from it */ /* if the element already has a scheduler something went wrong */
if (GST_ELEMENT_SCHED (element)) if (GST_ELEMENT_SCHED (element)) {
GST_ERROR(GST_CAT_SCHEDULING, "grave error"); GST_ERROR (element, "grave error");
return;
}
/* set the sched pointer in the element itself */ /* set the sched pointer in the element itself */
GST_ELEMENT_SCHED (element) = sched; GST_ELEMENT_SCHED (element) = sched;
@ -1010,6 +1013,7 @@ gst_basic_scheduler_remove_element (GstScheduler * sched, GstElement * element)
/* unset the scheduler pointer in the element */ /* unset the scheduler pointer in the element */
GST_ELEMENT_SCHED (element) = NULL; GST_ELEMENT_SCHED (element) = NULL;
} }
} }
@ -1134,7 +1138,6 @@ gst_basic_scheduler_pad_connect (GstScheduler * sched, GstPad *srcpad, GstPad *s
static void static void
gst_basic_scheduler_pad_disconnect (GstScheduler * sched, GstPad * srcpad, GstPad * sinkpad) gst_basic_scheduler_pad_disconnect (GstScheduler * sched, GstPad * srcpad, GstPad * sinkpad)
{ {
GstSchedulerChain *chain;
GstElement *element1, *element2; GstElement *element1, *element2;
GstSchedulerChain *chain1, *chain2; GstSchedulerChain *chain1, *chain2;
GstBasicScheduler *bsched = GST_BASIC_SCHEDULER (sched); GstBasicScheduler *bsched = GST_BASIC_SCHEDULER (sched);