mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
Added some cleanup, so create_plan can be called multiple times.
Original commit message from CVS: Added some cleanup, so create_plan can be called multiple times.
This commit is contained in:
parent
40f192075c
commit
1c568619e9
3 changed files with 20 additions and 11 deletions
|
@ -551,12 +551,6 @@ gst_bin_create_plan_func (GstBin *bin)
|
|||
const gchar *elementname;
|
||||
GSList *pending = NULL;
|
||||
GstBin *pending_bin;
|
||||
// GList *pads;
|
||||
// GstPad *pad;
|
||||
// GstElement *peer_manager;
|
||||
// cothread_func wrapper_function;
|
||||
// _GstBinChain *chain;
|
||||
// GList *chains;
|
||||
|
||||
DEBUG_SET_STRING("(\"%s\")",gst_element_get_name (GST_ELEMENT (bin)));
|
||||
DEBUG_ENTER_STRING;
|
||||
|
@ -639,9 +633,6 @@ gst_bin_create_plan_func (GstBin *bin)
|
|||
g_list_free (bin->managed_elements);
|
||||
bin->managed_elements = NULL;
|
||||
bin->num_managed_elements = 0;
|
||||
g_list_free (bin->entries);
|
||||
bin->entries = NULL;
|
||||
bin->num_entries = 0;
|
||||
|
||||
// find all the managed children
|
||||
// here we pull off the trick of walking an entire arbitrary tree without recursion
|
||||
|
|
|
@ -102,8 +102,6 @@ struct __GstBinChain {
|
|||
GList *entries;
|
||||
|
||||
gboolean need_cothreads;
|
||||
|
||||
GstElement *entry;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -292,6 +292,24 @@ gst_schedule_chained_chain (GstBin *bin, _GstBinChain *chain) {
|
|||
}
|
||||
}
|
||||
|
||||
static void gst_bin_schedule_cleanup(GstBin *bin) {
|
||||
GList *chains;
|
||||
_GstBinChain *chain;
|
||||
|
||||
chains = bin->chains;
|
||||
while (chains) {
|
||||
chain = (_GstBinChain *)(chains->data);
|
||||
chains = g_list_next(chains);
|
||||
|
||||
g_list_free(chain->elements);
|
||||
g_list_free(chain->entries);
|
||||
|
||||
g_free(chain);
|
||||
}
|
||||
|
||||
g_list_free(bin->chains);
|
||||
}
|
||||
|
||||
void gst_bin_schedule_func(GstBin *bin) {
|
||||
// GstElement *manager;
|
||||
GList *elements;
|
||||
|
@ -308,6 +326,8 @@ void gst_bin_schedule_func(GstBin *bin) {
|
|||
DEBUG_SET_STRING("(\"%s\")",gst_element_get_name (GST_ELEMENT (bin)));
|
||||
DEBUG_ENTER_STRING;
|
||||
|
||||
gst_bin_schedule_cleanup(bin);
|
||||
|
||||
// next we have to find all the separate scheduling chains
|
||||
DEBUG("\nattempting to find scheduling chains...\n");
|
||||
// first make a copy of the managed_elements we can mess with
|
||||
|
|
Loading…
Reference in a new issue