Commit graph

11 commits

Author SHA1 Message Date
Nicolas Dufresne
e7b962d9b5 alphacombine: Ignore all events coming from the alpha_pad
As per usage of this element, everything from this pad is a
duplicate. Instead of implemented needless aggregation, simply
drop all events from this pad and let the one from the main stream
passthrough. Also stop proxying some queries from the alpha pad_too.

This fixes racy test failure:
- validate.file.playback.scrub_forward_seeking.opus_vp9-alpha_webm

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Nicolas Dufresne
0484d658a8 codecalphademux: Do not set a GstFlowReturn from a boolean
This was a small overlook, gst_pad_send_event() returns a boolean,
so setting it into ret could confuse the flow combiner. Though,
it didn't bug, since both 0 and 1 are success (though 1 being
undefined).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Nicolas Dufresne
35775f1aec codecalphademux: Remove eos flow return workaround
It turns out that downstream returning OK after EOS is a bug in
multiqueue. As we moved to queue, we no longer have this issue.
Let's keep the code clean and just assuming that downstream will
keep returning EOS and allow convergence of flow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
2021-05-14 14:11:39 -04:00
Nicolas Dufresne
c63b2f2712 alphadecodebin: Use normal queues instead of multiqueue
The multiqueue was too flexible for our need, allowing to queue passed
the configured threshold. It also didn't work well when trying to
propagate EOS flow return.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Nicolas Dufresne
1229257ad4 alphacombine: Implement flow return propagation
The EOS handling was not the problem way. Instead of this, implement
proper prorogation of the flow return for the alpha chain function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Nicolas Dufresne
ea08442699 codecalphademux: Fix handling of flow combine
As the alphacombine is simplified to received matching pair of buffers,
we can't just stop streaming when we receive EOS from downstream. Due
to usage of queue, the moment we get this return value may differ.

Though, by continuing pushing, we override the last_flowret on the pad
which can make us miss that we effectively can combine all flow into
EOS.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2238>
2021-05-13 14:38:47 +00:00
Nicolas Dufresne
e08c0803e1 doc: codecalpha: Add plugin documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
2021-05-11 16:06:56 -04:00
Nicolas Dufresne
ba4053a2b9 alphadecodebin: Add wrappers to decode VP8/VP9 alpha
This includes base class with wrappers bin that will create a static
pipeline capable of handling the VP8/VP9 alpha channel decoding
using two instances of vp8/vp9dec element each.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
2021-05-11 16:06:56 -04:00
Nicolas Dufresne
2cd927435c codecalpha: Implement alphacombine element
This element will merge video buffers in order to use the alpha stream
luma plane as the alpha of the video stream. The implementation is zero-copy
and currently only support merging I420 stream with an I420, NV12 or GRAY8
alpha stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
2021-05-11 16:06:56 -04:00
Nicolas Dufresne
4dbf61d1ef alphacodecdemux: Implement meta demuxing
Produce two streams from a buffer that has GstVideoCodecAlphaMeta
attached.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
2021-05-11 16:06:56 -04:00
Nicolas Dufresne
f3114d4d7e Introduce CODEC Alpha plugin
This plugin contains a set of utility elements allowing to extract,
decode and combine CODEC (typically VP8/VP9) alpha stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2199>
2021-05-11 16:06:56 -04:00