Commit graph

480 commits

Author SHA1 Message Date
Jordan Petridis
1fb7cda048 svtav1enc: Avoid svtav1 defining TRUE/FALSE
Make sure we include the svt headers first and then undefine TRUE
and FALSE so we will only ever be using glib's defines for those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5424>
2023-09-29 14:32:22 +00:00
Philippe Normand
ae7871c019 wpevideosrc: Add a simple example for headless rendering
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5405>
2023-09-28 19:20:12 +00:00
David Svensson Fors
82a06a36cc dashsink: Use gst_codec_utils_caps_get_mime_codec()
Use gst_codec_utils_caps_get_mime_codec() in pbutils for codec
strings. That function gives more elaborate RFC 6381 compatible
strings than the helper functions in gstmdphelper.c, such as
"avc1.F4000D".

Remove the helper functions, as they were only used from dashsink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5404>
2023-09-28 18:31:07 +00:00
Xavier Claessens
0ab48250a9 GstCustomMeta: Use simplified API where possible
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5385>
2023-09-27 18:46:34 +00:00
Hugues Fruchet
5c307e8d17 gtkwaylandsink: do not use drm dumb pool when importing DMAbuf buffers
There is no need to use DRM dumb pool if buffer to
render is already a DMABuf, just import it and render it.

This fixes a DMAbuf memory leakage when waylandsink downstream
element exports DMABuf while waylandsink is configured to be
DMABuf exporter (drm-device=/drv/dri/card0):

gst-launch-1.0 v4l2src io-mode=4 ! gtkwaylandsink drm-device=/dev/dri/card0

leakage identfied with command:
watch "cat /sys/kernel/debug/dma_buf/bufinfo | grep attached "

Fixes #2729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5350>
2023-09-19 16:21:58 +00:00
Hugues Fruchet
e4bc88492a waylandsink: do not use drm dumb pool when importing DMAbuf buffers
There is no need to use DRM dumb pool if buffer to
render is already a DMABuf, just import it and render it.

This fixes a DMAbuf memory leakage when waylandsink downstream
element exports DMABuf while waylandsink is configured to be
DMABuf exporter (drm-device=/drv/dri/card0):

gst-launch-1.0 v4l2src io-mode=4 ! waylandsink drm-device=/dev/dri/card0

leakage identfied with command:
watch "cat /sys/kernel/debug/dma_buf/bufinfo | grep attached "

Fixes #2729

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5350>
2023-09-19 16:21:58 +00:00
Matthew Waters
c6b867e470 vulkancolorconvert: actually support passthrough correctly
e.g. passthrough of YUV (or RGB) formats should not modify any buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5317>
2023-09-13 01:12:18 +00:00
Matthew Waters
b82a402bf1 vkformat: also check configured usage flags
This does also mean that if the primary format fails this check, we need
to try the secondary format before returning an error

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2957
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5288>
2023-09-08 16:09:33 +00:00
Robert Mader
fd82342bbd waylandsink: Move format caps list to shared library
So it can be shared and more easily updated. While on it, order the
formats according to the documentation for GstVideo.VIDEO_FORMATS_ALL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5275>
2023-09-07 13:50:48 +00:00
Seungha Yang
ce922a413c qt6d3d11: Add plugin docs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5258>
2023-08-30 15:45:12 +00:00
Seungha Yang
de07c44183 codec2json: Fix plugin loading on Windows
* Library versioning should not be used for plugins since it will add
  -{version}.dll suffix (and versioned libraries on Linux with symlink).
  Then the library file name and plugin init function name mismatch
  will result in blacklisted plugin.

* Don't define BUILDING_GST_CODECS, makes no sense

* Don't define G_LOG_DOMAIN, which should be used only for libraries,
  not plugins

* Depends on gstcodecparsers libary, not gstcodecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5249>
2023-08-25 16:08:39 +00:00
Nicolas Dufresne
a795c9bc6a waylandsink: Restore support for render-rectangle
Fixes #2519

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5221>
2023-08-23 19:24:47 +00:00
Rabindra Harlalka
f2087cd663 aesenc: Fix IV length addition to output buffer length
Add length of IV to output buffer length only for the first buffer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5093>
2023-08-21 18:10:12 +00:00
Jan Schmidt
1b0b1fc0fd mdns: Fix a crash on context error
Make sure not to free the microdns provider context until the
device provider asks it to stop. Fixes a crash if there is
an error (such as MDNS port being busy) that makes the
mdns listener exit early.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5198>
2023-08-18 10:40:50 +00:00
Johan Sternerup
5b64cfaca3 webrtcice: Add webrtc ALPN header for HTTP proxy
Section 3.4 in RFC8835 states that if a WebRTC endpoint uses an HTTP
proxy to access the Internet it MUST include the "ALPN" header. This
commit adds this header.

By default the ALPN used when connecting to the TURN/TCP server via a
proxy is set to "webrtc". It can be changed by adding an alpn url
option for the http-proxy. For example:

http://user:pass@my.http.proxy.com:8080?alpn=c-webrtc

This will add the header "ALPN: c-webrtc" to the HTTP proxy CONNECT
request.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4212>
2023-08-17 00:45:05 +00:00
Marcin Kolny
3c32ef4854 qroverlay: fix updating "data" property in qroverlay element
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5175>
2023-08-13 16:04:29 +00:00
Tim-Philipp Müller
1233b8a027 lc3: fix pkg-config file lookup
There's a mismatch between the pkg-config file ('lc3')
and the subproject/wrap which meant an installed liblc3
wasn't picked up.

Fixes #2883

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5151>
2023-08-08 22:12:29 +00:00
Jan Alexander Steffens (heftig)
c9c7581c4e srt: Set SRTO_IPV6ONLY to 0 by default
Since SRT 1.5.2 this option must be explicitly set to `0` or `1` before
binding to `::`, or binding will fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5157>
2023-08-08 14:12:19 +00:00
Seungha Yang
5976f4b8d8 hlssink2: Always use forward slash separator
g_build_filename() will insert back slash on Windows, and resulting
playlist will contain media segment path with back slash if
"playlist-root" property is specified

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5158>
2023-08-08 08:30:44 +00:00
Ryan Pavlik
e31407f9d2 webrtc: Fix docs for create-data-channel action signal
Initial line of the doc comment was incorrect, so the nicely written
docs were not being extracted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5131>
2023-08-01 21:17:06 +00:00
Nicolas Dufresne
0149d77eff waylandsink: Improve DMA DRM integration
Pass GstVideoInfoDmaDrm or GstVideoInfo whenever possible, avoiding passing
strange combination of GstVieoFormat + modifier. Even though we don't have any
at the moment, this also allow supporting GstVideoFormat that are not supported
in our DRM integration.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5120>
2023-08-01 14:55:23 -04:00
Cheah, Vincent Beng Keat
104daade0d waylandsink: Add gst_buffer_pool_config_set_params() to a pool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5103>
2023-07-27 17:08:27 +00:00
Cheah, Vincent Beng Keat
6e22846301 waylandsink: Add DRM modifiers support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5103>
2023-07-27 17:08:26 +00:00
Nirbheek Chauhan
d7d5d1ba93 webrtcbin: Fix support for glib older than 2.74
G_CONNECT_DEFAULT was added in 2.74, and passing `0` in older versions
gets the same behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
6af8b3dd80 webrtcbin: don't hold the webrtc lock over on-new-transceiver emission
Could potentially produce a deadlock if the direction is changed in the
callback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
77e01571c8 webrtc: don't disallow transceiver direction changes
Initial testing seems to suggest that we support them reasonably well
(at least for BUNDLEd streams).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Matthew Waters
13f4066580 webrtc: add check for negotiation on transceiver direction changes
As required by the webrtc specification.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5045>
2023-07-19 13:01:49 +00:00
Seungha Yang
31c1cf0150 qt6d3d11: Set sampler filtering method
QQuickItem::smooth property doesn't seem to be propagated to
newly created QSGSimpleTextureNode automatically.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2793
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5004>
2023-07-11 12:14:17 +00:00
Philippe Normand
424a78c9b9 webrtcbin: Prevent critical warning when creating an additional data channel
The max_channels value wasn't clamped to 65534 in all situations.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5001>
2023-07-10 14:08:09 +00:00
Taruntej Kanakamalla
33bcbad782 lc3: add unit test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4376>
2023-07-05 03:00:43 +00:00
Taruntej Kanakamalla
1865c87ec6 lc3: plugin for LC3 audio codec
lc3enc:
- encodes raw audio into lc3 format
- uses the default bitrate property and frame duration
from the caps to determine the byte count of
the encoded frames if it is not specified in
the downstream caps after negotiation
- uses the same byte count value for all the channels
- all the common session configuration parameters
are passed in the src caps

lc3dec:
- decodes an lc3 encoded audio
- sink caps should contain all the common session configuration
params
- uses frame_duration and frame_bytes (byte count) in the sink
caps as parameters along with sample rate and channel count
- byte count is same for all the channels

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4376>
2023-07-05 03:00:43 +00:00
Philippe Normand
d317379287 webrtcstats: Properly report IceCandidate type
strcmp returns a positive value if s1 is greater than s2, while we actually
needed to check equality here.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4952>
2023-07-03 03:51:53 +00:00
Jan Alexander Steffens (heftig)
565f9d18ae srt: Always format reject reason code
`srt_rejectreason_str` doesn't give us a unique string for every
possible reason. Peers can define their own reasons and SRT just gives
us the string `"Application-defined rejection reason"` for all of them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4948>
2023-07-02 13:36:42 +00:00
Haihua Hu
fb2b64ea7f dashsink: add property to set suggested presentation delay of MPD
add property suggested-presentation-delay to configure MPD info

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4687>
2023-06-25 15:40:18 +00:00
Seungha Yang
7b4e1fd602 qt6d3d11: Add Direct3D11 Qt6 QML sink
Adding Direct3D11 backend Qt6 QML videosink element, qml6d3d11sink.
Implementation details are similar to the qt6 plugin in -good
but there are a few notable differences.

* qml6d3d11sink accepts all GstD3D11 supported video formats (e.g., NV12).
* Scene graph (owned by qml6d3d11sink) will hold dedicated and sharable
  RGBA texture which belongs to Qt6's Direct3D11 device, instead of sharing
  GStreamer's own texture with Qt6.
* All rendering operations will be done by using GStreamer's Direct3D11 device.
  Specifically, upstream texture will be copied (in case of RGBA)
  or converted to the above mentioned Qt6's sharable texture.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3707>
2023-06-21 15:32:17 +00:00
Arun Raghavan
e1139e740a webrtcdsp: Deal with echo probe info not being available
Even if we don't yet know what the echo probe format is, we want to be able to
provide silence for the reverse path, so that when the probe becomes available,
there is no ambiguity around what time period the new set of samples are for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
2023-06-14 20:08:52 +00:00
Nirbheek Chauhan
fade0748d1 webrtcdsp: Map probe buffers with probe info, not dsp info
The probe's info may not precisely match the dsp's info. For instance,
the number of channels or their layout might be different.

```
GStreamer-Audio-CRITICAL **: 16:21:32.899: the GstAudioInfo argument is not equal to the GstAudioMeta's attached info
```

This broke in d5755744c3.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4849>
2023-06-14 20:08:52 +00:00
François Laignel
32fbad8d39 srtpdec: fix Got data flow before segment event
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:

> Got data flow before segment event

The problematic sequence is the following:

1. An RTCP buffer is being handled by the chain function for the
   `rtcp_sinkpad`. Since, this is the first buffer, we try pushing the sticky
   events to `rtcp_srcpad`.
2. At the same moment, the element is being transitioned from PAUSED to READY.
3. While checking and pushing the sticky events for `rtcp_srcpad`, we reach the
   Segment event. For this, we try to get it from the "otherpad", in this case
   `rtp_srcpad`. In the problematic case, `rtp_srcpad` has already been
   deactivated so its sticky events have been cleared. We won't be pushing any
   Segment event to `rtcp_srcpad`.
4. We return to the chain function for `rtcp_sinkpad` and try pushing the
   buffer to `rtcp_srcpad` for which deactivation hasn't started yet, hence the
   "Got data flow before segment event".

This commit:

- Adds a boolean return value to `gst_srtp_dec_push_early_events`: in case the
  Segment event can't be retrieved, `gst_srtp_dec_chain` can return  an error
  instead of calling `gst_pad_push`.
- Replaces the obsolete `gst_pad_set_caps` with `gst_pad_push_event`. The
  additional preconditions checked by previous function are guaranteed here
  since we push a fixed Caps which was built in the same function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4844>
2023-06-14 11:59:33 +00:00
François Laignel
96450f4c59 srtpdec: fix assertion 'parent->numsinkpads <= 1' failed
A race condition can occur in `srtpdec` during the READY -> NULL transition:
an RTCP buffer can make its way to `gst_srtp_dec_chain` while the element is
partially stopped, resulting in the following critical warning:

> assertion 'parent->numsinkpads <= 1' failed

This can occur when the first RTCP buffer is received during the READY -> NULL
transition. If deactivation of the `rtp_srcpad` has already reached
`post_activate`, the sticky events are removed from this Pad. In this case,
`gst_srtp_dec_push_early_events` branches to the generation of a stream id
using `gst_pad_create_stream_id`. This function ensures that the element
doesn't own more than 1 sink pad. Since `srtpdec` owns two of them, the
assertion fails.

This commit uses `gst_element_decorate_stream_id` which doesn't perform this
check. The preconditions is not necessary in this particular context since the
stream id for the RTP / RTCP pads are derived from the same id.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4844>
2023-06-14 11:59:33 +00:00
Aaron Boxer
e624e7c695 onnxobjectdetector: gracefully handle Ort exceptions rather than dumping core
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4765>
2023-06-05 17:47:58 +00:00
Matthew Waters
c3af29db1e build/android: remove all references to gnustl
Not needed anymore with NDK R25.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4747>
2023-06-03 23:21:34 +00:00
Arun Raghavan
d5755744c3 webrtcdsp: Update code for webrtc-audio-processing-1
Updated API usage appropriately, and now we have a versioned package to
track breaking vs. non-breaking updates.

Deprecates a number of properties (and we have to plug in our own values
for related enums which are now gone):

  * echo-suprression-level
  * experimental-agc
  * extended-filter
  * delay-agnostic
  * voice-detection-frame-size-ms
  * voice-detection-likelihood

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2943>
2023-06-01 09:34:37 +00:00
Colin Kinloch
82c449ce00 waylandsink: Emit "map" signal boarder surface is ready
This allows gtkwaylandsink to queue a draw of its gtk widget at the
correct time, avoiding a race.

Signed-off-by: Colin Kinloch <colin.kinloch@collabora.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4722>
2023-05-31 18:57:56 +00:00
Jan Alexander Steffens (heftig)
4008b872bb fdkaacdec: Support up to 5 rear channels
The `switch (n_rear)` supports up to 5 rear channels, but our channel
set only had space for 3. Size the set properly to fix this.

This didn't actually cause any memory unsafety as `PUSH_CHAN` would stop
incrementing `n_rear` if the channel set is already full.

Thanks to @alatiera for noticing this.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4712>
2023-05-30 14:18:08 +02:00
Jordan Petridis
6032f51162 openjpegenc: do not set bpp field on opj_image_cmptparm_t
It's deprecated in favor of the .prec field which we already set.

https://github.com/uclouvain/openjpeg/pull/1383/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4715>
2023-05-26 20:24:27 +00:00
Ruben Gonzalez
059965fe53 doc: Fix newline char between authors
Found running `gst-inspect-1.0 -a |& grep -v ":" | grep @`

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4682>
2023-05-20 05:48:23 +00:00
Víctor Manuel Jáquez Leal
7c9d88d586 vkdownload: input memories may not match output memories
Split the iterations, one for images and another for buffers, while first
barrier on images, and later in buffers after copy.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
2023-05-19 04:26:30 +00:00
Víctor Manuel Jáquez Leal
e177080bec vulkan: number of memories in buffer rather than number of planes
New vulkan formats don't match the number of planes with the number of memories
attached to the buffer. This patch changes the pattern of using planes for
traverse the memories with the number of attached memories.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4351>
2023-05-19 04:26:29 +00:00
Sangchul Lee
2661bf6d9a webrtc: Add data-channels-opened/closed to get-stats signal documentation
With contributions from: Matthew Waters <matthew@centricular.com>

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2127>
2023-05-18 12:08:55 +00:00
Martin Nordholts
85e3f31740 webrtc: Track stats for data channels opened and closed
Track data channel stats for `dataChannelsOpened` and
`dataChannelsClosed` in `RTCPeerConnectionStats` as specified by
https://www.w3.org/TR/webrtc-stats/#dictionary-rtcpeerconnectionstats-members

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4638>
2023-05-18 04:31:16 +00:00