Commit graph

113170 commits

Author SHA1 Message Date
James Cowgill 8b932c105f v4l2codecs: Handle allocator creation failure
If `VIDIOC_REQBUFS` doesn't return enough buffers the allocator creation
function can fail and return `NULL`. Handle this by generating an error
and returning instead of segfaulting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220>
2021-11-02 15:25:48 +00:00
James Cowgill 3846b0563a v4l2codecs: Fix segfault when destroying non-detached allocator
The GstV4l2CodecAllocator dispose function clears `self->decoder` but
the finalize function then tries to use it if the allocator has no been
detached yet.

Fix by detaching in the dispose function before we clear
`self->decoder`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1220>
2021-11-02 15:25:48 +00:00
Guillaume Desmottes 1aab0e49f6 re-add gst-plugins-rs.wrap
It's been lost during the monorepo migration.

Note that building Rust plugins as a subproject is currently broken,
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/171
but I'm going to fix that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1290>
2021-11-02 10:15:42 +01:00
Julian Bouzas bc358e5827 alphacombine: use the same allocation query data for both decoders
This allows downstream elements to set allocation query parameters for both
decoders, which should be always the same.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1277>
2021-11-01 12:55:00 -04:00
Nirbheek Chauhan b8d6fd905e applemedia: Add ARGB64_BE, RGBA64_LE support to vtenc/vtdec
We can add this now that ARGB64_BE videoconvert support was added in:
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan fed69c48b6 vtenc: Add FieldDetail properties for interlaced input
Standard interlace handling:
* If we have interlace-mode=interleaved and the field order, we just
  set it when creating the session
* If we have interlace-mode=(interleaved|mixed) and no field order, we
  set the field order on the first buffer

The encoder session does not support changing the FieldDetail after it
has started encoding frames, so we cannot support mixed streams
correctly.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan 29a32703a5 vtenc: Add a property to forcibly ignore alpha values
This PropertyKey is not documented in any headers anywhere, so we need
to define it ourselves.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan 4e37f99975 vtenc: Set colorimetry information
It looks like VideoToolbox doesn't support all our colorimetries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan 0f0e68080c applemedia: Add ProRes support to vtenc and vtdec
For vtdec, we continue to prefer NV12; else we pick whatever
downstream wants. In the special case where we're decoding 10-bit or
12-bit ProRes formats, we will prefer AYUV64.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan db638134e7 vtenc: Improve error reporting in chain function
Otherwise it is quite difficult to figure out why the chain function
failed. Also assert not reached for case statements that should not be
hit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Nirbheek Chauhan d7f6f8172a vtdec: Remove dead code in switch statement
We never advertise these formats, so these cases will never be hit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1214>
2021-11-01 09:24:52 +00:00
Piotrek Brzeziński 6aa80270dd mediatype-video-raw: add ARGB64_LE/BE and variants
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1286>
2021-10-31 22:28:23 +00:00
Xavier Claessens 1ec04817eb Allow Strawberry Perl on Windows with Meson >= 0.60.0
Meson now explicitly blacklists pkg-config.bat from Strawberry Perl and
thus building GStreamer on Windows has been fixed.

This allows for instance to build GStreamer on GitHub Action Windows
runners that have Strawberry Perl by default.

It is also useful when needing to build OpenSSL on the same Windows
machine because it requires Perl.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1263>
2021-10-31 20:07:39 +00:00
Sebastian Dröge 577cdcafe0 video: Fix order of new video formats
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1282>
2021-10-31 06:38:36 +00:00
Sebastian Dröge ee18b8c0c0 base: Fix some annotations
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1281>
2021-10-30 15:50:30 +03:00
Tim-Philipp Müller ea8dc0c737 Couple more g_memdup() -> g_memdup2() fixes
Fixes deprecation warnings with newer GLib versions.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 10:37:37 +01:00
Tim-Philipp Müller 1f560af76b dtls: don't use deprecated g_binding_get_source() with newer GLib versions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 00:52:42 +01:00
Tim-Philipp Müller d96e44922e Use g_pattern_spec_match() instead of g_pattern_match() which is deprecated since glib 2.70
Fixes compiler warnings with glib 2.70

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1279>
2021-10-30 00:34:35 +01:00
Seungha Yang 17bf17b38d codecs: h265decoder: Fix per-slice leak
As documented, slice header parsed via gst_h265_parser_parse_slice_hdr()
should be cleared, otherwise it would result in memory leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1274>
2021-10-29 17:25:06 +00:00
Víctor Manuel Jáquez Leal 4a4823b972 va: Delay decoders downstream negotiation.
Delay decoders downstream negotiation just before an output frame
needs to be allocated.

This is required, are least for H.264 and H.265 decoders, since
codec_data might trigger a new sequence before finishing upstream
negotiation, and sink pad caps need to set before setting source pad
caps, particularly to forward HDR fields. The other decoders are
changed too in order to keep the same structure among them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal 5494ec38d0 vabasedec: Move warning message to decoder's category.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal 97e3f88c20 va: Move common variable need_negotiation to GstBaseDec.
This is a common variable to all decoders, so it's sound to move it to
the base helper.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Víctor Manuel Jáquez Leal a2a3c81c85 va: Move back parent_object to each element.
Using GstBaseDec hack to access the parent_object of each element in
the element itself is a bit fragile. It would be better to keep its
own parent object as the usual global variable. It would make it
resistant to code changes.

The GstBaseDec macro to access the parent object now it's internal to
base decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1257>
2021-10-29 16:06:52 +00:00
Piotrek Brzeziński 428b4104b0 video-format: Add support for ARGB64 LE/BE and similar variants
Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1247>
2021-10-29 14:57:58 +00:00
Vivia Nikolaidou 6c21dd4de1 identity: Fix crash when receiving a gap event outside the current segment
We were checking if the start time of the gap event was
GST_CLOCK_TIME_NONE, which is superfluous because that cannot happen,
and then not checking if it was NONE after gst_segment_to_running_time,
which caused a crash if an identity received a gap event fully or
partially outside the current segment.

This patch was done in cooperation with:
Jan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1269>
2021-10-29 14:08:49 +03:00
Mathieu Duponchelle c414f9560a rtptwcc: don't assume all PacketInfo->data are buffers
They can also be buffer lists

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1268>
2021-10-29 03:46:25 +02:00
Heiko Becker b83e85ab67 neon: Allow building against neon 0.32.x
No API/ABI changes: https://github.com/notroj/neon/blob/0.32.0/NEWS#L3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1267>
2021-10-29 00:14:53 +00:00
Tim-Philipp Müller f034ec3e14 meson: require matching GStreamer dep versions for unstable development releases
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1244>
2021-10-28 23:29:27 +00:00
Tim-Philipp Müller d2dac4185b subprojects: fdk-aac: add fallback_url
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1244>
2021-10-28 23:29:27 +00:00
Mathieu Duponchelle 303c8025c6 webrtcbin: fix check_negotiation computing on caps event
It seems logical that check_negotiation be true if received_caps
is *not* equal to the new caps.

Also clean up handling of transceivers' ssrc events, as this
patch triggered a leaky code path.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1233>
2021-10-28 19:05:59 +00:00
Mathieu Duponchelle be0b5c54fd webrtcbin: connect input stream when receiving caps
.. if a current direction has already been set

When `webrtcbin` has created an offer based on codec_preferences,
it might not have received caps on its sinkpads by the time a
remote description is set, in which case we want to connect the
input stream upon actual reception of the caps instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1233>
2021-10-28 19:05:59 +00:00
Mathieu Duponchelle a9506f20d3 webrtcbin: consider pads with trans->codec_preferences ready
.. when determining whether we can emit on-negotiation-needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1233>
2021-10-28 19:05:59 +00:00
Tim-Philipp Müller 9d5b23ff58 mpeg4videoparse: fix criticals trying to insert configs that don't exist yet
With mpeg4videoparse drop=false config-interval=N|-1 we might be
trying to insert a config before we have actually received one,
in which case we'll try to map a NULL buffer which will generate
lots of criticals.

Fixes #855

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1265>
2021-10-28 17:49:03 +01:00
Jan Schmidt f6ed40c93a qtdemux: Fix text and closed-caption handling.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1182
broke text and and closed caption extraction when introducing WebVTT
support, by making the output buffers not have timestamps any more.

Fix that by making the process functions copy buffer metadata
when generating new output buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1262>
2021-10-28 21:45:33 +11:00
Mengkejiergeli Ba 5b1662d37e msdk: Insert hdr sei at hevc encoder
There are two HDR SEIs defined in spec: mastering display colour volume and
content light level. Add insertion of HDR SEIs when they are available
during encoding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1242>
2021-10-28 08:36:05 +00:00
Rob Agar 641b319fd6 webrtcbin: Also check data channel transport when collating connection state
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/838

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1224>
2021-10-28 05:05:44 +00:00
Víctor Manuel Jáquez Leal cf3d271cde vapostproc: Color fixation will choose othercaps' structure.
gst_va_fixate_format() will iterate all othercaps' structures to find
the one with less information lost at color conversion. If a structure
with same color format is found, the iteration stops. It's like a
smart truncation. Then, this function also will choose the caps
feature.

Later this structure is used fixate its size and no further truncation
is needed.

Don't intersect at fixate, since it kills possible resizing.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261>
2021-10-27 18:01:50 +00:00
Víctor Manuel Jáquez Leal bc6a7a63f0 vapostproc: Ignore direction at orientation swapping.
It doesn't matter the direction of the negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261>
2021-10-27 18:01:50 +00:00
Víctor Manuel Jáquez Leal cbca0bb06e vapostproc: Consider video orientation for border calculation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261>
2021-10-27 18:01:50 +00:00
Jan Schmidt 78df7ae771 decodebin3: Only unblock for GAP events and buffers.
An alternate fix for
https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1239
and https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1236
that makes it clear the intent is to only unblock on a GAP event, and
not any others.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1260>
2021-10-27 22:53:49 +11:00
Chris Wiggins 1e6d26ac2b python: Update audiotestsrc to return correct tuple on FlowReturn Errors
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1259>
2021-10-27 17:20:39 +13:00
Timo Wischer 20b87e39e9 avtpsrc: Retry receive with same buffer size
Without this patch in case of a retry recv() will be called with a
negative size argument.

Signed-off-by: Timo Wischer <timo.wischer@de.bosch.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1078>
2021-10-26 22:46:46 +00:00
Guillaume Desmottes 1d833eba60 parsebin: fix critical when sorting pads
If the pad does not have a current caps, get_pad() returns the query
caps which can be ANY. In such case the caps does not have any structure
resulting in a critical warning when calling gst_caps_get_structure().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1254>
2021-10-26 16:25:32 +00:00
Mathieu Duponchelle e6f39394f5 cccombiner: fix default value when installing schedule property
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1252>
2021-10-26 14:48:13 +00:00
Mathieu Duponchelle e730bdaa8e cccombiner: fix emission of selected-samples in one case
Detected while reading the code, cccombiner must set
self->current_video_buffer to NULL *after* emitting selected-samples
in order for the application to get a useful return when peeking
the next video sample.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1252>
2021-10-26 14:48:13 +00:00
Mathieu Duponchelle fa1805d531 cccombiner: stop attaching caption buffers when caption pad has gone EOS
When schedule is true (as is the case by default), we insert padding
when no caption data is present in the schedule queue, and previously
weren't checking whether the caption pad had gone EOS, leading to
infinite scheduling of padding after EOS on the caption pad.

Rectify that by adding a "drain" parameter to dequeue_caption()

In addition, update the captions_and_eos test to push valid cc_data
in: without this cccombiner was attaching padding buffers it had
generated itself, and with that patch would now stop attaching
said padding to the second buffer. By pushing valid, non-padding
cc_data we ensure a caption buffer is indeed attached to the first
and second video buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1252>
2021-10-26 14:48:13 +00:00
Matthew Waters fdb16cddb1 ci/fuzzing: update for mono repo
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1253>
2021-10-26 14:09:24 +00:00
Mats Lindestam 9b3f040d3c curlsftpsink: Add support for sha256 fingerprint
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1193>
2021-10-26 12:18:40 +00:00
Mengkejiergeli Ba 3ca6734860 msdkvpp: Add 12bit formats
Add 12bit formats for different chroma samplings at sink pad and
src pad, including P012_LE, Y212_LE and Y412_LE.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1218>
2021-10-26 07:08:10 +00:00
Ruben Gonzalez 0fee1e5d46 devicemonitor: g_queue_clear_full introduced in glib 2.60
The GStreamer dependency is glib >=2.56.0. Therefore, define
g_queue_clear_full if glib < 2.60.

Issue added in commit 1912bcbc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1251>
2021-10-25 21:55:25 +02:00