mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
ges-timeline-pipeline: port to 0.11
This commit is contained in:
parent
1f37aefdcd
commit
f043f05698
1 changed files with 15 additions and 9 deletions
|
@ -45,6 +45,7 @@ typedef struct
|
||||||
GstPad *playsinkpad;
|
GstPad *playsinkpad;
|
||||||
GstPad *encodebinpad;
|
GstPad *encodebinpad;
|
||||||
GstPad *blocked_pad;
|
GstPad *blocked_pad;
|
||||||
|
gulong probe_id;
|
||||||
} OutputChain;
|
} OutputChain;
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelinePipeline, ges_timeline_pipeline, GST_TYPE_PIPELINE);
|
G_DEFINE_TYPE (GESTimelinePipeline, ges_timeline_pipeline, GST_TYPE_PIPELINE);
|
||||||
|
@ -381,11 +382,12 @@ no_pad:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static GstPadProbeReturn
|
||||||
pad_blocked (GstPad * pad, gboolean blocked, gpointer user_data)
|
pad_blocked (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||||
{
|
{
|
||||||
/* no nothing */
|
/* no nothing */
|
||||||
GST_DEBUG_OBJECT (pad, "blocked callback, blocked: %d", blocked);
|
GST_DEBUG_OBJECT (pad, "blocked callback, blocked");
|
||||||
|
return GST_PAD_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -479,8 +481,9 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
chain->blocked_pad = tmppad;
|
chain->blocked_pad = tmppad;
|
||||||
GST_DEBUG ("blocking pad %" GST_PTR_FORMAT, tmppad);
|
GST_DEBUG_OBJECT (tmppad, "blocking pad");
|
||||||
gst_pad_set_blocked_async (tmppad, TRUE, pad_blocked, NULL);
|
chain->probe_id = gst_pad_add_probe (tmppad, GST_PAD_PROBE_TYPE_BLOCK,
|
||||||
|
pad_blocked, NULL, NULL);
|
||||||
|
|
||||||
GST_DEBUG ("Reconfiguring playsink");
|
GST_DEBUG ("Reconfiguring playsink");
|
||||||
|
|
||||||
|
@ -585,10 +588,11 @@ pad_removed_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chain->blocked_pad) {
|
if (chain->blocked_pad) {
|
||||||
GST_DEBUG ("unblocking pad %" GST_PTR_FORMAT, chain->blocked_pad);
|
GST_DEBUG_OBJECT (chain->blocked_pad, "unblocking pad");
|
||||||
gst_pad_set_blocked_async (chain->blocked_pad, FALSE, pad_blocked, NULL);
|
gst_pad_remove_probe (chain->blocked_pad, chain->probe_id);
|
||||||
gst_object_unref (chain->blocked_pad);
|
gst_object_unref (chain->blocked_pad);
|
||||||
chain->blocked_pad = NULL;
|
chain->blocked_pad = NULL;
|
||||||
|
chain->probe_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unlike/remove tee */
|
/* Unlike/remove tee */
|
||||||
|
@ -614,8 +618,10 @@ no_more_pads_cb (GstElement * timeline, GESTimelinePipeline * self)
|
||||||
OutputChain *chain = (OutputChain *) tmp->data;
|
OutputChain *chain = (OutputChain *) tmp->data;
|
||||||
|
|
||||||
if (chain->blocked_pad) {
|
if (chain->blocked_pad) {
|
||||||
GST_DEBUG ("unblocking pad %" GST_PTR_FORMAT, chain->blocked_pad);
|
GST_DEBUG_OBJECT (chain->blocked_pad, "unblocking pad");
|
||||||
gst_pad_set_blocked_async (chain->blocked_pad, FALSE, pad_blocked, NULL);
|
gst_pad_remove_probe (chain->blocked_pad, chain->probe_id);
|
||||||
|
chain->probe_id = 0;
|
||||||
|
/* do we need to unref and NULL the pad here? */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue