mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-15 22:01:27 +00:00
fixed gst_scheduler_pad_disconnect (never ignore compiler warnings\!) and updated a few INFO lines
Original commit message from CVS: fixed gst_scheduler_pad_disconnect (never ignore compiler warnings\!) and updated a few INFO lines
This commit is contained in:
parent
fa726627a3
commit
e88151bc2e
6 changed files with 20 additions and 10 deletions
|
@ -221,6 +221,9 @@ gst_bin_unset_element_sched (GstElement *element)
|
||||||
g_return_if_fail (element != NULL);
|
g_return_if_fail (element != NULL);
|
||||||
g_return_if_fail (GST_IS_ELEMENT(element));
|
g_return_if_fail (GST_IS_ELEMENT(element));
|
||||||
|
|
||||||
|
GST_INFO (GST_CAT_SCHEDULING, "removing element \"%s\" from it sched %p",
|
||||||
|
GST_ELEMENT_NAME(element),GST_ELEMENT_SCHED(element));
|
||||||
|
|
||||||
// if it's actually a Bin
|
// if it's actually a Bin
|
||||||
if (GST_IS_BIN(element)) {
|
if (GST_IS_BIN(element)) {
|
||||||
|
|
||||||
|
|
|
@ -383,13 +383,13 @@ gst_element_get_pad (GstElement *element, const gchar *name)
|
||||||
while (walk) {
|
while (walk) {
|
||||||
GstPad *pad = GST_PAD(walk->data);
|
GstPad *pad = GST_PAD(walk->data);
|
||||||
if (!strcmp (GST_PAD_NAME(pad), name)) {
|
if (!strcmp (GST_PAD_NAME(pad), name)) {
|
||||||
GST_INFO(GST_CAT_ELEMENT_PADS,"found pad %s:%s\n",GST_DEBUG_PAD_NAME(pad));
|
GST_INFO(GST_CAT_ELEMENT_PADS,"found pad %s:%s",GST_DEBUG_PAD_NAME(pad));
|
||||||
return pad;
|
return pad;
|
||||||
}
|
}
|
||||||
walk = g_list_next (walk);
|
walk = g_list_next (walk);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_INFO(GST_CAT_ELEMENT_PADS,"no such pad '%s' in element \"%s\"\n",name,GST_ELEMENT_NAME(element));
|
GST_INFO(GST_CAT_ELEMENT_PADS,"no such pad '%s' in element \"%s\"",name,GST_ELEMENT_NAME(element));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1016,7 +1016,7 @@ gst_element_load_thyself (xmlNodePtr self, GstObject *parent)
|
||||||
g_return_val_if_fail (name != NULL, NULL);
|
g_return_val_if_fail (name != NULL, NULL);
|
||||||
g_return_val_if_fail (type != NULL, NULL);
|
g_return_val_if_fail (type != NULL, NULL);
|
||||||
|
|
||||||
GST_INFO (GST_CAT_XML,"loading \"%s\" of type \"%s\"\n", name, type);
|
GST_INFO (GST_CAT_XML,"loading \"%s\" of type \"%s\"", name, type);
|
||||||
|
|
||||||
element = gst_elementfactory_make (type, name);
|
element = gst_elementfactory_make (type, name);
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ gst_pipeline_init (GstPipeline *pipeline)
|
||||||
GST_FLAG_SET (pipeline, GST_BIN_FLAG_MANAGER);
|
GST_FLAG_SET (pipeline, GST_BIN_FLAG_MANAGER);
|
||||||
|
|
||||||
GST_ELEMENT_SCHED(pipeline) = gst_schedule_new(GST_ELEMENT(pipeline));
|
GST_ELEMENT_SCHED(pipeline) = gst_schedule_new(GST_ELEMENT(pipeline));
|
||||||
g_print("pipeline's scheduler is %p\n",GST_ELEMENT_SCHED(pipeline));
|
GST_DEBUG(GST_CAT_PIPELINE, "pipeline's scheduler is %p\n",GST_ELEMENT_SCHED(pipeline));
|
||||||
// gst_element_set_manager(GST_ELEMENT(pipeline),GST_ELEMENT(pipeline));
|
// gst_element_set_manager(GST_ELEMENT(pipeline),GST_ELEMENT(pipeline));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -745,7 +745,7 @@ gst_props_check_compatibility (GstProps *fromprops, GstProps *toprops)
|
||||||
|
|
||||||
if (!gst_props_entry_check_compatibility (entry1, entry2)) {
|
if (!gst_props_entry_check_compatibility (entry1, entry2)) {
|
||||||
compatible = FALSE;
|
compatible = FALSE;
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES, "%s are not compatible: ",
|
GST_DEBUG (GST_CAT_PROPERTIES, "%s are not compatible: \n",
|
||||||
g_quark_to_string (entry1->propid));
|
g_quark_to_string (entry1->propid));
|
||||||
gst_props_debug_entry (entry1);
|
gst_props_debug_entry (entry1);
|
||||||
gst_props_debug_entry (entry2);
|
gst_props_debug_entry (entry2);
|
||||||
|
|
|
@ -902,7 +902,7 @@ gst_schedule_chain_new (GstSchedule *sched)
|
||||||
void
|
void
|
||||||
gst_schedule_chain_destroy (GstScheduleChain *chain)
|
gst_schedule_chain_destroy (GstScheduleChain *chain)
|
||||||
{
|
{
|
||||||
GST_INFO (GST_CAT_SCHEDULING, "destroying chain %p",chain);
|
GstSchedule *sched = chain->sched;
|
||||||
|
|
||||||
// remove the chain from the schedules' list of chains
|
// remove the chain from the schedules' list of chains
|
||||||
chain->sched->chains = g_list_remove (chain->sched->chains, chain);
|
chain->sched->chains = g_list_remove (chain->sched->chains, chain);
|
||||||
|
@ -912,6 +912,8 @@ gst_schedule_chain_destroy (GstScheduleChain *chain)
|
||||||
g_list_free (chain->disabled); // should be empty...
|
g_list_free (chain->disabled); // should be empty...
|
||||||
g_list_free (chain->elements); // ditto
|
g_list_free (chain->elements); // ditto
|
||||||
g_free (chain);
|
g_free (chain);
|
||||||
|
|
||||||
|
GST_INFO (GST_CAT_SCHEDULING, "destroyed chain %p, now are %d chains in sched %p",chain,sched->num_chains,sched);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1022,7 +1024,7 @@ gst_schedule_chain_elements (GstSchedule *sched, GstElement *element1, GstElemen
|
||||||
|
|
||||||
// otherwise if both have chains already, join them
|
// otherwise if both have chains already, join them
|
||||||
} else if ((chain1 != NULL) && (chain2 != NULL)) {
|
} else if ((chain1 != NULL) && (chain2 != NULL)) {
|
||||||
GST_INFO (GST_CAT_SCHEDULING, "merging chain %p into chain %p\n",chain2,chain1);
|
GST_INFO (GST_CAT_SCHEDULING, "merging chain %p into chain %p",chain2,chain1);
|
||||||
// take the contents of chain2 and merge them into chain1
|
// take the contents of chain2 and merge them into chain1
|
||||||
chain1->disabled = g_list_concat (chain1->disabled, g_list_copy(chain2->disabled));
|
chain1->disabled = g_list_concat (chain1->disabled, g_list_copy(chain2->disabled));
|
||||||
chain1->elements = g_list_concat (chain1->elements, g_list_copy(chain2->elements));
|
chain1->elements = g_list_concat (chain1->elements, g_list_copy(chain2->elements));
|
||||||
|
@ -1098,15 +1100,20 @@ gst_schedule_chain_recursive_add (GstScheduleChain *chain, GstElement *element)
|
||||||
// add the element to the chain
|
// add the element to the chain
|
||||||
gst_schedule_chain_add_element (chain, element);
|
gst_schedule_chain_add_element (chain, element);
|
||||||
|
|
||||||
|
GST_DEBUG(GST_CAT_SCHEDULING, "recursing on element \"%s\"\n",GST_ELEMENT_NAME(element));
|
||||||
// now go through all the pads and see which peers can be added
|
// now go through all the pads and see which peers can be added
|
||||||
pads = element->pads;
|
pads = element->pads;
|
||||||
while (pads) {
|
while (pads) {
|
||||||
pad = GST_PAD(pads->data);
|
pad = GST_PAD(pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
|
|
||||||
|
GST_DEBUG(GST_CAT_SCHEDULING, "have pad %s:%s, checking for valid peer\n",GST_DEBUG_PAD_NAME(pad));
|
||||||
// if the peer exists and could be in the same chain
|
// if the peer exists and could be in the same chain
|
||||||
if (GST_PAD_PEER(pad)) {
|
if (GST_PAD_PEER(pad)) {
|
||||||
if (GST_ELEMENT_SCHED(GST_PAD_PARENT(pad)) == GST_ELEMENT_SCHED(GST_PAD_PARENT(GST_PAD_PEER(pad)))) {
|
GST_DEBUG(GST_CAT_SCHEDULING, "has peer %s:%s\n",GST_DEBUG_PAD_NAME(GST_PAD_PEER(pad)));
|
||||||
|
peerelement = GST_PAD_PARENT(GST_PAD_PEER(pad));
|
||||||
|
if (GST_ELEMENT_SCHED(GST_PAD_PARENT(pad)) == GST_ELEMENT_SCHED(peerelement)) {
|
||||||
|
GST_DEBUG(GST_CAT_SCHEDULING, "peer \"%s\" is valid for same chain\n",GST_ELEMENT_NAME(peerelement));
|
||||||
// if it's not already in a chain, add it to this one
|
// if it's not already in a chain, add it to this one
|
||||||
if (gst_schedule_find_chain (chain->sched, peerelement) == NULL) {
|
if (gst_schedule_find_chain (chain->sched, peerelement) == NULL) {
|
||||||
gst_schedule_chain_recursive_add (chain, peerelement);
|
gst_schedule_chain_recursive_add (chain, peerelement);
|
||||||
|
|
|
@ -130,7 +130,7 @@ static void
|
||||||
gst_thread_init (GstThread *thread)
|
gst_thread_init (GstThread *thread)
|
||||||
{
|
{
|
||||||
|
|
||||||
GST_DEBUG (GST_CAT_THREAD,"initializing thread '%s'\n",GST_ELEMENT_NAME (thread));
|
GST_DEBUG (GST_CAT_THREAD,"initializing thread\n");
|
||||||
|
|
||||||
// we're a manager by default
|
// we're a manager by default
|
||||||
GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER);
|
GST_FLAG_SET (thread, GST_BIN_FLAG_MANAGER);
|
||||||
|
@ -143,7 +143,7 @@ gst_thread_init (GstThread *thread)
|
||||||
thread->cond = g_cond_new();
|
thread->cond = g_cond_new();
|
||||||
|
|
||||||
GST_ELEMENT_SCHED(thread) = gst_schedule_new(GST_ELEMENT(thread));
|
GST_ELEMENT_SCHED(thread) = gst_schedule_new(GST_ELEMENT(thread));
|
||||||
g_print("thread's scheduler is %p\n",GST_ELEMENT_SCHED(thread));
|
GST_DEBUG(GST_CAT_THREAD, "thread's scheduler is %p\n",GST_ELEMENT_SCHED(thread));
|
||||||
|
|
||||||
// gst_element_set_manager(GST_ELEMENT(thread),GST_ELEMENT(thread));
|
// gst_element_set_manager(GST_ELEMENT(thread),GST_ELEMENT(thread));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue