aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2013-09-19 12:31:13 +0200
committerSebastian Dröge <slomo@circular-chaos.org>2013-09-19 12:31:13 +0200
commit63f3a12981d4257915f0c1651ab409a08a1c66f8 (patch)
treeaede32630d47ab14da0fb9ca006a363ae3407dc3 /plugins
parent63f38155df9cb281e4d48dbc14389e66446436f2 (diff)
Imported Upstream version 1.1.90upstream/1.1.90
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Makefile.in2
-rw-r--r--plugins/elements/Makefile.in2
-rw-r--r--plugins/elements/gstcapsfilter.c10
-rw-r--r--plugins/elements/gstmultiqueue.c28
-rw-r--r--plugins/elements/gstoutputselector.c7
-rw-r--r--plugins/elements/gstqueue2.c10
-rw-r--r--plugins/elements/gsttypefindelement.c1
7 files changed, 45 insertions, 15 deletions
diff --git a/plugins/Makefile.in b/plugins/Makefile.in
index ffdad8d..472696c 100644
--- a/plugins/Makefile.in
+++ b/plugins/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/plugins/elements/Makefile.in b/plugins/elements/Makefile.in
index 8ba6cea..c00da16 100644
--- a/plugins/elements/Makefile.in
+++ b/plugins/elements/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.13.3 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
diff --git a/plugins/elements/gstcapsfilter.c b/plugins/elements/gstcapsfilter.c
index c5710ea..4cd8b71 100644
--- a/plugins/elements/gstcapsfilter.c
+++ b/plugins/elements/gstcapsfilter.c
@@ -366,17 +366,17 @@ gst_capsfilter_sink_event (GstBaseTransform * trans, GstEvent * event)
if (GST_EVENT_TYPE (event) == GST_EVENT_FLUSH_STOP) {
GList *l;
- for (l = filter->pending_events; l;) {
+ for (l = filter->pending_events; l; l = l->next) {
if (GST_EVENT_TYPE (l->data) == GST_EVENT_SEGMENT) {
gst_event_unref (l->data);
- l = g_list_delete_link (l, l);
- } else {
- l = l->next;
+ filter->pending_events = g_list_delete_link (filter->pending_events, l);
+ break;
}
}
}
- if (!GST_EVENT_IS_STICKY (event) || GST_EVENT_TYPE (event) <= GST_EVENT_CAPS)
+ if (!GST_EVENT_IS_STICKY (event)
+ || GST_EVENT_TYPE (event) <= GST_EVENT_CAPS)
goto done;
/* If we get EOS before any buffers, just push all pending events */
diff --git a/plugins/elements/gstmultiqueue.c b/plugins/elements/gstmultiqueue.c
index a83220d..8a7a45e 100644
--- a/plugins/elements/gstmultiqueue.c
+++ b/plugins/elements/gstmultiqueue.c
@@ -495,11 +495,30 @@ gst_multi_queue_set_property (GObject * object, guint prop_id,
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
break;
case PROP_MAX_SIZE_BUFFERS:
+ {
+ GList *tmp;
+ gint new_size = g_value_get_uint (value);
+
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
- mq->max_size.visible = g_value_get_uint (value);
- SET_CHILD_PROPERTY (mq, visible);
+
+ tmp = mq->queues;
+ while (tmp) {
+ GstDataQueueSize size;
+ GstSingleQueue *q = (GstSingleQueue *) tmp->data;
+ gst_data_queue_get_level (q->queue, &size);
+
+ /* do not reduce max size below current level if the single queue has grown because of empty queue */
+ if (new_size >= size.visible && size.visible <= mq->max_size.visible)
+ q->max_size.visible = new_size;
+ tmp = g_list_next (tmp);
+ };
+
+ mq->max_size.visible = new_size;
+
GST_MULTI_QUEUE_MUTEX_UNLOCK (mq);
+
break;
+ }
case PROP_MAX_SIZE_TIME:
GST_MULTI_QUEUE_MUTEX_LOCK (mq);
mq->max_size.time = g_value_get_uint64 (value);
@@ -704,7 +723,12 @@ gst_multi_queue_change_state (GstElement * element, GstStateChange transition)
sq = (GstSingleQueue *) tmp->data;
sq->flushing = FALSE;
}
+
+ /* the visible limit might not have been set on single queues that have grown because of other queueus were empty */
+ SET_CHILD_PROPERTY (mqueue, visible);
+
GST_MULTI_QUEUE_MUTEX_UNLOCK (mqueue);
+
break;
}
case GST_STATE_CHANGE_PAUSED_TO_READY:{
diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c
index fe5f99d..531c3d9 100644
--- a/plugins/elements/gstoutputselector.c
+++ b/plugins/elements/gstoutputselector.c
@@ -368,7 +368,6 @@ gst_output_selector_switch (GstOutputSelector * osel)
gboolean res = FALSE;
GstEvent *ev = NULL;
GstSegment *seg = NULL;
- gint64 start = 0, position = 0;
/* Switch */
GST_OBJECT_LOCK (GST_OBJECT (osel));
@@ -391,13 +390,9 @@ gst_output_selector_switch (GstOutputSelector * osel)
/* If resending then mark segment start and position accordingly */
if (osel->resend_latest && osel->latest_buffer &&
GST_BUFFER_TIMESTAMP_IS_VALID (osel->latest_buffer)) {
- start = position = GST_BUFFER_TIMESTAMP (osel->latest_buffer);
- } else {
- start = position = seg->position;
+ seg->position = GST_BUFFER_TIMESTAMP (osel->latest_buffer);
}
- seg->start = start;
- seg->position = position;
ev = gst_event_new_segment (seg);
if (!gst_pad_push_event (osel->active_srcpad, ev)) {
diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c
index eb842a4..2452385 100644
--- a/plugins/elements/gstqueue2.c
+++ b/plugins/elements/gstqueue2.c
@@ -255,6 +255,7 @@ static gboolean gst_queue2_is_empty (GstQueue2 * queue);
static gboolean gst_queue2_is_filled (GstQueue2 * queue);
static void update_cur_level (GstQueue2 * queue, GstQueue2Range * range);
+static void update_in_rates (GstQueue2 * queue);
typedef enum
{
@@ -875,6 +876,11 @@ update_buffering (GstQueue2 * queue)
gint percent;
gboolean post = FALSE;
+ /* Ensure the variables used to calculate buffering state are up-to-date. */
+ if (queue->current)
+ update_cur_level (queue, queue->current);
+ update_in_rates (queue);
+
if (!get_buffering_percent (queue, NULL, &percent))
return;
@@ -1285,6 +1291,10 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
update_cur_pos (queue, queue->current, rpos);
GST_QUEUE2_SIGNAL_DEL (queue);
}
+
+ if (queue->use_buffering)
+ update_buffering (queue);
+
GST_DEBUG_OBJECT (queue, "waiting for add");
GST_QUEUE2_WAIT_ADD_CHECK (queue, queue->srcresult, out_flushing);
continue;
diff --git a/plugins/elements/gsttypefindelement.c b/plugins/elements/gsttypefindelement.c
index c298414..ee6e20b 100644
--- a/plugins/elements/gsttypefindelement.c
+++ b/plugins/elements/gsttypefindelement.c
@@ -632,6 +632,7 @@ gst_type_find_element_sink_event (GstPad * pad, GstObject * parent,
*/
gst_event_unref (event);
res = TRUE;
+ break;
}
case GST_EVENT_EOS:
{