Revert queue event forwarding, added comments what it is supposed to do.

Original commit message from CVS:
Revert queue event forwarding, added comments what it is supposed to do.
This commit is contained in:
Wim Taymans 2002-06-08 16:30:43 +00:00
parent 89f8aec72e
commit ce100a8211
2 changed files with 26 additions and 6 deletions

View file

@ -557,13 +557,23 @@ static gboolean
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
{
GstQueue *queue;
gboolean res;
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
/* push the event to the queue for upstream consumption */
g_async_queue_push(queue->events, event);
g_mutex_lock (queue->qlock);
if (gst_element_get_state (GST_ELEMENT (queue)) == GST_STATE_PLAYING) {
/* push the event to the queue for upstream consumption */
g_async_queue_push(queue->events, event);
g_mutex_unlock (queue->qlock);
g_warning ("FIXME: sending event in a running queue");
/* FIXME wait for delivery of the event here, then return the result
* instead of FALSE */
return FALSE;
}
res = gst_pad_event_default (pad, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");

View file

@ -557,13 +557,23 @@ static gboolean
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
{
GstQueue *queue;
gboolean res;
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
/* push the event to the queue for upstream consumption */
g_async_queue_push(queue->events, event);
g_mutex_lock (queue->qlock);
if (gst_element_get_state (GST_ELEMENT (queue)) == GST_STATE_PLAYING) {
/* push the event to the queue for upstream consumption */
g_async_queue_push(queue->events, event);
g_mutex_unlock (queue->qlock);
g_warning ("FIXME: sending event in a running queue");
/* FIXME wait for delivery of the event here, then return the result
* instead of FALSE */
return FALSE;
}
res = gst_pad_event_default (pad, event);
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_FLUSH:
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");