Now that VideoPool accept DMA DRM, it is quite likely that the size does not get
provided in the configuration even if the format have a matching GstVideoFormat.
Fix this by reporting back the minimum expected size in the configuration. This
allows the configuration handshake to succeed.
Fixes regression caused by !9345
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9600>
Caps may change the framerate used and the frame counting approach for
timestamps, needs to account for this by taking a snapshot of the current frames
and running time to add to all subsequent produced frames. Code is mostly taken
from videotestsrc.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9455>
When using direct DMABuf upload, supported DRM formats and modifiers
pairs should be translated to RGBA. Instead of overwriting the translation
to RGBA, which may endup having nothing to override, we introduce a new
flag for the transform helper, so it can do direct translation.
This fixes a regression introduced by !9306, and fixes more negotiations
issues.
Fixes#4525
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9339>
Some WebRTC implementations such as Pion are unhappy if the
profile-level-id isn't returned with a compatible profile as the
RFC requires. Let's try to reform it
In practice, the correct way to do this would be to not use caps
intersection, but to instead implement the correct RFC compliant
SDP O/A negotiation of formats.
Include a unit test written by Philippe Normand
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9031>
When doing direct dmabuf upload, we rely on the GL stack for doing the color
transformation. The caps we transform from GL to DMABuf are always with a format
of RGBA. Instead of listing all GstVideoFormat and translating them back into
DRM formats, simply list all supported DRM format for the context.
This enable rendering DRM formats that don't have an shader based emulation
implemented such as NV15.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9306>
The transformation was fuzzy, adding random modifiers to the list. Use the newly
introduce helpers from 1.26 to precisely convert GStreamer formats to a DRM
fourcc and modifier pair and vice-versa.
This fixes support for formats that have a GstVideoFormat value and requires a
modifier.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9306>
A user-supplied window handle (external_view) becomes the superView
of internal_view, which is closed with [view removeFromSuperview].
This fails silently if external_view = NULL (no handle supplied).
Call [win_internal_id close] in this case. Fixes#4432.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9049>
Align the calculations for the number of samples per block with the
calculations in adpcmdec.
For MS ADPCM we have in adpcmdec:
samples = (blocksize - 7 * dec->channels) * 2 + 2 * dec->channels;
outsize = 2 * samples;
outbuf = gst_buffer_new_and_alloc (outsize);
This gives us the total output byte size in 16 bits samples. To get back
to the samples, dividing by the channels and 2, we get the right samples per
block as:
int spb = ((strf->blockalign / strf->channels) - 7) * 2 + 2;
Which we can then use to calculate the bitrate in riff-media.
A similar calculation for DVI ADPCM is needed to get the right bitrate
in all cases.
Tested with the sample in https://bugzilla.gnome.org/show_bug.cgi?id=636245
and another (failing before this patch) sample.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/9082>
So far we simply ignored it for MEMORY_DMABUF passthrough caps
without known negative cosequences, but with upcoming more complicated
caps negotiations it's becoming an issue, thus fix it.
Fixes: 7e71d4f753 ("gl: upload: Add DMA_DRM passthrough upload")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8964>
By design, unixfd is meant to be used for zero-copy and failing when the data is
not FD based memory is wanted to help debug pipelines. Though, there exists
cases, notably with RTP payloader and demuxers, where its not possible
to get all the data into FD memory through allocation queries.
To allow using unixfd for these cases, introduce a property on the unixfdsink
that enable copying the non FD data into freshly allocated memfd.
Co-authored-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8861>
Similar to NV12_10LE40, this is a 422 variant. This format is also named
NV20 (20bit per pixels) in other stack and is produced by rkvdec
decoder.
Co-authored-by: Sebastian Fricke <sebastian.fricke@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5612>
The only thing that can be used in the chain function is the input segment. The
output segment might not be available at all yet or out of sync with the current
input segment.
Also because of that, the unadjusted timestamp has to be used for the
calculations as the adjustment is only part of the output segment.
This fixes the deadline calculation and the handling of force-keyunit events for
encoders using frame reordering (i.e. setting a minimum PTS).
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8842>