platform/upstream/gstreamer.git
2 years agoav1parse: Copy the PTS and DURATION when we create data.
He Junyan [Wed, 22 Dec 2021 04:36:15 +0000 (12:36 +0800)]
av1parse: Copy the PTS and DURATION when we create data.

We need to create header buffers for annex b format. This kind of
buffers should inherit the PTS and DURATION from the original buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1468>

2 years agovtenc: Signal ignored alpha component with ProRes
Nirbheek Chauhan [Mon, 3 Jan 2022 15:32:47 +0000 (21:02 +0530)]
vtenc: Signal ignored alpha component with ProRes

When the image is opaque but the output ProRes format has an alpha
component (4 component, 32 bits per pixel), Apple requires that we
signal that it should be ignored by setting the depth to 24 bits per
pixel. Not doing so causes the encoded files to fail validation.

So we set that in the caps and qtmux sets the depth value in the
container, which will be read by demuxers so that decoders can skip
those bytes entirely. qtdemux does this, but vtdec does not use this
information at present.

The sister change was made in qtmux and qtdemux in:
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1489>

2 years agocodecparsers: h265parser: Correct the read of slice_sao_chroma_flag.
He Junyan [Mon, 3 Jan 2022 14:15:12 +0000 (22:15 +0800)]
codecparsers: h265parser: Correct the read of slice_sao_chroma_flag.

According to the SPEC, for parsing the slice header, we should read the
slice_sao_chroma_flag only when ChromaArrayType is not equal to 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1488>

2 years agomeson: Allow using GStreamer plugins from custom_subprojects
Thibault Saunier [Sun, 12 Dec 2021 13:20:55 +0000 (13:20 +0000)]
meson: Allow using GStreamer plugins from custom_subprojects

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1490>

2 years agoci: replace license notice
Jordan Petridis [Mon, 3 Jan 2022 10:43:15 +0000 (12:43 +0200)]
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] https://github.com/MicrosoftDocs/visualstudio-docs/blob/9ec230dfd4908a92738d8dac5f44ad3e4ac751e3/LICENSE-CODE

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1487>

2 years agoassrender: Support RFC8081 mime types
Rafał Dzięgiel [Wed, 29 Dec 2021 20:29:02 +0000 (21:29 +0100)]
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>

2 years agoassrender: Handle ".ttc" attachment extension
Rafał Dzięgiel [Wed, 29 Dec 2021 20:28:56 +0000 (21:28 +0100)]
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>

2 years agowebrtcdatachannel: Notify buffered-amount property updates
Philippe Normand [Sun, 2 Jan 2022 09:38:43 +0000 (09:38 +0000)]
webrtcdatachannel: Notify buffered-amount property updates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1484>

2 years agortp-hdrext-colorspace: Fix color range encoding
Heinrich Kruger [Thu, 30 Dec 2021 16:31:33 +0000 (16:31 +0000)]
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>

2 years agod3d11decoder: Negotiate again on the first output buffer
Seungha Yang [Sun, 26 Dec 2021 18:15:10 +0000 (03:15 +0900)]
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>

2 years agowebrtcstats: Fix null pointer dereference
Philippe Normand [Wed, 29 Dec 2021 15:02:03 +0000 (15:02 +0000)]
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>

3 years agocodecparsers: av1parse: Add the DECODE_ONLY flag to output buffer.
He Junyan [Thu, 12 Aug 2021 11:14:16 +0000 (19:14 +0800)]
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>

3 years agortpg726depay: fix endian conversion
Jeongki Kim [Fri, 24 Dec 2021 05:52:38 +0000 (14:52 +0900)]
rtpg726depay: fix endian conversion

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1469>

3 years agowebrtcstats: Fall back to last packet ssrc if caps dont provide it
Olivier Crête [Tue, 14 Dec 2021 17:38:25 +0000 (12:38 -0500)]
webrtcstats: Fall back to last packet ssrc if caps dont provide it

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>

3 years agowebrtcstats: Use our own caps instead of the sticky event
Olivier Crête [Tue, 14 Dec 2021 16:28:42 +0000 (11:28 -0500)]
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>

3 years agowebrtcbin: Store the ssrc of the last received packet
Olivier Crête [Tue, 14 Dec 2021 16:28:13 +0000 (11:28 -0500)]
webrtcbin: Store the ssrc of the last received packet

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>

3 years agowebrtc stats: Remove duplicate structure get
Olivier Crête [Mon, 13 Dec 2021 21:57:06 +0000 (16:57 -0500)]
webrtc stats: Remove duplicate structure get

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1448>

3 years agowebrtc stats: Add more details about codecs into the stats
Olivier Crête [Mon, 13 Dec 2021 21:56:37 +0000 (16:56 -0500)]
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>

3 years agortpjitterbuffer: fix typo in tests
Corentin Damman [Thu, 23 Dec 2021 14:29:55 +0000 (14:29 +0000)]
rtpjitterbuffer: fix typo in tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1466>

3 years agodoc: typo fix for streaming
Brad Hards [Wed, 22 Dec 2021 23:06:58 +0000 (10:06 +1100)]
doc: typo fix for streaming

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1463>

3 years agodocs: interlaced video: small additions for alternate interlacing
Tim-Philipp Müller [Thu, 23 Dec 2021 01:52:04 +0000 (01:52 +0000)]
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>

3 years agova: av1dec: Use named profiles to replace the numeric ones.
He Junyan [Tue, 21 Dec 2021 04:55:59 +0000 (12:55 +0800)]
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>

3 years agoav1enc: Update for newly designed AV1 profile signalling
Seungha Yang [Mon, 20 Dec 2021 16:08:40 +0000 (01:08 +0900)]
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>

3 years agod3d11av1dec: Update sinkpad template for profile
Seungha Yang [Sun, 19 Dec 2021 12:48:51 +0000 (21:48 +0900)]
d3d11av1dec: Update sinkpad template for profile

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>

3 years agoav1parse: Use descriptive profile name instead of numeric
Seungha Yang [Sun, 19 Dec 2021 12:44:19 +0000 (21:44 +0900)]
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>

3 years agoav1parse: Remove trailing white space
Seungha Yang [Sun, 19 Dec 2021 12:47:18 +0000 (21:47 +0900)]
av1parse: Remove trailing white space

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1456>

3 years agortsp-server: add gst_dep to gst_rtsp_server_deps
Fabrice Fontaine [Mon, 20 Dec 2021 12:03:34 +0000 (13:03 +0100)]
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>

3 years agoaatv: Fixes for rain-mode
Florian Zwoch [Mon, 20 Dec 2021 09:28:50 +0000 (09:28 +0000)]
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>

3 years agouridecodebin: use non-floating object as signal argument
Mark Nauwelaerts [Thu, 16 Dec 2021 15:43:37 +0000 (16:43 +0100)]
uridecodebin: use non-floating object as signal argument

... as was the case with source-setup signal until change of order
in commit 52bca104e447309898ca8904b3914211ec7d4114

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1457>

3 years agod3d11av1dec: Fix for Cdef param
Seungha Yang [Fri, 17 Dec 2021 13:24:57 +0000 (22:24 +0900)]
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>

3 years agod3d11av1dec: Sync DXVA AV1 data structure with released header
Seungha Yang [Fri, 17 Dec 2021 10:49:42 +0000 (19:49 +0900)]
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>

3 years agortsp-stream: fix get_rates raciness
Mathieu Duponchelle [Thu, 16 Dec 2021 20:04:53 +0000 (21:04 +0100)]
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>

3 years agotests: h265parser: Add test for multiple compatibility profiles.
Víctor Manuel Jáquez Leal [Wed, 15 Dec 2021 11:27:24 +0000 (12:27 +0100)]
tests: h265parser: Add test for multiple compatibility profiles.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1440>

3 years agoh265parser: Compare upstream profile with in SPS.
Víctor Manuel Jáquez Leal [Tue, 14 Dec 2021 18:56:48 +0000 (19:56 +0100)]
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>

3 years agocodecparsers: h265parser: Use a table map to get profile.
Víctor Manuel Jáquez Leal [Wed, 15 Dec 2021 10:58:07 +0000 (11:58 +0100)]
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>

3 years agocodecparsers: h265parser: Verify all possible profiles.
Víctor Manuel Jáquez Leal [Tue, 14 Dec 2021 18:36:56 +0000 (19:36 +0100)]
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>

3 years agovideo-info: Don't assume colorimetry of UHD resolution as BT.2020
Seungha Yang [Mon, 13 Dec 2021 07:19:44 +0000 (16:19 +0900)]
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>

3 years agowebrtcbin: bind transceiver's fec-percentage to encoder percentage
Mathieu Duponchelle [Thu, 9 Dec 2021 02:00:56 +0000 (03:00 +0100)]
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>

3 years agowebrtcbin: fix ulpfec / red for the BUNDLE case
Mathieu Duponchelle [Tue, 7 Dec 2021 22:55:22 +0000 (23:55 +0100)]
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>

3 years agoreddec: implement support for the BUNDLE case
Mathieu Duponchelle [Tue, 7 Dec 2021 22:48:39 +0000 (23:48 +0100)]
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>

3 years agortpbin: add new request-fec-decoder-full signal for BUNDLE
Mathieu Duponchelle [Tue, 7 Dec 2021 22:43:21 +0000 (23:43 +0100)]
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>

3 years agosubprojects: Lower minimal pygobject version
Thibault Saunier [Mon, 18 Oct 2021 20:19:13 +0000 (17:19 -0300)]
subprojects: Lower minimal pygobject version

It works just fine with PyGObject3.8, this min requirement was added in
547570cd790f2b2e390edc1dfb5df4c7a33de45c 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>

3 years agortp/redenc|ulpfecenc: add support for TWCC
Mathieu Duponchelle [Fri, 3 Dec 2021 01:52:06 +0000 (02:52 +0100)]
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>

3 years agortph264pay: Handle 'profile' field
Thibault Saunier [Thu, 2 Dec 2021 13:32:33 +0000 (13:32 +0000)]
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>

3 years agosdp: Handle level-asymmetry-allowed for H264 streams
Thibault Saunier [Fri, 3 Dec 2021 01:45:49 +0000 (01:45 +0000)]
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>

3 years agod3d11videosink: Use only tested color space for swapchain
Seungha Yang [Fri, 10 Dec 2021 12:58:33 +0000 (21:58 +0900)]
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>

3 years agopitch: Specify layout as required for negotiation
Thibault Saunier [Sat, 11 Dec 2021 14:33:39 +0000 (11:33 -0300)]
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>

3 years agodoc: Update vp9alphadecodebin doc cache
Nicolas Dufresne [Fri, 10 Dec 2021 20:46:41 +0000 (15:46 -0500)]
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>

3 years agoalphacombine: Fix for early allocation queries
Nicolas Dufresne [Fri, 10 Dec 2021 20:18:56 +0000 (15:18 -0500)]
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>

3 years agov4l2codecs: vp9: Add alpha decodebin wrapper
Nicolas Dufresne [Fri, 10 Dec 2021 19:09:44 +0000 (14:09 -0500)]
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>

3 years agov4l2codecs: plugin: Minor style fix
Nicolas Dufresne [Fri, 10 Dec 2021 19:09:06 +0000 (14:09 -0500)]
v4l2codecs: plugin: Minor style fix

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>

3 years agov4l2codecs: decoder: Improve logging of timed out request
Nicolas Dufresne [Fri, 10 Dec 2021 19:08:32 +0000 (14:08 -0500)]
v4l2codecs: decoder: Improve logging of timed out request

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1439>

3 years agov4l2codecs: mpeg2: Check that the decoder output formats
Nicolas Dufresne [Fri, 10 Dec 2021 19:07:18 +0000 (14:07 -0500)]
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>

3 years agovp9alphadecodebin: Fix auto-pluging v4l2slvp9dec
Nicolas Dufresne [Fri, 10 Dec 2021 19:04:40 +0000 (14:04 -0500)]
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>

3 years agoximagesrc: avoid blocking wait for X events
Jakub Adam [Fri, 10 Dec 2021 15:08:27 +0000 (16:08 +0100)]
ximagesrc: avoid blocking wait for X events

XNextEvent() blocks indefinitely in absence of X11 events, which can
prevent the pipeline from stopping.

This can cause problems when ximagesrc is used in "remote desktop"
scenarios and the GStreamer application itself, through which the user
is viewing and controlling the machine, is the only source of input
events.

Replace the call with non-blocking XCheckTypedEvent().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1438>

3 years agomultifilesrc: fix caps leak
Célestin Marot [Fri, 10 Dec 2021 16:36:30 +0000 (17:36 +0100)]
multifilesrc: fix caps leak

since `gst_caps_replace()` and `gst_pad_set_caps()` both ref the caps and neither of them takes the ownership of the caps -> it must be unreffed in `gst_multi_file_src_set_property()`

to test the leak (on Unix): `echo coucou > /tmp/file.txt && GST_TRACERS=leaks GST_DEBUG="GST_TRACER:7" gst-launch-1.0 multifilesrc location=/tmp/file.txt caps='txt' ! fakesink`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1436>

3 years agod3d11window: Remove hack related to color space selection
Seungha Yang [Thu, 9 Dec 2021 10:55:04 +0000 (19:55 +0900)]
d3d11window: Remove hack related to color space selection

Use input GstVideoColorPrimaries without any special case handling
otherwise rendered image color would be very wrong.

The hack was added to work around an issue that some Intel driver
couldn't handle wide color gamut image without HDR10 metadata, specifically PQ image.
But device capability can be checked via a method added in
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1723
so there's no issue now.

Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1175
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430>

3 years agod3d11window: Fix typo in debug message
Seungha Yang [Thu, 9 Dec 2021 10:51:04 +0000 (19:51 +0900)]
d3d11window: Fix typo in debug message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1430>

3 years agoelementfactory: Annotate create_full and make_full to take arrays
Corentin Noël [Wed, 8 Dec 2021 11:27:04 +0000 (12:27 +0100)]
elementfactory: Annotate create_full and make_full to take arrays

We need the array annotation for it to be usable from the introspection side.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1427>

3 years agocodecs: h264decoder: Fix return value type
Benjamin Gaignard [Wed, 8 Dec 2021 10:08:30 +0000 (11:08 +0100)]
codecs: h264decoder: Fix return value type

Return value should be GstFlowReturn not gboolean

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>

3 years agocodecs: h265decoder: Fix return value if klass->new_picture isn't set
Benjamin Gaignard [Tue, 7 Dec 2021 16:09:11 +0000 (17:09 +0100)]
codecs: h265decoder: Fix return value if klass->new_picture isn't set

If klass->new_picture isn't set we need to initialize
ret with GST_FLOW_OK to avoid unwanted error case

Fixes: 5b405d15858b ("codecs: h265decoder: Use GstFlowReturn everywhere")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1426>

3 years agogstnetclockclient: signal lost sync if remote time resets
Danny Smith [Wed, 25 Apr 2018 12:30:51 +0000 (14:30 +0200)]
gstnetclockclient: signal lost sync if remote time resets

When detecting the remote time has been reset which may occur if remote
device providing the clock server has been power reset, then clock is
no longer synced. Setting clock state will trigger a signal to client
informing on sync lost making it possibility to take appropriate action.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/975>

3 years agowpevideosrc: Use basesrc event vfunc
Philippe Normand [Mon, 6 Dec 2021 16:47:14 +0000 (16:47 +0000)]
wpevideosrc: Use basesrc event vfunc

Allows for basic default handling from the base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1422>

3 years agoci: run fedora amd64 docker jobs on packet runners
Tim-Philipp Müller [Mon, 6 Dec 2021 14:02:00 +0000 (14:02 +0000)]
ci: run fedora amd64 docker jobs on packet runners

Which have much better network connectivity to fdo gitlab.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1420>

3 years agojpegdec: only allow conversions from RGB
Guillaume Desmottes [Mon, 6 Dec 2021 14:37:06 +0000 (15:37 +0100)]
jpegdec: only allow conversions from RGB

libjpeg-turbo only supports converting from RGB to other RGB formats.
Fix runtime error when trying to convert from a YUV format for example.

Fix #916

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1421>

3 years agoteletextdec: fix minor string leak
Tim-Philipp Müller [Fri, 3 Dec 2021 13:24:25 +0000 (13:24 +0000)]
teletextdec: fix minor string leak

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1416>

3 years agoci: fedora-docker: Cache media files
Nicolas Dufresne [Thu, 2 Dec 2021 22:57:09 +0000 (17:57 -0500)]
ci: fedora-docker: Cache media files

As of now all integration tests endup fetching 600MB of media every run. This
will increase the docker side, but this is to the traceof that the docker
image will quickly be cached on all runners.

Fixes #841

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1413>

3 years agoristsink: set properties on children early
Marc Leeman [Thu, 2 Dec 2021 14:52:06 +0000 (15:52 +0100)]
ristsink: set properties on children early

The properties on the udpsink/udpsrc elements need to be set before
there is any state change. If not, in a network without default gateway,
udpsink tries to bind an a NULL interface and fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1411>

3 years agov4l2codecs: mpeg2: Fix selected sizeimage
Nicolas Dufresne [Fri, 3 Dec 2021 12:53:54 +0000 (07:53 -0500)]
v4l2codecs: mpeg2: Fix selected sizeimage

Due to a copy paste bug, the bitdepth was never set and that was leading
to requesting sizeimage of 0. Previously that worked since the driver
would in that case pick a size for us. But now the we bumped the minimum
to 4KB, the driver happily allocate 4KB of bitstream which lead to
decoding error.

As MPEG2 have a fixed bitdeph of 8, use a define instead of the run-time
variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1415>

3 years agov4l2codecs: vp9: Drop frames on non-keyframe format change
Nicolas Dufresne [Wed, 1 Dec 2021 17:16:40 +0000 (12:16 -0500)]
v4l2codecs: vp9: Drop frames on non-keyframe format change

V4L2 does not yet support this feature, this will skip over the
transition portion up to the next keyframe.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1404>

3 years agov4l2codecs: Fix renegotiation
Nicolas Dufresne [Wed, 1 Dec 2021 14:51:57 +0000 (09:51 -0500)]
v4l2codecs: Fix renegotiation

If we hold the last reference to the allocator, leaving the device
streaming will cause an EBUSY error when trying to free the allocate
buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1404>

3 years agod3d11vp9dec: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:26:08 +0000 (16:26 +0900)]
d3d11vp9dec: Drop frames on non-keyframe format change

... in case of NVIDIA GPU

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>

3 years agonvvp9sldec: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:04:21 +0000 (16:04 +0900)]
nvvp9sldec: Drop frames on non-keyframe format change

NVDEC doesn't seem to be able to handle the case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>

3 years agocodecs: vp9: Drop frames on non-keyframe format change
Seungha Yang [Thu, 2 Dec 2021 07:03:14 +0000 (16:03 +0900)]
codecs: vp9: Drop frames on non-keyframe format change

... if subclass does not support the case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>

3 years agocodecs: vp9: Also consider render_width/height
Nicolas Dufresne [Wed, 1 Dec 2021 17:10:42 +0000 (12:10 -0500)]
codecs: vp9: Also consider render_width/height

Also emits new_sequence if on keyframe and the render_width/height have
change. The subclass can always optimize this if the frame resolution
didn't change, the output caps needs to reflect this though.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1407>

3 years agortpsink: set properties on children early
Marc Leeman [Tue, 30 Nov 2021 09:24:37 +0000 (10:24 +0100)]
rtpsink: set properties on children early

The properties on the udpsink/udpsrc elements need to be set before
there is any state change. If not, in a network without default gateway,
udpsink tries to bind an a NULL interface and fails.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1398>

3 years agovaapidecodebin: Misc enhancements.
Víctor Manuel Jáquez Leal [Wed, 1 Dec 2021 14:36:44 +0000 (15:36 +0100)]
vaapidecodebin: Misc enhancements.

- Use GST_WARNING rather than g_critical

- Replace gst_ghost_pad_new_from_template() with
  gst_ghost_pad_new() to avoid using the template.

- Declare extern variable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1405>

3 years agovaapidecode: Autogenerate caps template.
Víctor Manuel Jáquez Leal [Wed, 1 Dec 2021 11:26:11 +0000 (12:26 +0100)]
vaapidecode: Autogenerate caps template.

vaapidecode is used in vaapidecodebin and it exposes all the
theoretically supported caps, but that slows down autoplug. With this
autplug is negotiated faster, giving more option to decodebin to select
other decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1405>

3 years agov4l2codecs: vp9: Remove uneeded picture data
Nicolas Dufresne [Tue, 30 Nov 2021 19:48:03 +0000 (14:48 -0500)]
v4l2codecs: vp9: Remove uneeded picture data

The GstV4l2Request now holds a reference on the picture buffer and is
recounted already. This effectively removes usage of GRefCount which is only
available in GLib 2.58, while we support 2.56.

Fixes #910

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402>

3 years agov4l2codecs: decoder: Add method to get the pic_buf
Nicolas Dufresne [Tue, 30 Nov 2021 22:05:22 +0000 (17:05 -0500)]
v4l2codecs: decoder: Add method to get the pic_buf

This helper will be needed for VP9 frame duplication.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402>

3 years agov4l2codecs: vp9: Add missing error checks in decide_allocation
Nicolas Dufresne [Tue, 30 Nov 2021 21:08:18 +0000 (16:08 -0500)]
v4l2codecs: vp9: Add missing error checks in decide_allocation

This could otherwise lead to crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1402>

3 years agoci: Avoid fetching tags for build jobs
Jordan Petridis [Tue, 30 Nov 2021 14:45:07 +0000 (16:45 +0200)]
ci: Avoid fetching tags for build jobs

Avoid fetching tags since we don't need them for builds.
Only caveat might be what happens when a pipeline from
a tag is triggered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1400>

3 years agoci: Looks like we where not triggering pipelines for tags
Jordan Petridis [Tue, 30 Nov 2021 14:58:59 +0000 (16:58 +0200)]
ci: Looks like we where not triggering pipelines for tags

Oops.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1400>

3 years agoci: Set GIT_DEPTH variable
Jordan Petridis [Tue, 30 Nov 2021 14:29:18 +0000 (16:29 +0200)]
ci: Set GIT_DEPTH variable

This switches gitlab-runner to using shallow clones

related #841

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1400>

3 years agobasesink: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:13:08 +0000 (10:13 +0100)]
basesink: Add missing annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>

3 years agopushsrc: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:12:50 +0000 (10:12 +0100)]
pushsrc: Add missing annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>

3 years agobitwriter: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:12:32 +0000 (10:12 +0100)]
bitwriter: Add missing annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>

3 years agobaseparse: Add missing annotations
Corentin Noël [Fri, 26 Nov 2021 09:11:53 +0000 (10:11 +0100)]
baseparse: Add missing annotations

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1392>

3 years agov4l2codecs: h264: Fix typo in comment
Nicolas Dufresne [Wed, 24 Nov 2021 16:17:22 +0000 (11:17 -0500)]
v4l2codecs: h264: Fix typo in comment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1387>

3 years agov4l2codecs: h264: Properly set pic_num/frame_num
Nicolas Dufresne [Wed, 24 Nov 2021 16:17:40 +0000 (11:17 -0500)]
v4l2codecs: h264: Properly set pic_num/frame_num

The V4L2 uAPI uses pic_num for both PicNum and ShortTermPicNum. It also
doe the same for both FrameNum and LongTermFrameIdx. This change does
not change the fluster score, but fixed a visual corruption noticed
with some third party streams.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1387>

3 years agova: Use a lock to protect the surface copy by using vpp.
He Junyan [Tue, 23 Nov 2021 08:35:16 +0000 (16:35 +0800)]
va: Use a lock to protect the surface copy by using vpp.

 If we use vpp to do the surface copy, its operation is not atomic.
 We need to maintain the filter's context unchanged during the whole
 copy progress.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373>

3 years agova: Use the GstVaSurfaceCopy of the allocator atomically.
He Junyan [Tue, 23 Nov 2021 13:10:55 +0000 (21:10 +0800)]
va: Use the GstVaSurfaceCopy of the allocator atomically.

The mem_copy() of the allocator can be called simultaneously from
different threads. We should use atomic pointer operations to create
and use the GstVaSurfaceCopy of the allocator.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373>

3 years agova: DMA allocator: Set the copied memory properly when popped from pool.
He Junyan [Mon, 22 Nov 2021 08:07:27 +0000 (16:07 +0800)]
va: DMA allocator: Set the copied memory properly when popped from pool.

The current code does not set the copied memory correctly when it is popped
from the surface cache pool.
1. We forget to ref the allocator, which causes the allocator to be freed
   unexpected, and we get a crash later because of the memory violation.
2. We forget to add ref_mems_count, which causes the surface leak because
   the surface can not be pushed back to the cache pool again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1373>

3 years agov4l2codecs: gstv4l2decoder: set minimum sizeimage
Daniel Almeida [Thu, 22 Apr 2021 19:29:20 +0000 (16:29 -0300)]
v4l2codecs: gstv4l2decoder: set minimum sizeimage

Set minimum sizeimage such that there is enough space for any overhead
introduced by the codec.

Notably fix a vp9 issue in which a small image would not have a
bitstream buffer large enough to accomodate it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agov4l2codecs: gstv4l2codecsvp9dec: implement a render delay
Daniel Almeida [Wed, 7 Apr 2021 19:15:32 +0000 (16:15 -0300)]
v4l2codecs: gstv4l2codecsvp9dec: implement a render delay

The v4l2 backend support delayed output for performance reasons.
It is then possible to use render delays to queue multiple requests
simultaneously, thus increasing performance.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agov4l2codecs: vp9dec: Implement VP9 v4l2 decoder
Daniel Almeida [Tue, 30 Mar 2021 16:30:46 +0000 (13:30 -0300)]
v4l2codecs: vp9dec: Implement VP9 v4l2 decoder

Implement a v4l2 based vp9 decoder element based on the preexisting vp8
v4l2 decoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agov4l2codecs: update to the new uAPI
Daniel Almeida [Wed, 14 Jul 2021 19:21:59 +0000 (16:21 -0300)]
v4l2codecs: update to the new uAPI

The new VP9 stateless API is in its way to be destaged. Update our
headers to match.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agocodecs: gstvp9decoder: copy frame->system_frame_number into picture
Daniel Almeida [Thu, 8 Apr 2021 13:40:03 +0000 (10:40 -0300)]
codecs: gstvp9decoder: copy frame->system_frame_number into picture

A comment in gstvp9picture.h states that picture->system_frame_number
should get its value from frame->system_frame_number, but in fact
it was never copied at all.

Fix it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agocodecs: gstvp9{decoder|statefulparser}: optionally parse compressed headers
Daniel Almeida [Thu, 8 Apr 2021 13:38:55 +0000 (10:38 -0300)]
codecs: gstvp9{decoder|statefulparser}: optionally parse compressed headers

Rework gstvp9{decoder|statefulparser} to optionally parse compressed headers.
The information in these headers might be needed for accelerators
downstream, so optionally parse them if downstream requests it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1012>

3 years agov4l2: handle 0x0 sizes gracefully
Wim Taymans [Mon, 29 Nov 2021 14:35:36 +0000 (15:35 +0100)]
v4l2: handle 0x0 sizes gracefully

Also ignore 0x0 sizes in the fallback case and assume the size can be
anything between 1x1 and MAXxMAX.

This fixes the case where a width=0, height=0 caps are created. Whith
this patch the caps will contain width=[1,MAX], height=[1,MAX].

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1396>