Commit graph

113293 commits

Author SHA1 Message Date
Jordan Petridis
b0370cdf00 ci: replace license notice
This file was copied from microsoft documentation [1]
and its header was refering to the license on that repo.

This change was lost during gstreamer/gstreamer!1000

[1] 9ec230dfd4/LICENSE-CODE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1487>
2022-01-03 12:43:15 +02:00
Rafał Dzięgiel
8889b6351d assrender: Support RFC8081 mime types
Old "application/*" are now as per RFC8081 deprecated in favor of
new "font/*" mime types. Some new encoders are already using the
updated mime types. We need to also add them to the support list
in order for assrender to correctly identify them as fonts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1481>
2022-01-03 06:42:23 +00:00
Rafał Dzięgiel
a2719d79ff assrender: Handle ".ttc" attachment extension
TTC stands for "TrueType Collection" file. We can pass it
into libass as any other attachment. Add it to the supported
extensions list, so the fonts it contains will be used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1481>
2022-01-03 06:42:23 +00:00
Philippe Normand
f0e6959bba webrtcdatachannel: Notify buffered-amount property updates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1484>
2022-01-02 10:18:35 +00:00
Heinrich Kruger
6dd15acf2d rtp-hdrext-colorspace: Fix color range encoding
The color space RTP header extension encodes color range as specified in
https://www.webmproject.org/docs/container/#Range. In other words:
0: Unspecified,
1: Broadcast Range,
2: Full range,
3: Defined by matrix coefficients and transfer characteristic.

This does not match the values of GstVideoColorRange, so it is not
correct to just write the colorimetry.range value to the header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1482>
2021-12-30 16:31:33 +00:00
Seungha Yang
5fefc689a0 d3d11decoder: Negotiate again on the first output buffer
... unconditionally. There may be updated field in sinkpad caps
after the new_sequence() call (HDR related ones for example),
then we should signal the information to downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1474>
2021-12-30 11:09:45 +00:00
Philippe Normand
43856a0735 webrtcstats: Fix null pointer dereference
If there is no jitterbuffer stats we should not attempt to store them in the
global stats structure.

Also add a g_return_if_fail in _gst_structure_take_structure() about this
because it is a programmer error to pass an invalid pointer address there.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1479>
2021-12-29 15:55:57 +00:00
He Junyan
13f0128f7e codecparsers: av1parse: Add the DECODE_ONLY flag to output buffer.
When the alignment is ALIGN_FRAME and the output buf contains a frame
which is not to be shown, the GST_BUFFER_FLAG_DECODE_ONLY flag should
be set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1050>
2021-12-25 12:18:24 +00:00
Jeongki Kim
04f6fbc237 rtpg726depay: fix endian conversion
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1469>
2021-12-24 14:52:38 +09:00
Olivier Crête
818a185b5d webrtcstats: Fall back to last packet ssrc if caps dont provide it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>
2021-12-23 23:48:17 -05:00
Olivier Crête
4e32d6bf3e webrtcstats: Use our own caps instead of the sticky event
The sticky event seems to get cleared sometimes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>
2021-12-23 23:48:17 -05:00
Olivier Crête
29befed685 webrtcbin: Store the ssrc of the last received packet
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>
2021-12-23 23:48:17 -05:00
Olivier Crête
fc7e7f5ccc webrtc stats: Remove duplicate structure get
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>
2021-12-23 23:48:17 -05:00
Olivier Crête
f35435f1f7 webrtc stats: Add more details about codecs into the stats
This makes the output a little closer to what the upstream stats are.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>
2021-12-23 23:48:17 -05:00
Corentin Damman
31f4444724 rtpjitterbuffer: fix typo in tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1466>
2021-12-23 14:31:27 +00:00
Brad Hards
d4379c8df7 doc: typo fix for streaming
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1463>
2021-12-23 07:50:22 +00:00
Tim-Philipp Müller
2452f0bbcf docs: interlaced video: small additions for alternate interlacing
Clarify that width/height in caps is still the frame height/width,
not field height width, just like framerate is frame rate not
field rate.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1465>
2021-12-23 01:52:04 +00:00
He Junyan
85d2118a53 va: av1dec: Use named profiles to replace the numeric ones.
Use named AV1 profiles (i.e., main, high, and professional) to replace
the old 0, 1, 2 profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
2021-12-21 22:20:34 +09:00
Seungha Yang
796007f75d av1enc: Update for newly designed AV1 profile signalling
Accept named AV1 profiles (i.e., main, high, and professional)
as well

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
2021-12-21 22:20:34 +09:00
Seungha Yang
91484ce2ac d3d11av1dec: Update sinkpad template for profile
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
2021-12-21 22:20:34 +09:00
Seungha Yang
40213b5c75 av1parse: Use descriptive profile name instead of numeric
As per AV1 specification Annex A, AV1 profiles have explicit and
descriptive names for each seq_profile.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
2021-12-21 22:20:30 +09:00
Seungha Yang
ac978099c6 av1parse: Remove trailing white space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>
2021-12-21 01:00:12 +09:00
Fabrice Fontaine
e637aae629 rtsp-server: add gst_dep to gst_rtsp_server_deps
Add gst_dep to gst_rtsp_server_deps, in the context of buildroot, this
will avoid the following build failure, because the correct girdir
location will be retrieved from gstreamer-1.0.pc:

/home/giuliobenetti/autobuild/run/instance-3/output-1/host/riscv32-buildroot-linux-gnu/sysroot/usr/bin/g-ir-compiler gst/rtsp-server/GstRtspServer-1.0.gir --output gst/rtsp-server/GstRtspServer-1.0.typelib --includedir=/usr/share/gir-1.0
Could not find GIR file 'Gst-1.0.gir'; check XDG_DATA_DIRS or use --includedir
error parsing file gst/rtsp-server/GstRtspServer-1.0.gir: Failed to parse included gir Gst-1.0
If the above error message is about missing .so libraries, then setting up GIR_EXTRA_LIBS_PATH in the .mk file should help.
Typically like this: PKG_MAKE_ENV += GIR_EXTRA_LIBS_PATH="$(@D)/.libs"

Fixes:
 - http://autobuild.buildroot.org/results/04af6b22cfa0cffb6a3109a3b32b27137ad2e0b0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1460>
2021-12-20 13:08:33 +00:00
Florian Zwoch
3e680d8d5d aatv: Fixes for rain-mode
Some rain-mode properties tried to read float from int value.
Initialize rain after setting rain-mode. Rain was non-functional if
width/height were left at default values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1459>
2021-12-20 09:28:50 +00:00
Mark Nauwelaerts
41fe17adda uridecodebin: use non-floating object as signal argument
... as was the case with source-setup signal until change of order
in commit 52bca104e4

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1457>
2021-12-19 18:27:50 +01:00
Seungha Yang
1564567c3e d3d11av1dec: Fix for Cdef param
av1parser will increase the sec_strength values by 1 if parsed
values were equal to 3 as defined in spec. But DXVA wants unmodified
ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1455>
2021-12-17 23:28:29 +09:00
Seungha Yang
146815bbb6 d3d11av1dec: Sync DXVA AV1 data structure with released header
Update AV1 data structure based on Windows 11 SDK header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1455>
2021-12-17 23:27:24 +09:00
Mathieu Duponchelle
79f11eb778 rtsp-stream: fix get_rates raciness
Prior to this patch, we considered that a stream was blocking
whenever a pad probe was triggered for either the RTP pad or
the RTCP pad.

This led to situations where we subsequently unblocked and expected
to find a segment on the RTP pad, which was racy.

Instead, we now only consider that the stream is blocking when
the pad probe for the RTP pad has triggered with a blockable object
(buffer, buffer list, gap event).

The RTCP pad is simply blocked without affecting the state of the
stream otherwise.

Fixes #929

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1452>
2021-12-16 22:18:12 +00:00
Víctor Manuel Jáquez Leal
69c4e317d8 tests: h265parser: Add test for multiple compatibility profiles.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Víctor Manuel Jáquez Leal
b80cd503b6 h265parser: Compare upstream profile with in SPS.
Compare if upstream profile in caps is the same as the one parsed in
the SPS. If they are different use the bigger for simplicity and
more chances to decode it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Víctor Manuel Jáquez Leal
3040a26073 codecparsers: h265parser: Use a table map to get profile.
Instead of a sequence of if statements, declare a table to map profile
idc with profiles and traverse it.

Also, first add the profile from the parsed profile idc and later add,
into the profile array, the profile from the compatibility flags.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Víctor Manuel Jáquez Leal
168ad9f58f codecparsers: h265parser: Verify all possible profiles.
It's possible a HEVC stream to have multiple profiles given the
compatibility bits. Instead of returning a single profile, internal
gst_h265_profile_tier_level_get_profiles() returns an array with all
it possible profiles.

Profiles are appended into the array only if the generated profile
is not invalid.

gst_h265_profile_tier_level_get_profile() is rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), returning the first
profile found the array.

And  gst_h265_get_profile_from_sps() is also rewritten in terms of
gst_h265_profile_tier_level_get_profiles(), but traversing the array
verifying if the proposed profile is actually valid by Annex A.3.x of
the specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>
2021-12-16 17:08:30 +01:00
Seungha Yang
11791f7ce5 video-info: Don't assume colorimetry of UHD resolution as BT.2020
BT.2020 color primaries are designed to cover much wider range of
CIE chromaticity than BT.709, and also it's used for both SDR and HDR
contents. So, the incorrect assumption (i.e., BT.709 as a BT.2020)
is risky and resulting image color tends to be visually very wrong.
Unless there's obvious clue, don't consider color space of high resolution
video stream as BT.2020

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1445>
2021-12-16 12:22:27 +00:00
Mathieu Duponchelle
abd61732bf webrtcbin: bind transceiver's fec-percentage to encoder percentage
Allows for dynamic control of the applied FEC overhead

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1429>
2021-12-14 17:34:53 +00:00
Mathieu Duponchelle
06893b8b5e webrtcbin: fix ulpfec / red for the BUNDLE case
* Add fec / red encoders as direct children of webrtcbin, instead
  of providing them to rtpbin through the request-fec-encoder signal.

  That is because they need to be placed before the rtpfunnel, which
  is placed upstream of rtpbin.

* Update configuration of red decoders to set a list of RED payloads
  on them, instead of setting the pt property.

  That is because there may be one RED pt per media in the same session.

* Connect to request-fec-decoder-full instead of request-fec-decoder,
  in order to instantiate FEC decoders according to the payload type
  of the stream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1429>
2021-12-14 17:34:53 +00:00
Mathieu Duponchelle
d12d45db77 reddec: implement support for the BUNDLE case
When multiple streams are bundled together, there may be more
than one red payload type to handle.

In addition, as the red decoder works by filling in gaps in
the seqnums, there needs to be one rtp_history queue per sequence
domain.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1429>
2021-12-14 17:34:53 +00:00
Mathieu Duponchelle
a09b8ded30 rtpbin: add new request-fec-decoder-full signal for BUNDLE
When multiple streams are bundled together, the application needs
to know about the payload type in order to instantiate the appropriate
FEC decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1429>
2021-12-14 17:34:53 +00:00
Thibault Saunier
6dec642d35 subprojects: Lower minimal pygobject version
It works just fine with PyGObject3.8, this min requirement was added in
547570cd79 without any justification for
such a high requirement while 3.8 is the min requirement for
`gst-python`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1419>
2021-12-14 15:44:58 +00:00
Mathieu Duponchelle
5dc280de9f rtp/redenc|ulpfecenc: add support for TWCC
In redenc, when input buffers have a header for the TWCC extension,
we now add one to our wrapper buffers.

In ulpfecenc we add one in that case to our protection buffers.

This makes TWCC functional when UlpRed is used in webrtcbin.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1414>
2021-12-14 03:26:56 +00:00
Thibault Saunier
49055f1cd5 rtph264pay: Handle 'profile' field
In order to allow "level-asymmetry-allowed" we now handle a new
"profile" field, which as the same semantics as the "profile" field in
H.264 stream so that we can force payloaded stream to have the right
format when using the `gst_sdp_media_get_caps_from_media` to set caps
filter after the payloader. This allows a simple negotiation in standard
RTP negotiation based on SDPs (like webrtc) for that particular case,
closely respecting the specs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1410>
2021-12-12 10:59:00 -03:00
Thibault Saunier
9ac502c21d sdp: Handle level-asymmetry-allowed for H264 streams
The ["level-asymmetry-allowed"] field states that the peer wants the
profile specified in the "profile-level-id" fields but doesn't care
about the level. To express this in GStreamer caps term, we add a
"profile" field in the caps, which reuses the usual "profile" semantics
for H.264 streams and, and remove "profile-level-id" and
"level-asymmetry-allowed" fields.

["level-asymmetry-allowed"]: https://www.iana.org/assignments/media-types/video/H264

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1410>
2021-12-12 10:59:00 -03:00
Seungha Yang
f10867dfb5 d3d11videosink: Use only tested color space for swapchain
We are querying supported swapchain colorspace via
CheckColorSpaceSupport() but it doesn't seem to be reliable.
Use only tested full-range RGB formats which are:
- sRGB
- BT709 primaries with linear RGB
- BT2020 primaries with PQ gamma

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1433>
2021-12-12 11:00:24 +00:00
Thibault Saunier
d82efb47aa pitch: Specify layout as required for negotiation
There are cases where it might negotiate 'non-interleaved' while it
is wrong.

```
gst-launch-1.0 audiotestsrc !  "audio/x-raw, format=(string)F32LE, layout=(string)non-interleaved" ! audioconvert ! audioresample ! pitch tempo=1.2 ! audioconvert ! "audio/x-raw,format=S16LE" ! fakesink

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
(gst-launch-1.0:3029628): GStreamer-Audio-CRITICAL **: 11:42:22.477: gst_audio_buffer_map: assertion '(!meta && info->layout == GST_AUDIO_LAYOUT_INTERLEAVED) || (meta && info->layout == meta->info.layout)' failed
ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert1: The stream is in the wrong format.
Additional debug info:
../subprojects/gst-plugins-base/gst/audioconvert/gstaudioconvert.c(876): gst_audio_convert_transform (): /GstPipeline:pipeline0/GstAudioConvert:audioconvert1:
failed to map input buffer
ERROR: pipeline doesn't want to preroll.
ERROR: from element /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0: Internal data stream error.
Setting pipeline to NULL ...
Additional debug info:
../subprojects/gstreamer/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstAudioTestSrc:audiotestsrc0:
streaming stopped, reason error (-5)
ERROR: pipeline doesn't want to preroll.
Freeing pipeline ...
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1441>
2021-12-11 19:09:09 -03:00
Nicolas Dufresne
f9668b0697 doc: Update vp9alphadecodebin doc cache
A new field was added to the template cpas.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
2886eab3c4 alphacombine: Fix for early allocation queries
When using playbin3, it seems that the alpha decode is always first to
push caps and run an allocation query. As the format change from sink
and alpha were not synchronized, the allocation query could endup
being run before the caps are pushed. That may lead to failing query,
which makes the decoder thinks there is no GstVideoMeta downstream and
most likely CPU copy the frame.

This patch implements a format cookie to track and synchronize the
format changes on both pads fixing the racy performance issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
e0f8ce501b v4l2codecs: vp9: Add alpha decodebin wrapper
This will allow HW accelerated decoding of WebM alpha videos.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
31d49da237 v4l2codecs: plugin: Minor style fix
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
3f02515380 v4l2codecs: decoder: Improve logging of timed out request
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
c4216a693c v4l2codecs: mpeg2: Check that the decoder output formats
This is to avoid exposing a decoder for which we don't support any
output format. This happens on platform using vendor formats or
not yet supported tiles formats.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00
Nicolas Dufresne
91b7a9497b vp9alphadecodebin: Fix auto-pluging v4l2slvp9dec
This adds the alignment field to the template caps. Without this field
set, the auto-plugger will see fixed caps and will use
gst_caps_is_subset() against the caps produced by the parser. This is a
challenge for all cases where a parser can do conversion. This is fixed
by adding alignment field, which makes the auto-pluggers do an
intersection of the caps as it gets unfixed caps after intersection now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>
2021-12-10 21:37:14 +00:00