mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
GESTimelinePipeline: Reconfigure playsink once we've added a pad.
This commit is contained in:
parent
73c6f213c7
commit
ea7831cac0
1 changed files with 8 additions and 1 deletions
|
@ -157,6 +157,7 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
const gchar *sinkpad_name;
|
const gchar *sinkpad_name;
|
||||||
GstPad *sinkpad;
|
GstPad *sinkpad;
|
||||||
|
gboolean reconfigured = FALSE;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "new pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG_OBJECT (self, "new pad %s:%s", GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
|
@ -182,6 +183,7 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Request a sinkpad from playsink */
|
||||||
if (G_UNLIKELY (!(sinkpad =
|
if (G_UNLIKELY (!(sinkpad =
|
||||||
gst_element_get_request_pad (self->sink, sinkpad_name)))) {
|
gst_element_get_request_pad (self->sink, sinkpad_name)))) {
|
||||||
GST_WARNING_OBJECT (self, "Couldn't get a pad from the playsink !");
|
GST_WARNING_OBJECT (self, "Couldn't get a pad from the playsink !");
|
||||||
|
@ -194,6 +196,12 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GST_DEBUG ("Reconfiguring playsink");
|
||||||
|
|
||||||
|
/* reconfigure playsink */
|
||||||
|
g_signal_emit_by_name (self->sink, "reconfigure", &reconfigured);
|
||||||
|
GST_DEBUG ("'reconfigure' returned %d", reconfigured);
|
||||||
|
|
||||||
/* Create a new chain */
|
/* Create a new chain */
|
||||||
chain = g_new0 (OutputChain, 1);
|
chain = g_new0 (OutputChain, 1);
|
||||||
chain->pipeline = self;
|
chain->pipeline = self;
|
||||||
|
@ -202,7 +210,6 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GESTimelinePipeline * self)
|
||||||
|
|
||||||
self->chains = g_list_append (self->chains, chain);
|
self->chains = g_list_append (self->chains, chain);
|
||||||
|
|
||||||
/* Request a sinkpad from playsink */
|
|
||||||
GST_DEBUG ("done");
|
GST_DEBUG ("done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue