mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 10:11:08 +00:00
- enable chain if an active group is added to it
Original commit message from CVS: - enable chain if an active group is added to it - enable group if a PLAYING element is added to it
This commit is contained in:
parent
fec6a61298
commit
63db8dfb67
1 changed files with 12 additions and 0 deletions
|
@ -172,7 +172,11 @@ static GstOptSchedulerGroup* ref_group_by_count (GstOptSchedulerGroup *group,
|
||||||
#endif
|
#endif
|
||||||
static GstOptSchedulerGroup* unref_group (GstOptSchedulerGroup *group);
|
static GstOptSchedulerGroup* unref_group (GstOptSchedulerGroup *group);
|
||||||
static void destroy_group (GstOptSchedulerGroup *group);
|
static void destroy_group (GstOptSchedulerGroup *group);
|
||||||
|
static void group_element_set_enabled (GstOptSchedulerGroup *group,
|
||||||
|
GstElement *element, gboolean enabled);
|
||||||
|
|
||||||
|
static void chain_group_set_enabled (GstOptSchedulerChain *chain,
|
||||||
|
GstOptSchedulerGroup *group, gboolean enabled);
|
||||||
/*
|
/*
|
||||||
* Scheduler private data for an element
|
* Scheduler private data for an element
|
||||||
*/
|
*/
|
||||||
|
@ -425,6 +429,10 @@ add_to_chain (GstOptSchedulerChain *chain, GstOptSchedulerGroup *group)
|
||||||
chain->groups = g_slist_prepend (chain->groups, group);
|
chain->groups = g_slist_prepend (chain->groups, group);
|
||||||
chain->num_groups++;
|
chain->num_groups++;
|
||||||
|
|
||||||
|
if (GST_OPT_SCHEDULER_GROUP_IS_ENABLED (group)) {
|
||||||
|
chain_group_set_enabled (chain, group, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
return chain;
|
return chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,6 +595,10 @@ add_to_group (GstOptSchedulerGroup *group, GstElement *element)
|
||||||
group->elements = g_slist_prepend (group->elements, element);
|
group->elements = g_slist_prepend (group->elements, element);
|
||||||
group->num_elements++;
|
group->num_elements++;
|
||||||
|
|
||||||
|
if (gst_element_get_state (element) == GST_STATE_PLAYING) {
|
||||||
|
group_element_set_enabled (group, element, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
return group;
|
return group;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue