platform/upstream/gstreamer.git
2 years agocudacontext: Remove unnecessary cuInit() call
Seungha Yang [Tue, 1 Mar 2022 20:01:42 +0000 (05:01 +0900)]
cudacontext: Remove unnecessary cuInit() call

It's already called at plugin init time

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

2 years agoav1parse: Add a comment when the detection of TU fails.
He Junyan [Sat, 5 Mar 2022 03:35:29 +0000 (11:35 +0800)]
av1parse: Add a comment when the detection of TU fails.

Also update the print message.

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

2 years agocamerabin: Remove drain query
Nicolas Dufresne [Fri, 4 Mar 2022 21:48:54 +0000 (16:48 -0500)]
camerabin: Remove drain query

This was to support very old V4L2 kernel. As we moved to DMABuf and can now
detach buffers on renegotiation, the buffer it tries to fix no longer exist.
The risk to blocking indefinitly the application does still exist though.

Fixes #1070

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

2 years agodoc: AV1 demuxers now expose their alignment
Nicolas Dufresne [Fri, 4 Mar 2022 19:57:30 +0000 (14:57 -0500)]
doc: AV1 demuxers now expose their alignment

Update the chache accordingly.

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

2 years agoav1parse: check the error return when parse_alignment_from_caps()
He Junyan [Thu, 3 Mar 2022 15:00:41 +0000 (23:00 +0800)]
av1parse: check the error return when parse_alignment_from_caps()

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

2 years agoav1parse: Use the intersected caps to decide the alignment.
He Junyan [Thu, 3 Mar 2022 14:38:56 +0000 (22:38 +0800)]
av1parse: Use the intersected caps to decide the alignment.

When we negotiate with downstream, We should use the intersected
caps of input and output to decide the alignment and stream format.
The current code just uses the input caps which may lack the stream
format.

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

2 years agoivfparse: Set the alignment to tu for AV1 stream.
He Junyan [Thu, 3 Mar 2022 13:30:00 +0000 (21:30 +0800)]
ivfparse: Set the alignment to tu for AV1 stream.

Just do the same as other demux.

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

2 years agoav1parse: Only detect the stream format when input alignment is tu.
He Junyan [Thu, 3 Mar 2022 09:51:11 +0000 (17:51 +0800)]
av1parse: Only detect the stream format when input alignment is tu.

The demux now outputs the AV1 stream in "tu" alignment, so we do not need
to detect the input alignment. But the annex b stream format is not recognized
by the demux, we still need to detect that stream format for the first input.

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

2 years agomatroska: Fix AV1 alignment to TU
Nicolas Dufresne [Wed, 2 Mar 2022 21:31:24 +0000 (16:31 -0500)]
matroska: Fix AV1 alignment to TU

Matroska stores AV1 in temporal unit, so that all OBU sharing the same
timestamp are put together. This was previously just assumed, which isn't
safe now that we have more alignments.

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

2 years agoisomp4: Fix AV1 default alignment
Nicolas Dufresne [Wed, 2 Mar 2022 21:24:38 +0000 (16:24 -0500)]
isomp4: Fix AV1 default alignment

ISOMP4 store TU (temporal units) worth of AV1. Expose this in the
caps to reduce overhead in the parser, and in the muxer to avoid
storing frames split in the wrong way.

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

2 years agoav1parse: Save the default alignment
Nicolas Dufresne [Wed, 2 Mar 2022 21:22:25 +0000 (16:22 -0500)]
av1parse: Save the default alignment

Otherwise the transformation is not applied and decoders may not
get the appropriate format despite the caps being negotiated
correctly.

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

2 years agoav1parse: Remove duplicated check
Nicolas Dufresne [Wed, 2 Mar 2022 21:20:31 +0000 (16:20 -0500)]
av1parse: Remove duplicated check

The case of both strings being empty is already checked in the
helper function. No functional changes.

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

2 years agovp9parse: Fix auto-plugging of HW frame decoder
Nicolas Dufresne [Fri, 4 Mar 2022 15:02:56 +0000 (10:02 -0500)]
vp9parse: Fix auto-plugging of HW frame decoder

Decoders that required frame aligmment and didn't have an associated
alpha decoder were skipped. This is because the parser was constructing
caps based on the software alpha decoder, which specify super-frame
alignment.

Iterate over the caps to filter the one that have a matching codec-alpha, with
the semantic the no codec-alpha field means codec-alpha=false. Then if
everything was removed, callback to the original, so that the first non-alpha
decoder will be picked.

Fixes #820

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

2 years agomatroskamux: allow width+height caps changes for VP8/9
Tristan Matthews [Mon, 7 Feb 2022 22:51:39 +0000 (17:51 -0500)]
matroskamux: allow width+height caps changes for VP8/9

For VP8 and VP9, width+height changes are signalled inband.

Refs https://github.com/Kurento/bugtracker/issues/535 and
https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit

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

2 years agomatroskamux: allow width + height changes for avc3|hev1
Tristan Matthews [Mon, 7 Feb 2022 21:41:40 +0000 (16:41 -0500)]
matroskamux: allow width + height changes for avc3|hev1

For avc3 and hev1, the intent was to allow more flexibility for caps changes
(see https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1047/diffs?commit_id=9bd8d608d5bae27ec5ff09e733f76ca32b17420c)
however width and resolution were previously omitted.

avc3 and hev1 specifically support changing stream-parameters on the fly, whereas avc1/hvc1 disallow in-band SPS.

This commit allows for changes to width and height for these which is in line with matroskamux's behaviour prior to 1.14.0.

Practically speaking, one use case where this is commonly seen is when capturing a WebRTC stream, as the browser will adapt the resolution live.

Suggested-by: Mathieu Duponchelle "<mathieu@centricular.com>"
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1657>

2 years agodeinterlace: Prevent race between _set_method and latency query
Jan Alexander Steffens (heftig) [Fri, 4 Mar 2022 14:36:20 +0000 (15:36 +0100)]
deinterlace: Prevent race between _set_method and latency query

It's possible that the method is being manipulated while downstream
queries our latency, leading to crashes.

Prevent that from happening.

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

2 years agotsdemux: Handle PES headers bigger than a mpeg-ts packet
Edward Hervey [Fri, 4 Mar 2022 13:17:47 +0000 (14:17 +0100)]
tsdemux: Handle PES headers bigger than a mpeg-ts packet

While the actual PES header parser could notify us that it needed more data, we
would never actually act on it.

This commit will accumulate incoming packets in such situation and re-attempt
the header parsing.

Fixes #1027

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

2 years agova: basetransform: Add device-path read-only property.
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 10:32:23 +0000 (11:32 +0100)]
va: basetransform: Add device-path read-only property.

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

2 years agova: basedec: Add device-path read-only property.
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 10:05:36 +0000 (11:05 +0100)]
va: basedec: Add device-path read-only property.

And elements will notify the used device-path if display is DRM.

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

2 years agogldisplay: Reorder GST_GL_WINDOW check for egl-device
Seungha Yang [Fri, 4 Mar 2022 13:21:13 +0000 (22:21 +0900)]
gldisplay: Reorder GST_GL_WINDOW check for egl-device

"egl-device" should be checked before the "egl", otherwise unexpected egl will be picked

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

2 years agovah264enc: Remove GST_PARAM_CONDITIONALLY_AVAILABLE.
Víctor Manuel Jáquez Leal [Fri, 4 Mar 2022 12:34:50 +0000 (13:34 +0100)]
vah264enc: Remove GST_PARAM_CONDITIONALLY_AVAILABLE.

Since it's used only when the property is conditionally installed, and
these parameters are always installed.

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

2 years agova: encoder: Clean dead code.
He Junyan [Fri, 4 Mar 2022 08:15:42 +0000 (09:15 +0100)]
va: encoder: Clean dead code.

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

2 years agova: encoder: Fix error code path when open.
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 13:08:16 +0000 (14:08 +0100)]
va: encoder: Fix error code path when open.

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

2 years agovah264enc: Remove preferred_output_delay.
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 12:57:35 +0000 (13:57 +0100)]
vah264enc: Remove preferred_output_delay.

In the current state of the encoder it's just dead code.

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

2 years agovah264enc: Avoid mapping coded buffer twice.
Víctor Manuel Jáquez Leal [Thu, 3 Mar 2022 08:59:28 +0000 (09:59 +0100)]
vah264enc: Avoid mapping coded buffer twice.

Currently for copying the coded buffer onto a GStreamer buffer, the
coded buffer is mapped two times: one for getting the size, and later
for do the actual copy. We can avoid this by doing directly in the
element rather than in the general encoder object.

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

2 years agovah264enc: Single parameter array per picture.
Víctor Manuel Jáquez Leal [Wed, 2 Mar 2022 19:53:16 +0000 (20:53 +0100)]
vah264enc: Single parameter array per picture.

There's no need, at least in H.264, to hold a global parameter array,
since there's no need to submit SPS, trellis, hdr or quality in every
buffer, but only on IDR ones.

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

2 years agova: Fix log message
Víctor Manuel Jáquez Leal [Wed, 2 Mar 2022 19:06:01 +0000 (20:06 +0100)]
va: Fix log message

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

2 years agoplay: Fix error parsing API
Philippe Normand [Fri, 4 Mar 2022 09:57:02 +0000 (09:57 +0000)]
play: Fix error parsing API

The GError is an out parameter, so should be a ** parameter, like the details
parameter.

Fixes #1063

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

2 years agowebrtc: support renegotiating adding/removing RTX
Matthew Waters [Tue, 3 Aug 2021 02:14:49 +0000 (12:14 +1000)]
webrtc: support renegotiating adding/removing RTX

We need to always add the RTX/RED/ULPFEC elements as rtpbin will only
call us once to request aux/fec senders/receivers.

We also need to regenerate the media section of the SDP instead of
blindly copying from the previous offer.

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

2 years agomsdkenc: Change default ref frames number as 0
Mengkejiergeli Ba [Tue, 1 Mar 2022 03:43:09 +0000 (11:43 +0800)]
msdkenc: Change default ref frames number as 0

When user does not set ref-frames in pipeline, we should let MediaSDK
decide the reference frame number via setting default value as 0 at
gstreamer side.

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

2 years agomeson: wic: Fix typo
Seungha Yang [Thu, 3 Mar 2022 19:18:06 +0000 (04:18 +0900)]
meson: wic: Fix typo

Should check WIC build option, not MediaFoundation

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

2 years agosoup: Fix static build with MSVC
Nirbheek Chauhan [Thu, 3 Mar 2022 17:34:36 +0000 (23:04 +0530)]
soup: Fix static build with MSVC

../ext/soup/gstsouploader.c(818): error C4098: '_soup_session_send_async': 'void' function returning a value

It's technically a false warning, but that's how MSVC works, so fix
it.

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

2 years agosoup: Fix pkgconfig generation and documentation
Nirbheek Chauhan [Wed, 2 Mar 2022 19:07:57 +0000 (00:37 +0530)]
soup: Fix pkgconfig generation and documentation

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

2 years agosoup: Fix static build when default_library=both
Nirbheek Chauhan [Wed, 2 Mar 2022 17:52:39 +0000 (23:22 +0530)]
soup: Fix static build when default_library=both

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1007

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

2 years agosoup: Don't error out in static build unless option is enabled
Nirbheek Chauhan [Wed, 2 Mar 2022 17:41:09 +0000 (23:11 +0530)]
soup: Don't error out in static build unless option is enabled

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

2 years agosoup: Lookup libsoup dylib files on Apple platforms
Philippe Normand [Sun, 27 Feb 2022 14:45:01 +0000 (15:45 +0100)]
soup: Lookup libsoup dylib files on Apple platforms

Fixes #1007

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

2 years agov4l2src: Reset the compose window to the default after setting format
Damian Hobson-Garcia [Fri, 15 Oct 2021 06:32:22 +0000 (15:32 +0900)]
v4l2src: Reset the compose window to the default after setting format

When the size of V4L2 capture or output is changes with VIDIOC_S_FMT,
the device is only required to update the compisition window to fit
inside the new frame size.  This can result in captured data only being
updated on a portion of the frame after a resize.

Update the composition window to the default value determined by the
V4L2 device driver whenever the format is changed to make sure that
all image data is composed to its full size.

Fixes #765

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

2 years agogst-play: Allow switching to previous tracks
Jan Schmidt [Wed, 23 Feb 2022 14:41:34 +0000 (01:41 +1100)]
gst-play: Allow switching to previous tracks

Implement case sensitive key-press handling,
and make 'V', 'A', 'S' switch to the previous
video, audio, or subtitle track. The lower-case
keypress cycles to the next track, as before

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

2 years agoqsv: Remove strcpy for DRM device path
Seungha Yang [Wed, 2 Mar 2022 19:22:15 +0000 (04:22 +0900)]
qsv: Remove strcpy for DRM device path

Simplify code. It's just one-time allocation, so don't need to worry
about leaking.

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

2 years agomsdk: Don't print error log for missing DRM device path
Seungha Yang [Wed, 2 Mar 2022 19:57:42 +0000 (04:57 +0900)]
msdk: Don't print error log for missing DRM device path

It's expected in case that such DRM device is unavailable for some reasons,
specifically non-Intel platform or so

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

2 years agosdp: support multiple rid parameters
Matthew Waters [Wed, 1 Sep 2021 04:02:29 +0000 (14:02 +1000)]
sdp: support multiple rid parameters

As specified formally in RFC8851

Each rid description is placed in its own caps field in the structure.
This is very similar to the already existing extmap-$id sdp<->caps
transformations that already exists.

The mapping is as follows:

  a=rid:0 direction ';'-separated params

where direction is either 'send' or 'recv'

gets put into a caps structure like so:

   rid-0=(string)<"direction","param1","param2",etc>

If there are no rid parameters then the caps structure is generated to
only contain the direction as a single string like:

   rid-0=(string)direction

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

2 years agowic: Add support for JPEG and PNG decoding
Seungha Yang [Sat, 29 Jan 2022 18:11:37 +0000 (03:11 +0900)]
wic: Add support for JPEG and PNG decoding

Adding Windows Imaging Component (WIC) plugin with JPEG/PNG decoding
support.

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

2 years agodirectshow: Fix for division by zero
Seungha Yang [Tue, 1 Mar 2022 21:17:22 +0000 (06:17 +0900)]
directshow: Fix for division by zero

The AvgTimePerFrame value may be unknown. Use arbitrary
value (30 fps) instead of crashing.

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

2 years agomatroska-mux: Handle pixel-aspect-ratio caps field correctly when checking caps equality
Sebastian Dröge [Tue, 1 Mar 2022 18:59:30 +0000 (20:59 +0200)]
matroska-mux: Handle pixel-aspect-ratio caps field correctly when checking caps equality

Not having this field is equivalent with it being 1/1 so consider
it like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

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

2 years agomatroska-mux: Handle multiview-mode/flags caps fields correctly when checking caps...
Sebastian Dröge [Tue, 1 Mar 2022 18:56:43 +0000 (20:56 +0200)]
matroska-mux: Handle multiview-mode/flags caps fields correctly when checking caps equality

Not having these fields is equivalent with them being mono/0 so consider
them like that. The generic caps functions are not aware of these
semantics and would consider the caps different, causing a negotiation
failure when caps are changing from caps with to caps without or the
other way around.

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

2 years agoRevert "ci: Disable windows jobs for now"
Jordan Petridis [Tue, 1 Mar 2022 19:12:02 +0000 (21:12 +0200)]
Revert "ci: Disable windows jobs for now"

This reverts commit be2815a07a0df7a33d136a2be9cccd0969808642.

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

2 years agoqsv: Add H.264 decoder
Seungha Yang [Sat, 19 Feb 2022 18:59:32 +0000 (03:59 +0900)]
qsv: Add H.264 decoder

Initial decoder implementation with baseclass

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

2 years agowebrtc_sendrecv.py: Sync element props with C version
Nirbheek Chauhan [Tue, 1 Mar 2022 14:30:58 +0000 (20:00 +0530)]
webrtc_sendrecv.py: Sync element props with C version

Also add indentation to make it easier to read

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

2 years agowebrtc_sendrecv.py: Ensure that gst-python overrides are installed
Nirbheek Chauhan [Tue, 1 Mar 2022 14:28:16 +0000 (19:58 +0530)]
webrtc_sendrecv.py: Ensure that gst-python overrides are installed

Otherwise fetching of the offer will fail with a cryptic error:

```
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 56, in on_offer_created
    offer = reply['offer']
TypeError: 'Structure' object is not subscriptable
```

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

2 years agowebrtc_sendrecv.py: Don't try to set state on a None pipe
Nirbheek Chauhan [Tue, 1 Mar 2022 14:27:06 +0000 (19:57 +0530)]
webrtc_sendrecv.py: Don't try to set state on a None pipe

```
ERROR peer '5762' not found
Traceback (most recent call last):
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 190, in <module>
    res = loop.run_until_complete(c.loop())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 155, in loop
    self.close_pipeline()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 142, in close_pipeline
    self.pipe.set_state(Gst.State.NULL)
AttributeError: 'NoneType' object has no attribute 'set_state'
```

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

2 years agowebrtc_sendrecv.py: Fix SSLError when connecting to websocket server
Nirbheek Chauhan [Tue, 1 Mar 2022 14:25:11 +0000 (19:55 +0530)]
webrtc_sendrecv.py: Fix SSLError when connecting to websocket server

```
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 189, in <module>
    loop.run_until_complete(c.connect())
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/../gstreamer/subprojects/gst-examples/webrtc/sendrecv/gst/webrtc_sendrecv.py", line 40, in connect
    self.conn = await websockets.connect(self.server, ssl=sslctx)
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 650, in __await_impl_timeout__
    return await asyncio.wait_for(self.__await_impl__(), self.open_timeout)
  File "/usr/lib64/python3.10/asyncio/tasks.py", line 445, in wait_for
    return fut.result()
  File "/home/nirbheek/.local/lib/python3.10/site-packages/websockets/legacy/client.py", line 654, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1080, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "/usr/lib64/python3.10/asyncio/base_events.py", line 1110, in _create_connection_transport
    await waiter
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 631, in _on_handshake_complete
    raise handshake_exc
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 676, in _process_write_backlog
    ssldata = self._sslpipe.do_handshake(
  File "/usr/lib64/python3.10/asyncio/sslproto.py", line 116, in do_handshake
    self._sslobj = self._context.wrap_bio(
  File "/usr/lib64/python3.10/ssl.py", line 526, in wrap_bio
    return self.sslobject_class._create(
  File "/usr/lib64/python3.10/ssl.py", line 865, in _create
    sslobj = context._wrap_bio(
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:801)
```

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

2 years agowebrtc_sendrecv.py: Fix deprecation warning with Python 3.10
Nirbheek Chauhan [Tue, 1 Mar 2022 14:23:41 +0000 (19:53 +0530)]
webrtc_sendrecv.py: Fix deprecation warning with Python 3.10

asyncio.get_event_loop() will not implicitly create a new event loop
in a future version of Python, so we need to do that explicitly.

```
webrtc_sendrecv.py:188: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
```

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

2 years agowebrtc_sendrecv.py: Fix styling errors
Nirbheek Chauhan [Tue, 1 Mar 2022 14:22:28 +0000 (19:52 +0530)]
webrtc_sendrecv.py: Fix styling errors

These are now enforced by the pre-commit python style hook.

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

2 years agowebrtc: Update Makefile for building webrtc-sendrecv
Nirbheek Chauhan [Tue, 1 Mar 2022 14:20:12 +0000 (19:50 +0530)]
webrtc: Update Makefile for building webrtc-sendrecv

This now needs the RTP library.

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

2 years agouridecodebin3: Remove dead variables
Jan Schmidt [Tue, 1 Mar 2022 13:52:22 +0000 (00:52 +1100)]
uridecodebin3: Remove dead variables

Leftover junk from original port

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

2 years agomatroska-mux: If a stream has a TITLE tag, use it for the name.
Jan Schmidt [Sat, 26 Feb 2022 16:17:26 +0000 (03:17 +1100)]
matroska-mux: If a stream has a TITLE tag, use it for the name.

If a title tag is pushed to a pad, store it as the Track name.
This means that players will use it as the human readable
description of the track, instead of something generic like 'Video'
or 'Subtitle'

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

2 years agomatroskademux: Don't parse Tracks element twice
Jan Schmidt [Sat, 26 Feb 2022 15:39:28 +0000 (02:39 +1100)]
matroskademux: Don't parse Tracks element twice

If the tracks element was parsed from the SeekEntry, don't
parse it a second time and recreate tracks, as this
loses any tags that were read using the seek table.

If a genuinely new Tracks element is found, do read that
as it is needed for MSE support.

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

2 years agomeson: Adjust ninja usage restriction info for devenv
Sebastian Fricke [Mon, 21 Feb 2022 09:58:28 +0000 (10:58 +0100)]
meson: Adjust ninja usage restriction info for devenv

The documentation within meson highlights, that `ninja` can be used
without problems for any case except `ninja reconfigure`. The warning
however describes to the user, that `ninja` shouldn't be used at all.
Fix the warning.

Fixes: 01eb252f678 Don't allow people to run meson inside the uninstalled env
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agodocs: Fix typos in documentation
Sebastian Fricke [Fri, 18 Feb 2022 15:12:15 +0000 (16:12 +0100)]
docs: Fix typos in documentation

In building-from-source-using-meson.md:
s/implicitely/implicitly/

In README.md:
s/uncompatible/incompatible/

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

2 years agodocs: Extend documentation for the GStreamer development environment
Sebastian Fricke [Fri, 18 Feb 2022 09:47:47 +0000 (10:47 +0100)]
docs: Extend documentation for the GStreamer development environment

Add more extensive documentation for the development environment.
Document how the tool works, how to use it and common use cases.

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

2 years agoRemove the uninstalled term
Sebastian Fricke [Mon, 21 Feb 2022 09:49:15 +0000 (10:49 +0100)]
Remove the uninstalled term

Remove the symbolic link `gst-uninstalled` which points to `gst-env`.
The `uninstalled` is the old name and the project should stick to a
single name for the procedure.
Remove the term from all the files, exceptions are variables from
dependencies like `uninstalled_variables` from pkgconfig and
`meson-uninstalled`.
Adjust mentions of the script in the documentation and README.

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

2 years agoAllow running gst-uninstalled when GStreamer is a subproject
Sebastian Fricke [Thu, 17 Feb 2022 20:44:30 +0000 (21:44 +0100)]
Allow running gst-uninstalled when GStreamer is a subproject

As described in Merge request 222, the previous solution is not the
best possible solution and was also missing documentation.
Adjust the suggestion to the current GStreamer mono-repository.
And apply this change after reverting the previous commit.

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

2 years agotests: Remove deleted gst-env option from test
Sebastian Fricke [Tue, 22 Feb 2022 08:20:38 +0000 (09:20 +0100)]
tests: Remove deleted gst-env option from test

The `gstbuilddir` option has been removed by reverting the commit
879126a3. But the later commit 1babccfe503 uses the option within a test.
Remove the mentioned option from the test.

Fixes: 1babccfe503  Fix using overrides when not building PyGObject
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoRevert "Allow running gst-uninstalled when gst-build is a subproject"
Sebastian Fricke [Thu, 17 Feb 2022 20:41:40 +0000 (21:41 +0100)]
Revert "Allow running gst-uninstalled when gst-build is a subproject"

This reverts commit 879126a31c77622f594e70f205fcefd4556d9865.

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

2 years agoMaintain build instructions at a single location
Sebastian Fricke [Wed, 23 Feb 2022 10:10:11 +0000 (11:10 +0100)]
Maintain build instructions at a single location

Do not maintain similar build instructions within each gst-plugins-*
subproject and the subproject/gstreamer subproject. Use the build
instructions from the mono-repository and link to them via hyperlink.

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

2 years agoAdd documentation for GST_VALIDATE_APPS_DIR
Sebastian Fricke [Thu, 17 Feb 2022 14:25:21 +0000 (15:25 +0100)]
Add documentation for GST_VALIDATE_APPS_DIR

Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 4d569b51ed2 add a way to specify an application directory.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agoImprove environment variable documentation
Sebastian Fricke [Thu, 17 Feb 2022 10:35:49 +0000 (11:35 +0100)]
Improve environment variable documentation

At GST_VALIDATE_FILE:
s/will be outputed/are output/

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

2 years agoAdd documentation for GST_VALIDATE_PLUGIN_PATH
Sebastian Fricke [Thu, 17 Feb 2022 10:32:14 +0000 (11:32 +0100)]
Add documentation for GST_VALIDATE_PLUGIN_PATH

Add documentation for the environment variable, explaining what it is
used for and the default search locations.

Fixes: 83d6978f80 Implement fault_injection as a Gs(tValidate)Plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1743>

2 years agogst-env: Improve coding style and cleanup
Sebastian Fricke [Wed, 16 Feb 2022 09:17:23 +0000 (10:17 +0100)]
gst-env: Improve coding style and cleanup

* Remove unused variables
* Remove unused imports
* Apply pycodestyle style suggestions
  - Missing newlines
  - spaces before brackets
  - Wrong indentations

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

2 years agodocs: Add vah264enc metadata.
Víctor Manuel Jáquez Leal [Mon, 21 Feb 2022 11:26:49 +0000 (12:26 +0100)]
docs: Add vah264enc metadata.

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

2 years agova: enable the H264 encoder.
He Junyan [Mon, 4 Oct 2021 17:53:19 +0000 (01:53 +0800)]
va: enable the H264 encoder.

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

2 years agova: Add H264 encoder.
He Junyan [Mon, 4 Oct 2021 17:51:48 +0000 (01:51 +0800)]
va: Add H264 encoder.

This a new VA-API implementation of a H264 encoder.

It can control the GOP and parameter settings, while the MV searching,
VCL and the rate control algorithm are implemented by VA drivers and HW.
It supports most of the common usage options in H264, but still lacks
of look ahead, field, B frame weighted prediction, etc.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add a common encoder object.
He Junyan [Mon, 4 Oct 2021 17:50:07 +0000 (01:50 +0800)]
va: Add a common encoder object.

As the counterpart of the va decoder, this class handles all the
common logic for the encoding routine and miscellaneous queries about
encoding.

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1051>

2 years agova: Add vacompat.h to wrap glib functions.
He Junyan [Thu, 20 Jan 2022 13:44:20 +0000 (21:44 +0800)]
va: Add vacompat.h to wrap glib functions.

The g_queue_clear_full() and g_array_copy() functions in the glib
may not be available for the current glib version check, so we add
helper functions to wrap it.
This should be deleted after the glib version bumps.

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

2 years agova: Add the profile string name into the profile_map.
He Junyan [Thu, 21 Oct 2021 14:56:23 +0000 (22:56 +0800)]
va: Add the profile string name into the profile_map.

We also add a helper function of gst_va_profile_from_name to get
the VA profile value by its profile string name.

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

2 years agova: Change the H264 profile string order in the profile_map.
He Junyan [Mon, 4 Oct 2021 17:53:47 +0000 (01:53 +0800)]
va: Change the H264 profile string order in the profile_map.

The first one should be the one that matches the VA profile's name
most precisely.

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

2 years agova: caps: Expose gst_va_create_coded_caps as helper function.
He Junyan [Mon, 4 Oct 2021 17:45:25 +0000 (01:45 +0800)]
va: caps: Expose gst_va_create_coded_caps as helper function.

And allow free indentation for array declaration.

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

2 years agotest: Add test cases for the H264 bitwriter.
He Junyan [Mon, 4 Oct 2021 17:43:28 +0000 (01:43 +0800)]
test: Add test cases for the H264 bitwriter.

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

2 years agocodecparsers: bitwriter: Add the common bit writer functions for H264.
He Junyan [Mon, 4 Oct 2021 17:42:41 +0000 (01:42 +0800)]
codecparsers: bitwriter: Add the common bit writer functions for H264.

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

2 years agocodecparsers: nalutils: Add nal_writer_reset_and_get_data help function.
He Junyan [Mon, 4 Oct 2021 17:41:07 +0000 (01:41 +0800)]
codecparsers: nalutils: Add nal_writer_reset_and_get_data help function.

We not only want to create a NAL gstmemory, but also need to create and
get the raw data of a NAL writer for the later usage.

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

2 years agogs: look for google_cloud_cpp_storage.pc
Guillaume Desmottes [Mon, 28 Feb 2022 15:33:23 +0000 (16:33 +0100)]
gs: look for google_cloud_cpp_storage.pc

storage_client.pc was legacy and has been removed:
https://github.com/googleapis/google-cloud-cpp/commit/df6fa3611cdfbc37d40e1451afa91fd7d2e7d5f7#diff-bc35ad7c2fe631fd5578a06092412dba81c7ddd27bb25df7e17bb13771799afcL743

No need to keep looking for storage_client.pc as a fallback as 1.25.0,
our minimum version, already ships google_cloud_cpp_storage.pc

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

2 years agoyadif.asm: Fix improper usage of LOAD macro
Vivia Nikolaidou [Mon, 28 Feb 2022 22:12:56 +0000 (00:12 +0200)]
yadif.asm: Fix improper usage of LOAD macro

LOAD macro relies in m7 being zero for interleaving purposes. Using LOAD
on the m7 register makes it interleave with its new content instead of
with 0.

The effect of this bug was bobbing on some static lines that appeared
over fast-moving content.

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

2 years agoyadif.asm: Typo fixes in comments
Vivia Nikolaidou [Mon, 28 Feb 2022 22:12:33 +0000 (00:12 +0200)]
yadif.asm: Typo fixes in comments

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

2 years agoyadif: Fix bug in C implementation of CHECK
Vivia Nikolaidou [Mon, 28 Feb 2022 18:39:11 +0000 (20:39 +0200)]
yadif: Fix bug in C implementation of CHECK

It was different compared to the corresponding part in both ffmpeg and
the asm implementation. Fixing this makes videotestsrc pattern=spokes
not jump at all when not using the asm optimisations.

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

2 years agoipcpipeline: fix crash and error on windows with SOCKET or _pipe()
jinsl00000 [Fri, 25 Feb 2022 07:00:05 +0000 (15:00 +0800)]
ipcpipeline: fix crash and error on windows with SOCKET or _pipe()

The fd was in different meanings on windows:
POSIX read and write use the fd as a file descriptor.
The gst_poll use the fd as a WSASocket.

This patch use WSASocket as default on windows. This is a temporary measure, because IPC has many different implement. There may be a better way in the future.

See #1044

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

2 years agov4l2videodec : enable resolution change
Ming Qian [Tue, 19 Oct 2021 08:10:06 +0000 (16:10 +0800)]
v4l2videodec : enable resolution change

The dynamic resolution changes when
the sequence starts when the decoder detects a coded frame with one or
more of the following parameters different from those previously
established (and reflected by corresponding queries):
1.coded resolution (OUTPUT width and height),
2.visible resolution (selection rectangles),
3.the minimum number of buffers needed for decoding,
4.bit-depth of the bitstream has been changed.

Although gstreamer parser has parsed the stream resolution.
but there are some case that we need to handle resolution change event.
1. bit-depth is different from the negotiated format.
2. the capture buffer count can meet the demand
3. there are some hardware limitations that the decoded resolution may
be larger than the display size. For example, the stream size is
1920x1080, but some vpu may decode it to 1920x1088.

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

2 years agov4l2videodec : refactor the setup process of capture
Ming Qian [Tue, 26 Oct 2021 02:03:42 +0000 (10:03 +0800)]
v4l2videodec : refactor the setup process of capture

v4l2videodec do some refactoring so that it can support
dynamic resolution change event.

1.wrap the setup process of capture as a function,
as decoder need setup the capture again when
dynamic resolution change event is received.

2.move the function "remove_padding"

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

2 years agovideo-info: encoded format can have RGB color-matrix (Fixes #1435)
Célestin Marot [Fri, 10 Dec 2021 14:51:51 +0000 (15:51 +0100)]
video-info: encoded format can have RGB color-matrix (Fixes #1435)

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

2 years agoMSDK: Add _context_query() and avoid compile error on Windows
Wu Tong [Mon, 14 Feb 2022 08:15:46 +0000 (16:15 +0800)]
MSDK: Add _context_query() and avoid compile error on Windows

To avoid compile error on Windows, macro definitions are added to suppress va
variables. In the meantime, add function _context_query() to query
context on Windows.

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

2 years agobuffer: Clarify that the MARKER flag maps to the corresponding RTP header flag
Sebastian Dröge [Wed, 23 Feb 2022 08:13:54 +0000 (10:13 +0200)]
buffer: Clarify that the MARKER flag maps to the corresponding RTP header flag

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

2 years agortp: In payloaders map the RTP marker flag to the corresponding buffer flag
Sebastian Dröge [Tue, 22 Feb 2022 09:18:53 +0000 (11:18 +0200)]
rtp: In payloaders map the RTP marker flag to the corresponding buffer flag

This allows downstream of a payloader to know the RTP header's marker
flag without first having to map the buffer and parse the RTP header.

Especially inside RTP header extension implementations this can be
useful to decide which packet corresponds to e.g. the last packet of a
video frame.

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

2 years agoosxaudiosrc: Support a device as both input and output
Joseph Donofry [Mon, 6 Dec 2021 17:49:18 +0000 (12:49 -0500)]
osxaudiosrc: Support a device as both input and output

osxaudiodeviceprovider now probes devices more than once to determine
if the device can function as both an input AND and output device.

Previously, if the device provider detected that a device had any output
capabilities, it was treated solely as an Audio/Sink.  This causes issues
that have both input and output capabilities (for example, USB interfaces
for professional audio have both input and output channels).  Such devices
are now listed as both an Audio/Sink as well as an Audio/Source.

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

2 years agoregistry: Fix multi-line `#warning` compiler warning
Sebastian Dröge [Sun, 27 Feb 2022 11:17:40 +0000 (13:17 +0200)]
registry: Fix multi-line `#warning` compiler warning

  subprojects/gstreamer/gst/gstregistry.c:1593: unexpected character `"'

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

2 years agovideo-format-info: Use correct parameter name in gst_video_format_info_extrapolate_st...
Sebastian Dröge [Sun, 27 Feb 2022 11:19:49 +0000 (13:19 +0200)]
video-format-info: Use correct parameter name in gst_video_format_info_extrapolate_stride() docs

../subprojects/gst-plugins-base/gst-libs/gst/video/video-format.c:7570: Warning: GstVideo: gst_video_format_info_extrapolate_stride: unknown parameter 'info' in documentation comment, should be 'finfo'

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

2 years agortp: ldac: Set frame count information in payload
Sanchayan Maity [Thu, 24 Feb 2022 14:58:23 +0000 (20:28 +0530)]
rtp: ldac: Set frame count information in payload

The RTP payload seems to be required as it carries the frame count
information. Also, gst_rtp_base_payload_allocate_output_buffer had
the second argument incorrect.

Strangely some devices like Shanling MP4 and Sony XM3 would still
work without this while some like the Sony XM4 do not.

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

2 years agoldac: Set eqmid in caps
Sanchayan Maity [Thu, 24 Feb 2022 14:56:46 +0000 (20:26 +0530)]
ldac: Set eqmid in caps

We set the eqmid in caps to be usable downstream by rtpldacpay for
knowing the frame count.

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

2 years agotsmux: Skip empty buffers
Vivia Nikolaidou [Mon, 31 Jan 2022 14:13:32 +0000 (16:13 +0200)]
tsmux: Skip empty buffers

They can be created e.g. by aggregator when there is a gap. Such buffers
should not be muxed at all.

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

2 years agodevenv: Add some missing GStreamer specific env variables
Xavier Claessens [Mon, 21 Feb 2022 16:37:26 +0000 (11:37 -0500)]
devenv: Add some missing GStreamer specific env variables

This should make "meson devenv" closer to what "gst-env.py" sets.

- GST_VALIDATE_SCENARIOS_PATH
- GST_VALIDATE_APPS_DIR
- GST_OMX_CONFIG_DIR
- GST_ENCODING_TARGET_PATH
- GST_PRESET_PATH
- GST_PLUGIN_SCANNER
- GST_PTP_HELPER
- _GI_OVERRIDES_PATH

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

2 years agodevenv: Prepend to GST_PLUGIN_PATH
Xavier Claessens [Mon, 21 Feb 2022 16:35:41 +0000 (11:35 -0500)]
devenv: Prepend to GST_PLUGIN_PATH

Use may have their own GST_PLUGIN_PATH, or a custom user subproject
could have their own plugins too. This is also what gst-env.py does.

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

2 years agoaudioconvert: Add dithering-threshold property
Sebastian Dröge [Wed, 16 Feb 2022 16:49:52 +0000 (18:49 +0200)]
audioconvert: Add dithering-threshold property

By default, no dithering is applied if the target bit depth is above 20
bits. This new property allows to apply dithering nonetheless in these
cases.

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