mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 12:32:29 +00:00
playsinkconvertbin: Reconfigure if we switch from raw to incompatible raw caps
We might need to add converters and worked in passthrough mode before.
This commit is contained in:
parent
113546b777
commit
683735a01e
1 changed files with 18 additions and 6 deletions
|
@ -319,14 +319,26 @@ gst_play_sink_convert_bin_sink_setcaps (GstPad * pad, GstCaps * caps)
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (self, "raw %d, self->raw %d, blocked %d",
|
GST_DEBUG_OBJECT (self, "raw %d, self->raw %d, blocked %d",
|
||||||
raw, self->raw, gst_pad_is_blocked (self->sink_proxypad));
|
raw, self->raw, gst_pad_is_blocked (self->sink_proxypad));
|
||||||
|
|
||||||
if (raw) {
|
if (raw) {
|
||||||
if (!self->raw && !gst_pad_is_blocked (self->sink_proxypad)) {
|
if (!gst_pad_is_blocked (self->sink_proxypad)) {
|
||||||
|
GstPad *target = gst_ghost_pad_get_target (GST_GHOST_PAD (self->sinkpad));
|
||||||
|
|
||||||
|
if (!self->raw || (target && !gst_pad_accept_caps (target, caps))) {
|
||||||
|
if (!self->raw)
|
||||||
GST_DEBUG_OBJECT (self, "Changing caps from non-raw to raw");
|
GST_DEBUG_OBJECT (self, "Changing caps from non-raw to raw");
|
||||||
|
else
|
||||||
|
GST_DEBUG_OBJECT (self, "Changing caps in an incompatible way");
|
||||||
|
|
||||||
reconfigure = TRUE;
|
reconfigure = TRUE;
|
||||||
gst_pad_set_blocked_async_full (self->sink_proxypad, TRUE,
|
gst_pad_set_blocked_async_full (self->sink_proxypad, TRUE,
|
||||||
(GstPadBlockCallback) pad_blocked_cb, gst_object_ref (self),
|
(GstPadBlockCallback) pad_blocked_cb, gst_object_ref (self),
|
||||||
(GDestroyNotify) gst_object_unref);
|
(GDestroyNotify) gst_object_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (target)
|
||||||
|
gst_object_unref (target);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (self->raw && !gst_pad_is_blocked (self->sink_proxypad)) {
|
if (self->raw && !gst_pad_is_blocked (self->sink_proxypad)) {
|
||||||
GST_DEBUG_OBJECT (self, "Changing caps from raw to non-raw");
|
GST_DEBUG_OBJECT (self, "Changing caps from raw to non-raw");
|
||||||
|
|
Loading…
Reference in a new issue