Revert "decodebin: Handle the preroll multi-queue size"
This reverts commit 5c8ef0ea05123506dfc35c70c8b165bca7435dad.
This commit is contained in:
parent
4fe4357188
commit
2727ca01f5
@ -186,8 +186,6 @@ struct _GstDecodeBin
|
|||||||
GList *filtered_errors; /* filtered error messages */
|
GList *filtered_errors; /* filtered error messages */
|
||||||
|
|
||||||
GList *buffering_status; /* element currently buffering messages */
|
GList *buffering_status; /* element currently buffering messages */
|
||||||
|
|
||||||
gboolean extra_buffer_required; /* whether to controll queue size or not */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GstDecodeBinClass
|
struct _GstDecodeBinClass
|
||||||
@ -255,7 +253,6 @@ enum
|
|||||||
#define DEFAULT_POST_STREAM_TOPOLOGY FALSE
|
#define DEFAULT_POST_STREAM_TOPOLOGY FALSE
|
||||||
#define DEFAULT_EXPOSE_ALL_STREAMS TRUE
|
#define DEFAULT_EXPOSE_ALL_STREAMS TRUE
|
||||||
#define DEFAULT_CONNECTION_SPEED 0
|
#define DEFAULT_CONNECTION_SPEED 0
|
||||||
#define DEFAULT_EXTRA_SIZE_BUFFERS_BYTES 8 * 1024 * 1024 /* 8 MB */
|
|
||||||
|
|
||||||
/* Properties */
|
/* Properties */
|
||||||
enum
|
enum
|
||||||
@ -1102,8 +1099,6 @@ gst_decode_bin_init (GstDecodeBin * decode_bin)
|
|||||||
|
|
||||||
decode_bin->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
|
decode_bin->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
|
||||||
decode_bin->connection_speed = DEFAULT_CONNECTION_SPEED;
|
decode_bin->connection_speed = DEFAULT_CONNECTION_SPEED;
|
||||||
|
|
||||||
decode_bin->extra_buffer_required = FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -3051,7 +3046,6 @@ no_more_pads_cb (GstElement * element, GstDecodeChain * chain)
|
|||||||
GST_DEBUG_OBJECT (element, "Setting group %p to complete", group);
|
GST_DEBUG_OBJECT (element, "Setting group %p to complete", group);
|
||||||
|
|
||||||
group->no_more_pads = TRUE;
|
group->no_more_pads = TRUE;
|
||||||
group->dbin->extra_buffer_required = FALSE;
|
|
||||||
/* this group has prerolled enough to not need more pads,
|
/* this group has prerolled enough to not need more pads,
|
||||||
* we can probably set its buffering state to playing now */
|
* we can probably set its buffering state to playing now */
|
||||||
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
||||||
@ -3487,20 +3481,13 @@ multi_queue_overrun_cb (GstElement * queue, GstDecodeGroup * group)
|
|||||||
GST_LOG_OBJECT (dbin, "multiqueue '%s' (%p) is full", GST_OBJECT_NAME (queue),
|
GST_LOG_OBJECT (dbin, "multiqueue '%s' (%p) is full", GST_OBJECT_NAME (queue),
|
||||||
queue);
|
queue);
|
||||||
|
|
||||||
|
group->overrun = TRUE;
|
||||||
/* this group has prerolled enough to not need more pads,
|
/* this group has prerolled enough to not need more pads,
|
||||||
* we can probably set its buffering state to playing now */
|
* we can probably set its buffering state to playing now */
|
||||||
if (!group->no_more_pads && group->parent->demuxer
|
|
||||||
&& !dbin->extra_buffer_required) {
|
|
||||||
group->overrun = FALSE;
|
|
||||||
dbin->extra_buffer_required = TRUE;
|
|
||||||
} else {
|
|
||||||
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
GST_DEBUG_OBJECT (group->dbin, "Setting group %p multiqueue to "
|
||||||
"'playing' buffering mode", group);
|
"'playing' buffering mode", group);
|
||||||
group->overrun = TRUE;
|
|
||||||
dbin->extra_buffer_required = FALSE;
|
|
||||||
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
||||||
(group->parent ? group->parent->seekable : TRUE));
|
(group->parent ? group->parent->seekable : TRUE));
|
||||||
}
|
|
||||||
|
|
||||||
/* FIXME: We should make sure that everything gets exposed now
|
/* FIXME: We should make sure that everything gets exposed now
|
||||||
* even if child chains are not complete because the will never
|
* even if child chains are not complete because the will never
|
||||||
@ -3513,19 +3500,9 @@ multi_queue_overrun_cb (GstElement * queue, GstDecodeGroup * group)
|
|||||||
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
||||||
if (!gst_decode_bin_expose (dbin))
|
if (!gst_decode_bin_expose (dbin))
|
||||||
GST_WARNING_OBJECT (dbin, "Couldn't expose group");
|
GST_WARNING_OBJECT (dbin, "Couldn't expose group");
|
||||||
} else {
|
|
||||||
dbin->extra_buffer_required = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPOSE_UNLOCK (dbin);
|
EXPOSE_UNLOCK (dbin);
|
||||||
|
|
||||||
if (dbin->extra_buffer_required) {
|
|
||||||
GST_DEBUG_OBJECT (group->dbin,
|
|
||||||
"Setting group %p multiqueue to " "'extra_buffer_required' mode",
|
|
||||||
group);
|
|
||||||
decodebin_set_queue_size (group->dbin, group->multiqueue, FALSE,
|
|
||||||
(group->parent ? group->parent->seekable : TRUE));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -3687,9 +3664,7 @@ decodebin_set_queue_size_full (GstDecodeBin * dbin, GstElement * multiqueue,
|
|||||||
guint max_bytes, max_buffers;
|
guint max_bytes, max_buffers;
|
||||||
guint64 max_time;
|
guint64 max_time;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (multiqueue,
|
GST_DEBUG_OBJECT (multiqueue, "use buffering %d", use_buffering);
|
||||||
"use buffering %d, add extra buffer size mode %d", use_buffering,
|
|
||||||
dbin->extra_buffer_required);
|
|
||||||
|
|
||||||
if (preroll || use_buffering) {
|
if (preroll || use_buffering) {
|
||||||
/* takes queue limits, initially we only queue up up to the max bytes limit,
|
/* takes queue limits, initially we only queue up up to the max bytes limit,
|
||||||
@ -3705,12 +3680,6 @@ decodebin_set_queue_size_full (GstDecodeBin * dbin, GstElement * multiqueue,
|
|||||||
max_time = seekable ? AUTO_PREROLL_SEEKABLE_SIZE_TIME :
|
max_time = seekable ? AUTO_PREROLL_SEEKABLE_SIZE_TIME :
|
||||||
AUTO_PREROLL_NOT_SEEKABLE_SIZE_TIME;
|
AUTO_PREROLL_NOT_SEEKABLE_SIZE_TIME;
|
||||||
}
|
}
|
||||||
} else if (dbin->extra_buffer_required) {
|
|
||||||
max_bytes = AUTO_PREROLL_SIZE_BYTES + DEFAULT_EXTRA_SIZE_BUFFERS_BYTES;
|
|
||||||
max_buffers = AUTO_PREROLL_SIZE_BUFFERS;
|
|
||||||
if ((max_time = dbin->max_size_time) == 0)
|
|
||||||
max_time = seekable ? AUTO_PREROLL_SEEKABLE_SIZE_TIME :
|
|
||||||
AUTO_PREROLL_NOT_SEEKABLE_SIZE_TIME;
|
|
||||||
} else {
|
} else {
|
||||||
/* update runtime limits. At runtime, we try to keep the amount of buffers
|
/* update runtime limits. At runtime, we try to keep the amount of buffers
|
||||||
* in the queues as low as possible (but at least 5 buffers). */
|
* in the queues as low as possible (but at least 5 buffers). */
|
||||||
@ -5201,7 +5170,6 @@ gst_decode_bin_change_state (GstElement * element, GstStateChange transition)
|
|||||||
g_list_free_full (dbin->buffering_status,
|
g_list_free_full (dbin->buffering_status,
|
||||||
(GDestroyNotify) gst_message_unref);
|
(GDestroyNotify) gst_message_unref);
|
||||||
dbin->buffering_status = NULL;
|
dbin->buffering_status = NULL;
|
||||||
dbin->extra_buffer_required = FALSE;
|
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_READY_TO_NULL:
|
case GST_STATE_CHANGE_READY_TO_NULL:
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user