mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
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:
parent
89f8aec72e
commit
ce100a8211
2 changed files with 26 additions and 6 deletions
|
@ -557,13 +557,23 @@ static gboolean
|
||||||
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
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);
|
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)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH:
|
case GST_EVENT_FLUSH:
|
||||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||||
|
|
|
@ -557,13 +557,23 @@ static gboolean
|
||||||
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
gst_queue_handle_src_event (GstPad *pad, GstEvent *event)
|
||||||
{
|
{
|
||||||
GstQueue *queue;
|
GstQueue *queue;
|
||||||
|
gboolean res;
|
||||||
|
|
||||||
queue = GST_QUEUE (GST_OBJECT_PARENT (pad));
|
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);
|
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)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_FLUSH:
|
case GST_EVENT_FLUSH:
|
||||||
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "FLUSH event, flushing queue\n");
|
||||||
|
|
Loading…
Reference in a new issue