From ffe760e4769cfedf2cd38ab2638bf35eeb1a8789 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 3 Apr 2002 18:26:03 +0000 Subject: [PATCH] GST_DEBUG and _INFO should have no trailing \n Original commit message from CVS: GST_DEBUG and _INFO should have no trailing \n --- gst/elements/gstidentity.c | 14 +++++++ gst/gstbin.c | 8 ++-- gst/gstelement.c | 20 +++++----- gst/gstprops.c | 24 ++++++------ gst/gstqueue.c | 57 +++++++++++++-------------- gst/gstscheduler.h | 2 - gst/gstthread.c | 70 +++++++++++++++++----------------- plugins/elements/gstidentity.c | 14 +++++++ plugins/elements/gstqueue.c | 57 +++++++++++++-------------- 9 files changed, 147 insertions(+), 119 deletions(-) diff --git a/gst/elements/gstidentity.c b/gst/elements/gstidentity.c index b1451d3021..1573dc9f11 100644 --- a/gst/elements/gstidentity.c +++ b/gst/elements/gstidentity.c @@ -141,6 +141,18 @@ gst_identity_get_bufferpool (GstPad *pad) return gst_pad_get_bufferpool (identity->srcpad); } +static GstCaps* +gst_identity_getcaps (GstPad *pad, GstCaps *caps) +{ + GstIdentity *identity; + GstPad *otherpad; + + identity = GST_IDENTITY (gst_pad_get_parent (pad)); + otherpad = (pad == identity->srcpad ? identity->sinkpad : identity->srcpad); + + return gst_pad_get_allowed_caps (otherpad); +} + static GstPadConnectReturn gst_identity_connect (GstPad *pad, GstCaps *caps) { @@ -167,10 +179,12 @@ gst_identity_init (GstIdentity *identity) gst_pad_set_chain_function (identity->sinkpad, GST_DEBUG_FUNCPTR (gst_identity_chain)); gst_pad_set_bufferpool_function (identity->sinkpad, gst_identity_get_bufferpool); gst_pad_set_connect_function (identity->sinkpad, gst_identity_connect); + gst_pad_set_getcaps_function (identity->sinkpad, gst_identity_getcaps); identity->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); gst_pad_set_connect_function (identity->srcpad, gst_identity_connect); + gst_pad_set_getcaps_function (identity->srcpad, gst_identity_getcaps); identity->loop_based = FALSE; identity->sleep_time = 0; diff --git a/gst/gstbin.c b/gst/gstbin.c index f2d9d2686b..a855a4741c 100644 --- a/gst/gstbin.c +++ b/gst/gstbin.c @@ -392,7 +392,7 @@ gst_bin_remove (GstBin *bin, GstElement *element) gint state_idx = 0; GstElementState state; - GST_DEBUG_ELEMENT (GST_CAT_PARENTAGE, bin, "trying to remove child %s\n", GST_ELEMENT_NAME (element)); + GST_DEBUG_ELEMENT (GST_CAT_PARENTAGE, bin, "trying to remove child %s", GST_ELEMENT_NAME (element)); g_return_if_fail (bin != NULL); g_return_if_fail (GST_IS_BIN (bin)); @@ -553,7 +553,7 @@ gst_bin_change_state_norecurse (GstBin * bin) GstElementStateReturn ret; if (GST_ELEMENT_CLASS (parent_class)->change_state) { - GST_DEBUG_ELEMENT (GST_CAT_STATES, bin, "setting bin's own state\n"); + GST_DEBUG_ELEMENT (GST_CAT_STATES, bin, "setting bin's own state"); ret = GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT (bin)); return ret; @@ -845,9 +845,9 @@ gst_bin_iterate (GstBin * bin) if (!running) { if (GST_STATE (bin) == GST_STATE_PLAYING && GST_STATE_PENDING (bin) == GST_STATE_VOID_PENDING) { GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, bin, - "waiting for child shutdown after useless iteration\n"); + "waiting for child shutdown after useless iteration"); gst_element_wait_state_change (GST_ELEMENT (bin)); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, bin, "child shutdown\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, bin, "child shutdown"); } } diff --git a/gst/gstelement.c b/gst/gstelement.c index 26e2955874..0119096fb4 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -1248,7 +1248,7 @@ gst_element_set_state (GstElement *element, GstElementState state) /* start with the current state */ curpending = GST_STATE(element); - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "setting state from %s to %s\n", + GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "setting state from %s to %s", gst_element_statename (curpending), gst_element_statename (state)); @@ -1265,7 +1265,7 @@ gst_element_set_state (GstElement *element, GstElementState state) GST_STATE_PENDING (element) = curpending; if (curpending != state) { - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "intermediate: setting state to %s\n", + GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "intermediate: setting state to %s", gst_element_statename (curpending)); } @@ -1276,17 +1276,17 @@ gst_element_set_state (GstElement *element, GstElementState state) switch (return_val) { case GST_STATE_FAILURE: - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "have failed change_state return\n"); + GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "have failed change_state return"); return return_val; case GST_STATE_ASYNC: - GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element will change state async\n"); + GST_DEBUG_ELEMENT (GST_CAT_STATES, element, "element will change state async"); return return_val; default: /* Last thing we do is verify that a successful state change really * did change the state... */ if (GST_STATE (element) != curpending) { GST_DEBUG_ELEMENT (GST_CAT_STATES, element, - "element claimed state-change success, but state didn't change %s, %s <-> %s\n", + "element claimed state-change success, but state didn't change %s, %s <-> %s", gst_element_statename (GST_STATE (element)), gst_element_statename (GST_STATE_PENDING (element)), gst_element_statename (curpending)); @@ -1304,7 +1304,7 @@ gst_element_negotiate_pads (GstElement *element) { GList *pads = GST_ELEMENT_PADS (element); - GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "negotiating pads\n"); + GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "negotiating pads"); while (pads) { GstPad *pad = GST_PAD (pads->data); @@ -1344,13 +1344,13 @@ gst_element_negotiate_pads (GstElement *element) /* only try to negotiate if the peer element is in PAUSED or higher too */ if (otherstate >= GST_STATE_READY) { - GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "perform negotiate for %s:%s and %s:%s\n", + GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "perform negotiate for %s:%s and %s:%s", GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad)); if (!gst_pad_perform_negotiate (GST_PAD (srcpad), GST_PAD (sinkpad))) return FALSE; } else { - GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "not negotiatiating %s:%s and %s:%s, not in READY yet\n", + GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "not negotiatiating %s:%s and %s:%s, not in READY yet", GST_DEBUG_PAD_NAME (srcpad), GST_DEBUG_PAD_NAME (sinkpad)); } } @@ -1364,7 +1364,7 @@ gst_element_clear_pad_caps (GstElement *element) { GList *pads = GST_ELEMENT_PADS (element); - GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "clearing pad caps\n"); + GST_DEBUG_ELEMENT (GST_CAT_CAPS, element, "clearing pad caps"); while (pads) { GstRealPad *pad = GST_PAD_REALIZE (pads->data); @@ -1473,7 +1473,7 @@ gst_element_dispose (GObject *object) GList *pads; GstPad *pad; - GST_DEBUG_ELEMENT (GST_CAT_REFCOUNTING, element, "dispose\n"); + GST_DEBUG_ELEMENT (GST_CAT_REFCOUNTING, element, "dispose"); gst_element_set_state (element, GST_STATE_NULL); diff --git a/gst/gstprops.c b/gst/gstprops.c index 7b0d58a044..b6d2352edb 100644 --- a/gst/gstprops.c +++ b/gst/gstprops.c @@ -95,30 +95,30 @@ gst_props_debug_entry (GstPropsEntry *entry) switch (entry->propstype) { case GST_PROPS_INT_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: int %d\n", name, entry->data.int_data); + GST_DEBUG (GST_CAT_PROPERTIES, "%s: int %d", name, entry->data.int_data); break; case GST_PROPS_FLOAT_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: float %f\n", name, entry->data.float_data); + GST_DEBUG (GST_CAT_PROPERTIES, "%s: float %f", name, entry->data.float_data); break; case GST_PROPS_FOURCC_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: fourcc %4.4s\n", name, (gchar*)&entry->data.fourcc_data); + GST_DEBUG (GST_CAT_PROPERTIES, "%s: fourcc %4.4s", name, (gchar*)&entry->data.fourcc_data); break; case GST_PROPS_BOOL_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: bool %d\n", name, entry->data.bool_data); + GST_DEBUG (GST_CAT_PROPERTIES, "%s: bool %d", name, entry->data.bool_data); break; case GST_PROPS_STRING_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: string %s\n", name, entry->data.string_data.string); + GST_DEBUG (GST_CAT_PROPERTIES, "%s: string %s", name, entry->data.string_data.string); break; case GST_PROPS_INT_RANGE_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: int range %d-%d\n", name, entry->data.int_range_data.min, + GST_DEBUG (GST_CAT_PROPERTIES, "%s: int range %d-%d", name, entry->data.int_range_data.min, entry->data.int_range_data.max); break; case GST_PROPS_FLOAT_RANGE_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "%s: float range %f-%f\n", name, entry->data.float_range_data.min, + GST_DEBUG (GST_CAT_PROPERTIES, "%s: float range %f-%f", name, entry->data.float_range_data.min, entry->data.float_range_data.max); break; case GST_PROPS_LIST_TYPE: - GST_DEBUG (GST_CAT_PROPERTIES, "[list]\n"); + GST_DEBUG (GST_CAT_PROPERTIES, "[list]"); { GList *entries = entry->data.list_data.entries; @@ -1218,7 +1218,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry switch (entry2->propstype) { /* b <---> a */ case GST_PROPS_FOURCC_TYPE: - GST_DEBUG(GST_CAT_PROPERTIES,"\"%4.4s\" <--> \"%4.4s\" ?\n", + GST_DEBUG(GST_CAT_PROPERTIES,"\"%4.4s\" <--> \"%4.4s\" ?", (char*) &entry2->data.fourcc_data, (char*) &entry1->data.fourcc_data); return (entry2->data.fourcc_data == entry1->data.fourcc_data); default: @@ -1229,13 +1229,13 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry switch (entry2->propstype) { /* b <---> a - d */ case GST_PROPS_INT_RANGE_TYPE: - GST_DEBUG(GST_CAT_PROPERTIES,"%d <= %d <= %d ?\n",entry2->data.int_range_data.min, + GST_DEBUG(GST_CAT_PROPERTIES,"%d <= %d <= %d ?",entry2->data.int_range_data.min, entry1->data.int_data,entry2->data.int_range_data.max); return (entry2->data.int_range_data.min <= entry1->data.int_data && entry2->data.int_range_data.max >= entry1->data.int_data); /* b <---> a */ case GST_PROPS_INT_TYPE: - GST_DEBUG(GST_CAT_PROPERTIES,"%d == %d ?\n",entry1->data.int_data,entry2->data.int_data); + GST_DEBUG(GST_CAT_PROPERTIES,"%d == %d ?",entry1->data.int_data,entry2->data.int_data); return (entry2->data.int_data == entry1->data.int_data); default: break; @@ -1266,7 +1266,7 @@ gst_props_entry_check_compatibility (GstPropsEntry *entry1, GstPropsEntry *entry switch (entry2->propstype) { /* t <---> t */ case GST_PROPS_STRING_TYPE: - GST_DEBUG(GST_CAT_PROPERTIES,"\"%s\" <--> \"%s\" ?\n", + GST_DEBUG(GST_CAT_PROPERTIES,"\"%s\" <--> \"%s\" ?", entry2->data.string_data.string, entry1->data.string_data.string); return (!strcmp (entry2->data.string_data.string, entry1->data.string_data.string)); default: diff --git a/gst/gstqueue.c b/gst/gstqueue.c index cf8ec85d74..fd2852155e 100644 --- a/gst/gstqueue.c +++ b/gst/gstqueue.c @@ -223,7 +223,7 @@ gst_queue_init (GstQueue *queue) queue->writer = FALSE; queue->not_empty = g_cond_new (); queue->not_full = g_cond_new (); - GST_DEBUG_ELEMENT (GST_CAT_THREAD, queue, "initialized queue's not_empty & not_full conditions\n"); + GST_DEBUG_ELEMENT (GST_CAT_THREAD, queue, "initialized queue's not_empty & not_full conditions"); } static void @@ -251,7 +251,7 @@ gst_queue_get_bufferpool (GstPad *pad) static void gst_queue_cleanup_buffers (gpointer data, const gpointer user_data) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, user_data, "cleaning buffer %p\n", data); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, user_data, "cleaning buffer %p", data); if (GST_IS_BUFFER (data)) { gst_buffer_unref (GST_BUFFER (data)); @@ -287,9 +287,9 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf) restart: /* we have to lock the queue since we span threads */ - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld", pthread_self ()); g_mutex_lock (queue->qlock); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld", pthread_self ()); if (GST_IS_EVENT (buf)) { switch (GST_EVENT_TYPE (buf)) { @@ -307,7 +307,7 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d\n",buf,GST_BUFFER_SIZE(buf)); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d",buf,GST_BUFFER_SIZE(buf)); if (queue->level_buffers == queue->size_buffers) { /* if this is a leaky queue... */ @@ -315,12 +315,12 @@ restart: /* FIXME don't want to leak events! */ /* if we leak on the upstream side, drop the current buffer */ if (queue->leaky == GST_QUEUE_LEAK_UPSTREAM) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end"); if (GST_IS_EVENT (buf)) fprintf(stderr, "Error: queue [%s] leaked an event, type:%d\n", GST_ELEMENT_NAME(GST_ELEMENT(queue)), GST_EVENT_TYPE(GST_EVENT(buf))); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end"); gst_buffer_unref(buf); /* now we have to clean up and exit right away */ g_mutex_unlock (queue->qlock); @@ -330,7 +330,7 @@ restart: else { GList *front; GstBuffer *leakbuf; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on downstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on downstream end"); front = queue->queue; leakbuf = (GstBuffer *)(front->data); if (GST_IS_EVENT (leakbuf)) @@ -345,13 +345,13 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d", queue->level_buffers, queue->size_buffers); while (queue->level_buffers == queue->size_buffers) { /* if there's a pending state change for this queue or its manager, switch */ /* back to iterator so bottom half of state change executes */ while (GST_STATE_PENDING (queue) != GST_STATE_VOID_PENDING) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!"); g_mutex_unlock (queue->qlock); if (gst_element_interrupt (GST_ELEMENT (queue))) return; @@ -372,15 +372,16 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_full, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_full, level:%d/%d", + queue->level_buffers, queue->size_buffers); if (queue->writer) - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple writers on queue!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple writers on queue!"); queue->writer = TRUE; g_cond_wait (queue->not_full, queue->qlock); queue->writer = FALSE; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_full signal\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_full signal"); } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post full wait, level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post full wait, level:%d/%d", queue->level_buffers, queue->size_buffers); } @@ -389,7 +390,7 @@ restart: queue->level_buffers++; queue->level_bytes += GST_BUFFER_SIZE(buf); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)+ level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)+ level:%d/%d", GST_DEBUG_PAD_NAME(pad), queue->level_buffers, queue->size_buffers); @@ -403,7 +404,7 @@ restart: if (reader) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_empty\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_empty"); g_cond_signal (queue->not_empty); } } @@ -425,17 +426,17 @@ gst_queue_get (GstPad *pad) restart: /* have to lock for thread-safety */ - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld", pthread_self ()); g_mutex_lock (queue->qlock); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld %p\n", pthread_self (), queue->not_empty); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld %p", pthread_self (), queue->not_empty); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d", queue->level_buffers, queue->size_buffers); while (queue->level_buffers == 0) { /* if there's a pending state change for this queue or its manager, switch * back to iterator so bottom half of state change executes */ while (GST_STATE_PENDING (queue) != GST_STATE_VOID_PENDING) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!"); g_mutex_unlock (queue->qlock); if (gst_element_interrupt (GST_ELEMENT (queue))) return NULL; @@ -453,26 +454,26 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_empty, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_empty, level:%d/%d", queue->level_buffers, queue->size_buffers); if (queue->reader) - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple readers on queue!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple readers on queue!"); queue->reader = TRUE; g_cond_wait (queue->not_empty, queue->qlock); queue->reader = FALSE; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_empty signal\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_empty signal"); } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post empty wait, level:%d/%d", queue->level_buffers, queue->size_buffers); front = queue->queue; buf = (GstBuffer *)(front->data); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "retrieved buffer %p from queue\n", buf); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "retrieved buffer %p from queue", buf); queue->queue = g_list_remove_link (queue->queue, front); g_list_free (front); queue->level_buffers--; queue->level_bytes -= GST_BUFFER_SIZE(buf); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)- level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)- level:%d/%d", GST_DEBUG_PAD_NAME(pad), queue->level_buffers, queue->size_buffers); @@ -486,7 +487,7 @@ restart: if (writer) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_full\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_full"); g_cond_signal (queue->not_full); } @@ -495,7 +496,7 @@ restart: GstEvent *event = GST_EVENT(buf); switch (GST_EVENT_TYPE(event)) { case GST_EVENT_EOS: - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue \"%s\" eos\n", GST_ELEMENT_NAME (queue)); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue \"%s\" eos", GST_ELEMENT_NAME (queue)); gst_element_set_eos (GST_ELEMENT (queue)); break; default: diff --git a/gst/gstscheduler.h b/gst/gstscheduler.h index 599172df26..3e50922fcb 100644 --- a/gst/gstscheduler.h +++ b/gst/gstscheduler.h @@ -128,8 +128,6 @@ void gst_scheduler_error (GstScheduler *sched, GstElement *element); void gst_scheduler_pad_connect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); void gst_scheduler_pad_disconnect (GstScheduler *sched, GstPad *srcpad, GstPad *sinkpad); GstPad* gst_scheduler_pad_select (GstScheduler *sched, GList *padlist); -GstClock* gst_scheduler_get_clock (GstScheduler *sched); -GstClock* gst_scheduler_get_clock (GstScheduler *sched); GstClockReturn gst_scheduler_clock_wait (GstScheduler *sched, GstElement *element, GstClock *clock, GstClockTime time); gboolean gst_scheduler_iterate (GstScheduler *sched); diff --git a/gst/gstthread.c b/gst/gstthread.c index e6044e1955..e7dfa53f50 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -265,7 +265,7 @@ gst_thread_change_state (GstElement * element) if (pthread_equal (self, thread->thread_id)) { GST_DEBUG (GST_CAT_THREAD, - "no sync(" GST_DEBUG_THREAD_FORMAT "): setting own thread's state to spinning\n", + "no sync(" GST_DEBUG_THREAD_FORMAT "): setting own thread's state to spinning", GST_DEBUG_THREAD_ARGS (thread->pid)); return gst_thread_update_state (thread); } @@ -275,7 +275,7 @@ gst_thread_change_state (GstElement * element) /* set the state to idle */ GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING); - THR_DEBUG ("creating thread \"%s\"\n", GST_ELEMENT_NAME (element)); + THR_DEBUG ("creating thread \"%s\"", GST_ELEMENT_NAME (element)); g_mutex_lock (thread->lock); @@ -283,29 +283,29 @@ gst_thread_change_state (GstElement * element) pthread_create (&thread->thread_id, NULL, gst_thread_main_loop, thread); /* wait for it to 'spin up' */ - THR_DEBUG ("waiting for child thread spinup\n"); + THR_DEBUG ("waiting for child thread spinup"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("thread claims to be up\n"); + THR_DEBUG ("thread claims to be up"); g_mutex_unlock (thread->lock); break; case GST_STATE_READY_TO_PAUSED: THR_INFO ("readying thread"); g_mutex_lock (thread->lock); - THR_DEBUG ("signaling\n"); + THR_DEBUG ("signaling"); g_cond_signal (thread->cond); - THR_DEBUG ("waiting for ack\n"); + THR_DEBUG ("waiting for ack"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("got ack\n"); + THR_DEBUG ("got ack"); g_mutex_unlock (thread->lock); break; case GST_STATE_PAUSED_TO_PLAYING: - THR_DEBUG ("telling thread to start spinning\n"); + THR_DEBUG ("telling thread to start spinning"); g_mutex_lock (thread->lock); - THR_DEBUG ("signaling\n"); + THR_DEBUG ("signaling"); g_cond_signal (thread->cond); - THR_DEBUG ("waiting for ack\n"); + THR_DEBUG ("waiting for ack"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("got ack\n"); + THR_DEBUG ("got ack"); g_mutex_unlock (thread->lock); break; case GST_STATE_PLAYING_TO_PAUSED: @@ -328,7 +328,7 @@ gst_thread_change_state (GstElement * element) GstElement *element = GST_ELEMENT (elements->data); g_assert (element); - THR_DEBUG (" element \"%s\"\n", GST_ELEMENT_NAME (element)); + THR_DEBUG (" element \"%s\"", GST_ELEMENT_NAME (element)); elements = g_list_next (elements); if (GST_IS_QUEUE (element)) { GstQueue *queue = GST_QUEUE (element); @@ -337,7 +337,7 @@ gst_thread_change_state (GstElement * element) * FIXME on up- or down-stream side) * FIXME also make this more efficient by keeping list of managed queues */ - THR_DEBUG ("waking queue \"%s\"\n", GST_ELEMENT_NAME (element)); + THR_DEBUG ("waking queue \"%s\"", GST_ELEMENT_NAME (element)); g_mutex_lock (queue->qlock); GST_STATE_PENDING (element) = GST_STATE_PAUSED; g_cond_signal (queue->not_full); @@ -374,7 +374,7 @@ gst_thread_change_state (GstElement * element) if (GST_ELEMENT_SCHED (peerelement) != GST_ELEMENT_SCHED (thread)) { GstQueue *queue = GST_QUEUE (peerelement); - THR_DEBUG (" element \"%s\" has pad cross sched boundary\n", GST_ELEMENT_NAME (element)); + THR_DEBUG (" element \"%s\" has pad cross sched boundary", GST_ELEMENT_NAME (element)); /* FIXME!! */ g_mutex_lock (queue->qlock); g_cond_signal (queue->not_full); @@ -384,23 +384,23 @@ gst_thread_change_state (GstElement * element) } } } - THR_DEBUG ("telling thread to pause, signaling\n"); + THR_DEBUG ("telling thread to pause, signaling"); g_cond_signal (thread->cond); - THR_DEBUG ("waiting for ack\n"); + THR_DEBUG ("waiting for ack"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("got ack\n"); + THR_DEBUG ("got ack"); g_mutex_unlock (thread->lock); break; } case GST_STATE_READY_TO_NULL: - THR_DEBUG ("telling thread to pause (null) - and joining\n"); + THR_DEBUG ("telling thread to pause (null) - and joining"); /* MattH FIXME revisit */ g_mutex_lock (thread->lock); - THR_DEBUG ("signaling\n"); + THR_DEBUG ("signaling"); g_cond_signal (thread->cond); - THR_DEBUG ("waiting for ack\n"); + THR_DEBUG ("waiting for ack"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("got ack\n"); + THR_DEBUG ("got ack"); pthread_join (thread->thread_id, NULL); thread->thread_id = -1; g_mutex_unlock (thread->lock); @@ -411,18 +411,18 @@ gst_thread_change_state (GstElement * element) break; case GST_STATE_PAUSED_TO_READY: - THR_DEBUG ("telling thread to stop spinning\n"); + THR_DEBUG ("telling thread to stop spinning"); g_mutex_lock (thread->lock); - THR_DEBUG ("signaling\n"); + THR_DEBUG ("signaling"); g_cond_signal (thread->cond); - THR_DEBUG ("waiting for ack\n"); + THR_DEBUG ("waiting for ack"); g_cond_wait (thread->cond, thread->lock); - THR_DEBUG ("got ack\n"); + THR_DEBUG ("got ack"); g_mutex_unlock (thread->lock); break; default: - GST_DEBUG_ELEMENT (GST_CAT_THREAD, element, "UNHANDLED STATE CHANGE! %x\n", transition); + GST_DEBUG_ELEMENT (GST_CAT_THREAD, element, "UNHANDLED STATE CHANGE! %x", transition); break; } @@ -455,15 +455,15 @@ gst_thread_main_loop (void *arg) stateset = GST_ELEMENT_CLASS (parent_class)->change_state (GST_ELEMENT(thread)); if (stateset != GST_STATE_SUCCESS) { - THR_DEBUG_MAIN ("state change of children failed\n"); + THR_DEBUG_MAIN ("state change of children failed"); } } - THR_DEBUG_MAIN ("indicating spinup\n"); + THR_DEBUG_MAIN ("indicating spinup"); g_cond_signal (thread->cond); /* don't unlock the mutex because we hold it into the top of the while loop */ - THR_DEBUG_MAIN ("thread has indicated spinup to parent process\n"); + THR_DEBUG_MAIN ("thread has indicated spinup to parent process"); /***** THREAD IS NOW IN READY STATE *****/ @@ -474,7 +474,7 @@ gst_thread_main_loop (void *arg) /* NOTE: cannot be in NULL, we're not running in that state at all */ case GST_STATE_READY: /* wait to be set to either the NULL or PAUSED states */ - THR_DEBUG_MAIN ("thread in %s state, waiting for either %s or %s\n", + THR_DEBUG_MAIN ("thread in %s state, waiting for either %s or %s", gst_element_statename (GST_STATE_READY), gst_element_statename (GST_STATE_NULL), gst_element_statename (GST_STATE_PAUSED)); @@ -489,7 +489,7 @@ gst_thread_main_loop (void *arg) /* been signaled, we need to state transition now and signal back */ gst_thread_update_state (thread); - THR_DEBUG_MAIN ("done with state transition, signaling back to parent process\n"); + THR_DEBUG_MAIN ("done with state transition, signaling back to parent process"); g_cond_signal (thread->cond); /* now we decide what to do next */ if (GST_STATE (thread) == GST_STATE_NULL) { @@ -499,7 +499,7 @@ gst_thread_main_loop (void *arg) continue; case GST_STATE_PAUSED: /* wait to be set to either the READY or PLAYING states */ - THR_DEBUG_MAIN("thread in %s state, waiting for either %s or %s\n", + THR_DEBUG_MAIN("thread in %s state, waiting for either %s or %s", gst_element_statename (GST_STATE_PAUSED), gst_element_statename (GST_STATE_READY), gst_element_statename (GST_STATE_PLAYING)); @@ -540,14 +540,14 @@ gst_thread_main_loop (void *arg) gst_thread_update_state (thread); } /* once we're here, SPINNING has stopped, we should signal that we're done */ - THR_DEBUG_MAIN ("SPINNING stopped, signaling back to parent process\n"); + THR_DEBUG_MAIN ("SPINNING stopped, signaling back to parent process"); g_cond_signal (thread->cond); /* now we can wait for PAUSED */ continue; } case GST_STATE_PLAYING: /* wait to be set to PAUSED */ - THR_DEBUG_MAIN ("thread in %s state, waiting for %s\n", + THR_DEBUG_MAIN ("thread in %s state, waiting for %s", gst_element_statename(GST_STATE_PLAYING), gst_element_statename(GST_STATE_PAUSED)); g_cond_wait (thread->cond,thread->lock); @@ -559,7 +559,7 @@ gst_thread_main_loop (void *arg) /* there's only PAUSED, we we just wait for it */ continue; case GST_STATE_NULL: - THR_DEBUG_MAIN ("thread in %s state, preparing to die\n", + THR_DEBUG_MAIN ("thread in %s state, preparing to die", gst_element_statename(GST_STATE_NULL)); GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING); break; diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index b1451d3021..1573dc9f11 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -141,6 +141,18 @@ gst_identity_get_bufferpool (GstPad *pad) return gst_pad_get_bufferpool (identity->srcpad); } +static GstCaps* +gst_identity_getcaps (GstPad *pad, GstCaps *caps) +{ + GstIdentity *identity; + GstPad *otherpad; + + identity = GST_IDENTITY (gst_pad_get_parent (pad)); + otherpad = (pad == identity->srcpad ? identity->sinkpad : identity->srcpad); + + return gst_pad_get_allowed_caps (otherpad); +} + static GstPadConnectReturn gst_identity_connect (GstPad *pad, GstCaps *caps) { @@ -167,10 +179,12 @@ gst_identity_init (GstIdentity *identity) gst_pad_set_chain_function (identity->sinkpad, GST_DEBUG_FUNCPTR (gst_identity_chain)); gst_pad_set_bufferpool_function (identity->sinkpad, gst_identity_get_bufferpool); gst_pad_set_connect_function (identity->sinkpad, gst_identity_connect); + gst_pad_set_getcaps_function (identity->sinkpad, gst_identity_getcaps); identity->srcpad = gst_pad_new ("src", GST_PAD_SRC); gst_element_add_pad (GST_ELEMENT (identity), identity->srcpad); gst_pad_set_connect_function (identity->srcpad, gst_identity_connect); + gst_pad_set_getcaps_function (identity->srcpad, gst_identity_getcaps); identity->loop_based = FALSE; identity->sleep_time = 0; diff --git a/plugins/elements/gstqueue.c b/plugins/elements/gstqueue.c index cf8ec85d74..fd2852155e 100644 --- a/plugins/elements/gstqueue.c +++ b/plugins/elements/gstqueue.c @@ -223,7 +223,7 @@ gst_queue_init (GstQueue *queue) queue->writer = FALSE; queue->not_empty = g_cond_new (); queue->not_full = g_cond_new (); - GST_DEBUG_ELEMENT (GST_CAT_THREAD, queue, "initialized queue's not_empty & not_full conditions\n"); + GST_DEBUG_ELEMENT (GST_CAT_THREAD, queue, "initialized queue's not_empty & not_full conditions"); } static void @@ -251,7 +251,7 @@ gst_queue_get_bufferpool (GstPad *pad) static void gst_queue_cleanup_buffers (gpointer data, const gpointer user_data) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, user_data, "cleaning buffer %p\n", data); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, user_data, "cleaning buffer %p", data); if (GST_IS_BUFFER (data)) { gst_buffer_unref (GST_BUFFER (data)); @@ -287,9 +287,9 @@ gst_queue_chain (GstPad *pad, GstBuffer *buf) restart: /* we have to lock the queue since we span threads */ - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld", pthread_self ()); g_mutex_lock (queue->qlock); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld", pthread_self ()); if (GST_IS_EVENT (buf)) { switch (GST_EVENT_TYPE (buf)) { @@ -307,7 +307,7 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d\n",buf,GST_BUFFER_SIZE(buf)); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "adding buffer %p of size %d",buf,GST_BUFFER_SIZE(buf)); if (queue->level_buffers == queue->size_buffers) { /* if this is a leaky queue... */ @@ -315,12 +315,12 @@ restart: /* FIXME don't want to leak events! */ /* if we leak on the upstream side, drop the current buffer */ if (queue->leaky == GST_QUEUE_LEAK_UPSTREAM) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end"); if (GST_IS_EVENT (buf)) fprintf(stderr, "Error: queue [%s] leaked an event, type:%d\n", GST_ELEMENT_NAME(GST_ELEMENT(queue)), GST_EVENT_TYPE(GST_EVENT(buf))); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on upstream end"); gst_buffer_unref(buf); /* now we have to clean up and exit right away */ g_mutex_unlock (queue->qlock); @@ -330,7 +330,7 @@ restart: else { GList *front; GstBuffer *leakbuf; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on downstream end\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue is full, leaking buffer on downstream end"); front = queue->queue; leakbuf = (GstBuffer *)(front->data); if (GST_IS_EVENT (leakbuf)) @@ -345,13 +345,13 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre full wait, level:%d/%d", queue->level_buffers, queue->size_buffers); while (queue->level_buffers == queue->size_buffers) { /* if there's a pending state change for this queue or its manager, switch */ /* back to iterator so bottom half of state change executes */ while (GST_STATE_PENDING (queue) != GST_STATE_VOID_PENDING) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!"); g_mutex_unlock (queue->qlock); if (gst_element_interrupt (GST_ELEMENT (queue))) return; @@ -372,15 +372,16 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_full, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_full, level:%d/%d", + queue->level_buffers, queue->size_buffers); if (queue->writer) - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple writers on queue!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple writers on queue!"); queue->writer = TRUE; g_cond_wait (queue->not_full, queue->qlock); queue->writer = FALSE; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_full signal\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_full signal"); } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post full wait, level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post full wait, level:%d/%d", queue->level_buffers, queue->size_buffers); } @@ -389,7 +390,7 @@ restart: queue->level_buffers++; queue->level_bytes += GST_BUFFER_SIZE(buf); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)+ level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)+ level:%d/%d", GST_DEBUG_PAD_NAME(pad), queue->level_buffers, queue->size_buffers); @@ -403,7 +404,7 @@ restart: if (reader) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_empty\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_empty"); g_cond_signal (queue->not_empty); } } @@ -425,17 +426,17 @@ gst_queue_get (GstPad *pad) restart: /* have to lock for thread-safety */ - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld\n", pthread_self ()); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locking t:%ld", pthread_self ()); g_mutex_lock (queue->qlock); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld %p\n", pthread_self (), queue->not_empty); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "locked t:%ld %p", pthread_self (), queue->not_empty); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "pre empty wait, level:%d/%d", queue->level_buffers, queue->size_buffers); while (queue->level_buffers == 0) { /* if there's a pending state change for this queue or its manager, switch * back to iterator so bottom half of state change executes */ while (GST_STATE_PENDING (queue) != GST_STATE_VOID_PENDING) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "interrupted!!"); g_mutex_unlock (queue->qlock); if (gst_element_interrupt (GST_ELEMENT (queue))) return NULL; @@ -453,26 +454,26 @@ restart: } } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_empty, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "waiting for not_empty, level:%d/%d", queue->level_buffers, queue->size_buffers); if (queue->reader) - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple readers on queue!\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "WARNING: multiple readers on queue!"); queue->reader = TRUE; g_cond_wait (queue->not_empty, queue->qlock); queue->reader = FALSE; - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_empty signal\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "got not_empty signal"); } - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post empty wait, level:%d/%d\n", queue->level_buffers, queue->size_buffers); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "post empty wait, level:%d/%d", queue->level_buffers, queue->size_buffers); front = queue->queue; buf = (GstBuffer *)(front->data); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "retrieved buffer %p from queue\n", buf); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "retrieved buffer %p from queue", buf); queue->queue = g_list_remove_link (queue->queue, front); g_list_free (front); queue->level_buffers--; queue->level_bytes -= GST_BUFFER_SIZE(buf); - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)- level:%d/%d\n", + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "(%s:%s)- level:%d/%d", GST_DEBUG_PAD_NAME(pad), queue->level_buffers, queue->size_buffers); @@ -486,7 +487,7 @@ restart: if (writer) { - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_full\n"); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "signalling not_full"); g_cond_signal (queue->not_full); } @@ -495,7 +496,7 @@ restart: GstEvent *event = GST_EVENT(buf); switch (GST_EVENT_TYPE(event)) { case GST_EVENT_EOS: - GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue \"%s\" eos\n", GST_ELEMENT_NAME (queue)); + GST_DEBUG_ELEMENT (GST_CAT_DATAFLOW, queue, "queue \"%s\" eos", GST_ELEMENT_NAME (queue)); gst_element_set_eos (GST_ELEMENT (queue)); break; default: