plugins/elements/gstmultiqueue.c: When dynamically creating single queues, activate sinkpad before adding it.

Original commit message from CVS:
* plugins/elements/gstmultiqueue.c: (gst_single_queue_new):
When dynamically creating single queues, activate sinkpad before adding
it.
We should be doing the same thing for the source pad, but we can't
since it would call a method which needs the parent to be set in order
to work propertly. Instead of activating the source pad, we just unset
the flushing flag, which is the minimal requirement for adding a pad
to an element in a state greater than READY.
This commit is contained in:
Edward Hervey 2007-01-17 14:33:39 +00:00
parent 816486ea9b
commit 4e07e925a5
2 changed files with 15 additions and 2 deletions

View file

@ -1,3 +1,14 @@
2007-01-17 Edward Hervey <edward@fluendo.com>
* plugins/elements/gstmultiqueue.c: (gst_single_queue_new):
When dynamically creating single queues, activate sinkpad before adding
it.
We should be doing the same thing for the source pad, but we can't
since it would call a method which needs the parent to be set in order
to work propertly. Instead of activating the source pad, we just unset
the flushing flag, which is the minimal requirement for adding a pad
to an element in a state greater than READY.
2007-01-17 Edward Hervey <edward@fluendo.com>
* docs/faq/gst-uninstalled:

View file

@ -983,8 +983,7 @@ gst_single_queue_new (GstMultiQueue * mqueue)
sq->mqueue = mqueue;
sq->srcresult = GST_FLOW_OK;
sq->queue =
gst_data_queue_new ((GstDataQueueCheckFullFunction)
sq->queue = gst_data_queue_new ((GstDataQueueCheckFullFunction)
single_queue_check_full, sq);
sq->nextid = -1;
@ -1033,7 +1032,10 @@ gst_single_queue_new (GstMultiQueue * mqueue)
gst_pad_set_element_private (sq->sinkpad, (gpointer) sq);
gst_pad_set_element_private (sq->srcpad, (gpointer) sq);
gst_pad_set_active (sq->sinkpad, TRUE);
gst_element_add_pad (GST_ELEMENT (mqueue), sq->sinkpad);
GST_OBJECT_FLAG_UNSET (sq->srcpad, GST_PAD_FLUSHING);
gst_element_add_pad (GST_ELEMENT (mqueue), sq->srcpad);
gst_pad_set_active (sq->srcpad, TRUE);