mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 21:12:26 +00:00
Merge branch 'master' into 0.11
Conflicts: gst/playback/gstdecodebin2.c
This commit is contained in:
commit
130a8335a0
1 changed files with 0 additions and 105 deletions
|
@ -435,7 +435,6 @@ static gboolean gst_decode_chain_is_complete (GstDecodeChain * chain);
|
||||||
static gboolean gst_decode_chain_expose (GstDecodeChain * chain,
|
static gboolean gst_decode_chain_expose (GstDecodeChain * chain,
|
||||||
GList ** endpads, gboolean * missing_plugin);
|
GList ** endpads, gboolean * missing_plugin);
|
||||||
static gboolean gst_decode_chain_is_drained (GstDecodeChain * chain);
|
static gboolean gst_decode_chain_is_drained (GstDecodeChain * chain);
|
||||||
static void gst_decode_chain_prune (GstDecodeChain * chain);
|
|
||||||
static gboolean gst_decode_group_is_complete (GstDecodeGroup * group);
|
static gboolean gst_decode_group_is_complete (GstDecodeGroup * group);
|
||||||
static GstPad *gst_decode_group_control_demuxer_pad (GstDecodeGroup * group,
|
static GstPad *gst_decode_group_control_demuxer_pad (GstDecodeGroup * group,
|
||||||
GstPad * pad);
|
GstPad * pad);
|
||||||
|
@ -2315,17 +2314,6 @@ pad_event_cb (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
||||||
return GST_PAD_PROBE_OK;
|
return GST_PAD_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
demuxer_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info,
|
|
||||||
GstDecodeChain * chain)
|
|
||||||
{
|
|
||||||
GstDecodeBin *dbin;
|
|
||||||
|
|
||||||
dbin = chain->dbin;
|
|
||||||
if (info->type == GST_PAD_PROBE_TYPE_IDLE)
|
|
||||||
gst_decode_chain_prune (dbin->decode_chain);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
||||||
{
|
{
|
||||||
|
@ -2342,28 +2330,6 @@ pad_added_cb (GstElement * element, GstPad * pad, GstDecodeChain * chain)
|
||||||
gst_caps_unref (caps);
|
gst_caps_unref (caps);
|
||||||
|
|
||||||
EXPOSE_LOCK (dbin);
|
EXPOSE_LOCK (dbin);
|
||||||
CHAIN_MUTEX_LOCK (chain);
|
|
||||||
if (chain->demuxer &&
|
|
||||||
((GstDecodeElement *) chain->elements->data)->element == element) {
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
for (l = chain->next_groups; l; l = l->next) {
|
|
||||||
GstDecodeGroup *group = l->data;
|
|
||||||
GList *l2;
|
|
||||||
|
|
||||||
for (l2 = group->children; l2; l2 = l2->next) {
|
|
||||||
GstDecodeChain *child_chain = l2->data;
|
|
||||||
|
|
||||||
if (!gst_pad_is_blocked (child_chain->pad)) {
|
|
||||||
GST_DEBUG_OBJECT (pad, "blocking next group's pad %p", pad);
|
|
||||||
gst_pad_add_probe (child_chain->pad,
|
|
||||||
GST_PAD_PROBE_TYPE_BLOCK_DOWNSTREAM,
|
|
||||||
(GstPadProbeCallback) demuxer_pad_blocked_cb, chain, NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
CHAIN_MUTEX_UNLOCK (chain);
|
|
||||||
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
if (gst_decode_chain_is_complete (dbin->decode_chain)) {
|
||||||
GST_LOG_OBJECT (dbin,
|
GST_LOG_OBJECT (dbin,
|
||||||
"That was the last dynamic object, now attempting to expose the group");
|
"That was the last dynamic object, now attempting to expose the group");
|
||||||
|
@ -2894,76 +2860,6 @@ gst_decode_group_hide (GstDecodeGroup * group)
|
||||||
gst_decode_group_free_internal (group, TRUE);
|
gst_decode_group_free_internal (group, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_decode_group_prune (GstDecodeGroup * group)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (group->dbin, "Pruning group %p", group);
|
|
||||||
|
|
||||||
for (l = group->children; l; l = l->next) {
|
|
||||||
GstDecodeChain *chain = (GstDecodeChain *) l->data;
|
|
||||||
|
|
||||||
gst_decode_chain_prune (chain);
|
|
||||||
}
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (group->dbin, "Pruned group %p", group);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
gst_decode_chain_prune (GstDecodeChain * chain)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
CHAIN_MUTEX_LOCK (chain);
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (chain->dbin, "Pruning chain %p", chain);
|
|
||||||
|
|
||||||
if (chain->active_group)
|
|
||||||
gst_decode_group_prune (chain->active_group);
|
|
||||||
|
|
||||||
for (l = chain->next_groups; l; l = l->next) {
|
|
||||||
gst_decode_group_prune ((GstDecodeGroup *) l->data);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (l = chain->old_groups; l; l = l->next) {
|
|
||||||
GstDecodeGroup *group = l->data;
|
|
||||||
|
|
||||||
/* This calls set_state(NULL) on the old elements and we're
|
|
||||||
* the streaming thread but this is one of the few cases
|
|
||||||
* when this is possible. It's guaranteed at this point
|
|
||||||
* that *this* streaming thread is not inside the elements
|
|
||||||
* currently, because it's *here* now or a different streaming
|
|
||||||
* thread is used for the elements.
|
|
||||||
*/
|
|
||||||
gst_decode_group_free (group);
|
|
||||||
}
|
|
||||||
g_list_free (chain->old_groups);
|
|
||||||
chain->old_groups = NULL;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (chain->dbin, "Pruned chain %p", chain);
|
|
||||||
CHAIN_MUTEX_UNLOCK (chain);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
unblock_demuxer_pads (GstDecodeChain * chain)
|
|
||||||
{
|
|
||||||
GList *l;
|
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (chain->dbin, "Unblocking demuxer pad for chain %p", chain);
|
|
||||||
|
|
||||||
if (gst_pad_is_blocked (chain->pad))
|
|
||||||
gst_pad_add_probe (chain->pad, GST_PAD_PROBE_TYPE_IDLE,
|
|
||||||
(GstPadProbeCallback) demuxer_pad_blocked_cb, chain, NULL);
|
|
||||||
if (chain->active_group) {
|
|
||||||
for (l = chain->active_group->children; l; l = l->next) {
|
|
||||||
GstDecodeChain *child_chain = l->data;
|
|
||||||
|
|
||||||
unblock_demuxer_pads (child_chain);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* configure queue sizes, this depends on the buffering method and if we are
|
/* configure queue sizes, this depends on the buffering method and if we are
|
||||||
* playing or prerolling. */
|
* playing or prerolling. */
|
||||||
static void
|
static void
|
||||||
|
@ -3339,7 +3235,6 @@ gst_decode_pad_handle_eos (GstDecodePad * pad)
|
||||||
EXPOSE_LOCK (dbin);
|
EXPOSE_LOCK (dbin);
|
||||||
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
if (gst_decode_chain_is_complete (dbin->decode_chain))
|
||||||
gst_decode_bin_expose (dbin);
|
gst_decode_bin_expose (dbin);
|
||||||
unblock_demuxer_pads (dbin->decode_chain);
|
|
||||||
EXPOSE_UNLOCK (dbin);
|
EXPOSE_UNLOCK (dbin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue