Commit graph

6642 commits

Author SHA1 Message Date
Nirbheek Chauhan 3885efea03 meson: Add the name of the provided dependency to pixman.wrap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6351>
2024-03-23 13:08:15 +00:00
Nirbheek Chauhan ab7e253667 meson: Fix various build issues with opus-1.5.1
All taken from upstream, can be removed on bump.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6351>
2024-03-23 13:08:15 +00:00
Nirbheek Chauhan 492d3afad3 meson: Make wrap downloads smaller
Make all git clones depth=1 and switch opus to the tarball.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6351>
2024-03-23 13:08:15 +00:00
Ruben Gonzalez 778381fba6 ristsrc: Clean caps instead of unref
Fix issue unrefering null caps. Better solution than

```
  if (src->caps)
      gst_caps_unref (src->caps);
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6432>
2024-03-23 10:31:57 +01:00
Hou Qi 024d3ab051 v4l2: Also set max_width/max_height if enum framesize fail
Some driver doesn't implement enum_framesize. The maximum supported
size can be got by trying format with a very large size. Also need
to set max_width/max_height for this case, otherwise default encoded
buffer size 256kB is too small.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6416>
2024-03-22 16:02:51 +00:00
Seungha Yang 0c148a96db d3d12: Add IPC elements
Adding d3d12ipcsink and d3d12ipcsrc elements, equivalent to D3D11 ones.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428>
2024-03-22 23:09:12 +09:00
Seungha Yang 0006ad1f86 d3d12: Add buffer copy helper method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428>
2024-03-22 23:09:05 +09:00
Seungha Yang c612af6d42 d3d12commandqueue: Always invoke notify asynchronously
Otherwise the callback thread is unpredictable

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428>
2024-03-22 20:45:01 +09:00
Seungha Yang 18091f0115 d3d12memory: Update for API interop
Add support for destroy notify in case of wrapped memory, and
allow setting external fence for interop

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428>
2024-03-22 20:01:16 +09:00
Seungha Yang 0d559bead9 d3d12: Make primary fence sharable
Create primary fence with D3D12_FENCE_FLAG_SHARED flag so that
the fence can be shared with other APIs or processes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6428>
2024-03-22 18:57:26 +09:00
Wojciech Kapsa 71e879236f webrtc: Change requirement to libnice 0.1.22
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6424>
2024-03-22 08:49:32 +00:00
Philippe Normand f8e524842b subprojects: Bump to dav1d 1.4.1
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6420>
2024-03-21 20:32:27 +00:00
Tim-Philipp Müller 4790a44d10 Revert "audiobasesink: Don't wait on gap events"
This reverts commit 8e923a8e2d.

This caused regressions, see #3303.

Without this commit, osxaudiosrc ! osxaudiosink won't work
right, but since that hasn't really been a huge problem
for years it's probably best to revert this until a proper
solution can be figured out.



(cherry picked from commit f04f86f3ee)



(cherry picked from commit 93255efece)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6405>
2024-03-21 03:19:03 +00:00
Thomas Goodwin fde2495218 gst-inspect: fix --atleast-version to be implicitly applied to --exists
The --atleast-version implies --exists, but the implementation in
earlier commits had the version check applied any time the --exists was
checked, and the default value of the major and minor versions were set
to the GStreamer major and minor versions.  The resulting behavior would
have gst-inspect return '1' if the plugin's version didn't match
gstreamer's even when --atleast-version was not specified in the command
line args.  The change in this patch removes that behavior and adds
tests to verify that if --exists is specified WITHOUT --atleast-version
the version check will NOT be applied.  If both arguments are specified
and the version does not match the arg-supplied version number, a new
return code of '2' is used to uniquely identify the failure.

Fixes #3246

Signed-off-by: Thomas Goodwin <thomas.goodwin@laerdal.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6191>
2024-03-20 21:19:07 +00:00
Thibault Saunier 2a4b9c8dc1 validate: reporter: Use an MT safe weak ref to reporter for GLog handling
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6412>
2024-03-20 16:45:34 +00:00
Piotr Brzeziński 982c73dfdd vtdec: Ignore output loop errors in drain() if we're flushing
In an early non-linked scenario, this was causing a ton of criticals about the queue array,
because the output callback would still fire for leftover frames that were still being processed by VT
at the time the output loop stopped. This makes sure they're flushed correctly as well.

Also renames gst_vtdec_loop to gst_vtdec_output_loop for consistency with related functions.

wip

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6397>
2024-03-20 13:07:25 +00:00
Piotr Brzeziński 112951ce55 vtdec: Fix a deadlock during ProRes playback
Sometimes a call to negotiate (and thus drain) can happen from the output loop
(via finish_frame()), which will tell VT to output all internal frames, but that won't succeed
if we happen to decide to wait for the queue to empty (because the loop is waiting for draining to finish and
will not make space in the queue!). This commit adds an override for the queue size limit if we're draining/flushing.

This bug could happen for any formats, but was especially obvious for ProRes, which has dpb_size of 0.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6397>
2024-03-20 13:07:25 +00:00
Seungha Yang 17f92ab400 asio: Add support for MinGW build
Drop MSVC specific bits and remove unused dependency

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6404>
2024-03-20 10:53:16 +00:00
Seungha Yang f0761a7358 asio: Drop external SDK header dependency
Build ASIO plugin using our tiny SDK header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6404>
2024-03-20 10:53:16 +00:00
Edward Hervey 5280f0b733 adaptivedemux2: Add libsoup tracing debug
Provides more information for debugging

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6409>
2024-03-20 09:48:12 +00:00
He Junyan 3b57825ca6 va: Implement the vavp9enc plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3293>
2024-03-20 08:53:11 +00:00
He Junyan 802a0eb9df test: add vp9 bitwriter test case
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3293>
2024-03-20 08:53:11 +00:00
He Junyan 142448bbed vp9bitwriter: Add the VP9 bit writer helper functions
In this first version, we only implement the "show existing frame"
and super frame writting. Other frame header types writting can
be added when needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3293>
2024-03-20 08:53:11 +00:00
Edward Hervey 3d500636a9 adaptivedemux2: Don't use g_str_equal on potentially NULL strings
It is only meant to be used as a callback. The fallback macro uses strcmp which
doesn't handle NULL strings gracefully. Instead use g_strcmp0

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey ab11c20d59 hlsdemux2: Avoid NULL pointer usage
The pending/current variant are both NULL when the demuxer is resetted.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey 46bb0bfa57 adaptivedemux2: Handle context going away
This issue can happen when the scheduler loop was stopped (and context went
away). We no longer want to push/pop main context threads.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Edward Hervey 8438c3f567 hlsdemux2: Improve detection of playlist updates
In the case we are not updating an existing playlist, we only want to reset the
download error count if the URI we are downloading was not the previous one we
were trying to load

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6392>
2024-03-19 13:25:41 +00:00
Seungha Yang b417c62940 d3d12device: Set debugging friendly object name
Build object name with DXGI adapter index

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:55 +00:00
Seungha Yang 6de5eab1e4 d3d12: Suppress expected leak reports
Such leaks are expected and intended ones

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:55 +00:00
Seungha Yang a1c8fc6163 d3d12device: Keep device object permanently
Because ID3D12Device objects are singletons per adapter,
GstD3D12Device was following the API design, that is, keep track
of global GstD3D12Device objects and reuses it.
That means ID3D12Device object can be released at the time
when GstD3D12Device is destroyed.

But exetrnal APIs such as NVENC does not seem to be happy
with the released ID3D12Device, that could be a driver bug though.

Let's hold already opened ID3D12Device permanently without releasing
it for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:55 +00:00
Seungha Yang 17d6c7350c d3d12commandqueue: Add drain method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:55 +00:00
Seungha Yang 393fb4733c d3d12: Use native device handle if possible
Various abstraction objects such as command queue/list/allocator
can be constructed without GstD3D12Device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:55 +00:00
Seungha Yang 331522210f d3d12commandqueue: Allow empty command list
Just increase fence value and signal the queue in that case

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6395>
2024-03-19 12:03:54 +00:00
Seungha Yang 3e912a2214 examples: d3d11: Add inter-device synchronization example
Adding an example to demonstrate resource sharing between
D3D11 device and GPU synchronization

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6303>
2024-03-19 10:55:19 +00:00
Edward Hervey 42e24c32e5 uridecodebin3: Don't hold lock when posting messages or signals
There's a very good chance that the receiver might react on those synchronously
and call back into uridecodebin3 (ex: for setting the next URI).

Make sure we release the lock if we need to do that.

Fixes #3400

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6402>
2024-03-19 09:34:18 +01:00
Ruijing Dong bc858976db va: enc : checking surface alignment attribute
Apply surface alignment attribute when availalbe,
also fix frame cropping issue for va h265 encoder.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6282>
2024-03-18 16:34:42 +00:00
L. E. Segovia 1f119b2035 soundtouch: Fix build failure with Apple Clang caused by missing cpp_std
Apple Clang sets C++98 by default. I'm applying C++14 to account for Meson's
lack of support/fallback for `cpp_std=c++11`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6374>
2024-03-18 14:28:38 +00:00
Edward Hervey c1ac015325 uridecodebin3: Handle potential double redirection errors
Some elements (like qtdemux) might post a redirection error message twice. We
only want to handle it once.

Fixes #3390

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6389>
2024-03-18 13:30:24 +00:00
Mark Nauwelaerts 324563b158 dvdspu: avoid null dereference
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6386>
2024-03-18 09:49:13 +00:00
Philippe Normand 76d1bd05b2 play: Fix a critical warning in error callback
`on_error()` can be called with a NULL details structure, so in that situation
the `gst_structure_copy()` would raise a critical warning. Create an empty
structure instead of attempting to copy a NULL one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6385>
2024-03-17 11:18:37 +00:00
Seungha Yang 8acf844fed d3d12: Fix SDK debug layer activation
Debug layer must be enabled before creating device. Otherwise
already opened devices before the activation will be removed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6382>
2024-03-16 21:25:38 +09:00
Piotr Brzeziński 2ec7f9f9b3 avaudenc: Add simple 16 channel encoding test
Used to be crashing because of a double-free introduced years ago and never really noticed, so let's add a test to
make sure it doesn't happen again.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6373>
2024-03-15 12:30:04 +00:00
Edward Hervey b1f4dcb068 decodebin3: Post error messages if there are no streams to output
This could happen because:
* No streams were selected
* Or we end up with no stream selected

Also post a warning message if we are missing plugins but there are other
streams to output

Fixes #3360

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6323>
2024-03-14 18:15:33 +00:00
Edward Hervey 11b1f70aea decodebin3: Remove failing stream from active selection also
It gets added in get_output_slot()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6323>
2024-03-14 18:15:33 +00:00
Robert Mader 5189e8b956 v4l2codecs: decoders: Add DMA_DRM caps support
In order to simplify caps negotiations for clients and, notably, be more
compatible with va* decoders.
Crucially this allows clients to know ahead of time whether buffers will
actually be DMABufs.

Similar to GstVaBaseDec we only announce system memory caps if the peer
has ANY caps. Further more, and again like va decoders, we fail in
`decide_allocation()` if DMA_DRM caps are used without VideoMeta.
Apart from buggy peers this can happen e.g. when a peer with ANY caps
is used in combination with caps filters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5890>
2024-03-14 17:32:13 +00:00
Robert Mader 513d0d8cbb v4l2codecs: decoders: Introduce and use set_output_state helper class
Allowing us to avoid some code duplication. This will become more
important with upcoming changes to caps generation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5890>
2024-03-14 17:32:13 +00:00
Robert Mader a95acbcc11 v4l2codecs: decoder: Clean up select_src_format()
Most importantly rely on video info helpers instead of manual parsing
of caps, which will allow us to use additional helpers in the future.

While on it, tighen the check for supported formats - failing that
indicates a bug in caps negotiation - and make some style changes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5890>
2024-03-14 17:32:13 +00:00
Robert Mader 73b69d8ca0 v4l2codecs: decoder: Generalize size enumeration caps
By reducing the generated caps to the minimal number of fields and
using intersections instead of merges. This will allow us to reuse the
result in the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5890>
2024-03-14 17:32:13 +00:00
Robert Mader 65896dab75 v4l2codecs: decoders: Use src template for negotiation filter
This ensures we don't create filter caps that are not supported by the
individual codec implementations, as well as that the resulting caps
have the required fields so they can be turned into a GstVideoFormat.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5890>
2024-03-14 17:32:13 +00:00
Piotr Brzeziński 55136c30c4 avaudenc: Avoid double-freeing frame's extended data
This occured when attempting to encode 16 channel audio, would crash on the first buffer.
We only need to store ext_data, old ext_data_array (frame->extended_data) is already freed by `av_frame_unref`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6359>
2024-03-14 16:35:21 +00:00
Piotr Brzeziński a53ea3c61c avcodecmap: Increase max AAC channels to 16
This is the maximum amount supported by aacenc. 8-channel output fully works.
16-channel also encodes fine, but codec-utils isn't able to parse its channel config,
so output level will not be shown in caps. For that to work, GASpecificConfig parsing
needs to be implemented. It's not a critical issue and can be worked on at a later date.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6359>
2024-03-14 16:35:21 +00:00
Seungha Yang 7aff9c8600 asio: Fix {input,output}-channels property handling
Fixing regression introduced by the commit 06dc931b52

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6370>
2024-03-14 21:01:40 +09:00
Sebastian Dröge 6c3d09e279 ptp: Initialize expected DELAY_REQ seqnum to an invalid value
This allows distinguishing pending syncs that didn't have a DELAY_REQ
sent from ones that did but used a seqnum of 0, like the very first one.

Specifically, if the first one or more syncs are still pending and we
send the first DELAY_REQ for a later pending sync, then the DELAY_RESP
would've been wrongly associated to the very first pending sync because
of the seqnum.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6361>
2024-03-13 22:24:56 +00:00
Seungha Yang 1d8138fd18 d3d11device: Fix adapter LUID comparison in wrapped device mode
Fix integer type mismatching

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3382
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6358>
2024-03-13 20:18:29 +00:00
Alexander Slobodeniuk 650534c940 rtspsrc: remove 'deprecated' flag from the 'push-backchannel-sample' signal
It seems that it was added by accident when copying from push-backchannel-buffer

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6355>
2024-03-13 19:32:46 +00:00
Thomas Klausner 4632c623bf shmallocator: fix build on Illumos
Closes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3370

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6321>
2024-03-13 18:48:27 +00:00
Alexander Slobodeniuk 6a6a4bf1a4 d3d11device: raise 'device-removed' signal on DXGI_ERROR_DEVICE_REMOVED
When this error gets caught the GstD3D11Device object raises the new
"device-removed" signal. This allows to handle the error from outside:
stop the playback, re-create the player, replace the catched GstContext by
the new one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6193>
2024-03-13 17:25:31 +00:00
Michiel Westerbeek a4aa9e197e gstcudaconvertscale, gstvavpp, videoconvertscale: downgrade 'Can't keep DAR' to debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5730>
2024-03-13 16:06:56 +00:00
Sebastian Dröge 38011a01dc mpg123audiodec: Correctly handle the case of clipping all decoded samples
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3365

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6318>
2024-03-13 12:48:36 +00:00
He Junyan a953dc3b1a test: Correct the API return type of {h264,h265,av1}bitwriter
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6354>
2024-03-13 18:49:13 +08:00
Seungha Yang 94dfef68e1 d3d12device: Fix IDXGIFactory2 leak
factory passed to gst_d3d12_device_find_adapter() method is valid
handle already

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6340>
2024-03-12 22:06:01 +00:00
Sebastian Dröge 121e52886b videoparsers: Don't verbosely warn about CEA_708_PROCESS_EM_DATA_FLAG not being set
And the same for CEA_708_PROCESS_CC_DATA_FLAG. This is not really a
problem and was polluting logs with warnings for every single frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6336>
2024-03-12 21:26:18 +00:00
L. E. Segovia 71510860af meson: Require tinyalsa >= 1.1.0 when building its plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6311>
2024-03-12 20:30:11 +00:00
L. E. Segovia 9c8549c31c tinyalsasink: Fix missing const and deprecations with tinyalsa v2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6311>
2024-03-12 20:30:11 +00:00
Piotr Brzeziński e9802f5f41 macos: Add Apple AAC encoder (atenc)
Adds the `atenc` element capable of encoding AAC-LC audio, using the AudioToolbox framework.
It's able to encode up to 7.1 channel configurations.
Comes with basic knobs for rate control (bitrate for CBR, quality for VBR).

Support for more profiles (LD, HE-AAC) should be simple, but is not included here because of bugs
with parsing of the AudioSpecificConfig.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6254>
2024-03-12 19:50:06 +00:00
Nicolas Dufresne bcad005d05 glupload: Do not propose allocators with sysmem
None of the GL allocators actually offer a generic alloc() implementation. As a
side effect, they cannot be offered as they don't work with generic video
buffer pool.

Our specialized buffer pool can be dropped by tee or alphacombine as sharing the
same buffer pool over two branch is not supported by the pool API.

Fixes #3372

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6327>
2024-03-12 19:02:54 +00:00
Seungha Yang c9aaf39279 cuda,d3d11,d3d12bufferpool: Disable preallocation
Do not chain up to parent's GstBufferPool::start() which will do
preallocation. We don't want it to be preallocated
since there are various cases where negotiated downstream buffer pool is
not used at all (e.g., zero-copy decoding, IPC elements).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6326>
2024-03-12 18:07:29 +00:00
Antonio Larrosa 7b8fa42f8a va{h264,h265,av1}enc: fix potential crash on devices without rate control
This fixes a crash in `gst_va_h264_enc_class_init` and `gst_va_h265_enc_class_init`
(and probably also in gst_va_av1_enc_class_init) when calling
`g_object_class_install_properties (object_class, n_props, properties);`

When rate_control_type is 0, the following code is executed in :

```
  } else {
    n_props--;
    properties[PROP_RATE_CONTROL] = NULL;
  }
```

n_props has initially a value of N_PROPERTIES but PROP_RATE_CONTROL
is not the last element in the array, so it's making
g_object_class_install_properties fail to iterate over the
properties array.

This applies the same fix to gstvah264enc.c, gstvah265enc.c and
gstvaav1enc.c.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6319>
2024-03-12 16:58:07 +00:00
Antonio Larrosa bd97973ce0 registry, ptp: Canonicalize the library path returned by dladdr
On systems using UsrMerge (like openSUSE or Fedora), /lib64 is
a symlink to /usr/lib64. So dladdr is returning the path to
the gstreamer library in /lib64 in priv_gst_get_relocated_libgstreamer.
Later gst_plugin_loader_spawn tries to build the path to the
gst-plugin-scanner helper from /lib64 and ends up trying to use
/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner which doesn't exist.

By canonicalizing the path with a call to realpath, gst-plugin-scanner
is found correctly under
/usr/lib64/../libexec/gstreamer-1.0/gst-plugin-scanner

Similar change applied to gstreamer/libs/gst/net/gstptpclock.c

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6322>
2024-03-12 15:51:36 +00:00
Nirbheek Chauhan 77831d6142 gsturi: Sort by feature name to break a feature rank tie
This matches autoplug in other places such as decodebin, otherwise we
will pick "randomly" based on the order in which plugins are
registered, which is mostly dependent on the order in which readdir()
returns items.

So let's make it predictable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6227>
2024-03-12 14:25:10 +00:00
Jurijs Satcs 6a9bf8592a mpegtsmux: allow to disable SCTE NULL by setting interval to 0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6284>
2024-03-12 11:15:58 +00:00
Piotr Brzeziński d3fba31da0 macos: Move atdec from applemedia (-bad) to osxaudio (-good)
osxaudio has a few helper methods potentially useful in atdec (or future atenc), like GStreamer -> CoreAudio
channel mapping. Doesn't make sense to duplicate them in applemedia, and atdec is the only audio-oriented
element there anyway.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6223>
2024-03-12 09:55:10 +00:00
Matthew Waters a26b363d3e closedcaption: produce valid cea608 padding by default
Cea608 (valid) padding removal is available on the input side of ccconverter
or configurable on cccombiner.  cccombiner can now configure whether
valid or invalid cea608 padding is used and for valid padding, how long
after valid non-padding to keep sending valid padding.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6300>
2024-03-12 02:49:01 +00:00
Piotr Brzeziński 3243c5fe94 audiovisualizer: Don't wrap temporary memory in buffers
Avoids potentially ending up with the buffermemory pointing to already-freed or reused addresses.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6320>
2024-03-11 18:18:01 +00:00
Piotr Brzeziński 9c084faa75 qtdemux: Fix wrapping temporary memory in buffers
That memory can disappear at any moment, doesn't cost much to just copy those few bytes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6320>
2024-03-11 18:18:01 +00:00
Piotr Brzeziński 15e0affc98 audioencoder: Avoid wrapping temporarily mapped memory with a GstBuffer and passing that to subclass
Memory from gst_adapter_map() could live shorter than the GstMemory that the GstBuffer wraps around it, which in lucky
cases 'just' caused a re-use of the same memory for multiple (potentially still in use!) input buffers, but could easily
end up pointing to an already-freed memory.

Manifested when an AudioToolbox encoder kept getting silence inserted in seemingly random circumstances, turned out
to be the memory being re-used by GStreamer at the same time that the AT API was processing it...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6320>
2024-03-11 18:18:01 +00:00
Edward Hervey 0f1dfc2db0 playbin3: Remove un-needed URI NULL check
This will mimic the playbin2 behaviour, which sets the "next" entry to be
NULL.

The biggest impact this has is that when going back to READY the current play
entry will be discarded (instead of being kept around for when you go back to
PAUSED/PLAYING).

Fixes #3371

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6324>
2024-03-11 17:33:04 +00:00
Mikhail Rudenko 05ef1bbc06 rtsp-stream: clear sockets when leaving bin
Since commit 4d86f994, when setting an RTSP media both shared and
reusable, streaming cannot be restarted after the first time all the
clients disconnect. That happens because the sockets (unlike
addresses) of GstRTSPStream are not cleared in
gst_rtsp_stream_leave_bin, and on restart sockets and addresses are
not allocated in gst_rtsp_stream_allocate_udp_sockets, and then the
check in create_sender_part fails. Fix this by clearing sockets in
gst_rtsp_stream_leave_bin.

Fixes gstreamer/gst-rtsp-server#113

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6325>
2024-03-11 18:22:38 +03:00
He Junyan 861c1a44be va: av1enc: Init the output_frame_num when resetting gf group
Fixes: #3359
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6308>
2024-03-11 12:38:57 +00:00
Edward Hervey 5f7062136d decodebin3: Handle race switching on pending streams
find_slot_for_stream_id() will return a slot which has the request stream-id as
active_stream *or* pending_stream (i.e. the slot on which that stream is
currently being outputted or will be outputted).

When figuring out which slot to use (if any) we want to consider stream-id
which *will* appear on a given slot which isn't outputting anything yet the same
way as if we didn't find a slot yet.

Fixes races when doing intensive state changes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6270>
2024-03-11 11:13:59 +00:00
Edward Hervey e03e2308d7 decodebin3: Clear select streams seqnum when resetting
At this point there's definitely no pending select streams

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6270>
2024-03-11 11:13:59 +00:00
Edward Hervey 344acfe4e8 decodebin3: Only post collection message on actual updates
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6270>
2024-03-11 11:13:59 +00:00
Edward Hervey 33fe063f50 decodebin3: Clear the global collection when resetting
This avoids having stray collections when re-using decodebin3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6270>
2024-03-11 11:13:59 +00:00
Edward Hervey 086ecb008f avviddec: Fix how we get back the codec frame
With the new copy_opaque system, the corresponding frame is stored in the
picture opaque ref.

This also handles the case where the "regular" opaque might be empty in the
case of "DECODE_ONLY" frames, since it that field is set in `get_buffer2()`
which might not be called for those frames

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6301>
2024-03-11 10:17:41 +00:00
Edward Hervey eacd5c1cb1 avviddec: Improve debug statements
Add SFN to better track what is going on

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6301>
2024-03-11 10:17:41 +00:00
Nirbheek Chauhan 3bed35c342 rtspsrc: Don't invoke close when stopping if we've started cleanup
When we're doing a state change from PLAYING to NULL, first we invoke
gst_rtspsrc_loop_send_cmd_and_wait (..., CMD_CLOSE, ...) during
PAUSED_TO_READY which will schedule a TEARDOWN to happen async on the
task thread.

The task thread will call gst_rtspsrc_close(), which will send the
TEARDOWN and once it's complete, it will call gst_rtspsrc_cleanup()
without taking any locks, which frees src->streams.

At the same time however, the state change in the app thread will
progress further and in READY_TO_NULL it will call gst_rtspsrc_stop()
which calls gst_rtspsrc_close() a second time, which accesses
src->streams (without a lock again), which leads to simultaneous
access of src->streams, and a segfault.

So the state change and the cleanup are racing, but they almost always
complete sequentially. Either the cleanup sets src->streams to NULL or
_stop() completes first. Very rarely, _stop() can start while
src->streams is being freed in a for loop. That causes the segfault.

This is unlocked access is unfixable with more locking, it just leads
to deadlocks. This pattern has been observed in rtspsrc a lot: state
changes and cleanup in the element are unfixably racy, and that
foundational issue is being addressed separately via a rewrite.

The bandage fix here is to prevent gst_rtspsrc_stop() from accessing
src->streams after it has already been freed by setting src->state to
INVALID.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6302>
2024-03-11 09:15:50 +00:00
Edward Hervey 73152b53ff decodebin3: Provide clear error message if no decoders present
If we don't do this we will end up with a more cryptic error message (not-linked
error from some upstream component).

Fixes #3198

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6317>
2024-03-11 09:17:09 +01:00
Chris Spencer 1032d58187 vkmemory: invalidate non-coherent memory when mapping for read
Mapping non-coherent memory does not implicitly invalidate the host caches.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6310>
2024-03-11 01:55:44 +00:00
Chris Spencer 9412565221 vulkan/operation: use timeline semaphore fallback if sync2 not supported
gst_vulkan_operation_add_dependency_frame does not fall back to the
timeline semaphore implementation if VK_KHR_synchronization2 is compiled
in, but not supported by the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6309>
2024-03-11 00:58:40 +00:00
Chris Spencer 7701e9ffeb vulkan/operation: add missing unlock
gst_vulkan_operation_add_dependency_frame does not release its lock if
support for VK_KHR_timeline_semaphore/VK_KHR_synchronization2 is compiled
in, but not supported by the driver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6309>
2024-03-11 00:58:40 +00:00
Jordan Petridis 95bafc4934 rsvg: Add direct dependency on cairo
We include cairo.h in the element so we should also
declare it in meson.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6306>
2024-03-08 19:01:30 +02:00
Seungha Yang 2e1eaaec5e ges: Fix critical warning
GStreamer-CRITICAL **: 20:44:38.256: gst_debug_log_full_valist:
assertion 'category != NULL' failed

Make sure debug category initialized.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6304>
2024-03-08 21:00:51 +09:00
François Laignel 7d5bb1ea7a webrtc: add all SSRC attributes getting CAPS for a PT
The transport stream only returned the CAPS for the first matching PT entry
from the `ptmap`. Other SSRC with the same PT where not included. For a stream
which bundled multiple audio streams for instance, only the first SSRC was
knowed to the SSRC demux and downstream elements.

This commit adds all the `ssrc-` attributes from the matching PT entries.

The RTP jitter buffer can now find the CNAME corresponding its SSRC even if it
was not the first to be registered for a particular PT.

The RTP PT demux removes `ssrc-*` attributes cooresponding to other SSRCs
before pushing SSRC specific CAPS to downstream elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6119>
2024-03-08 10:28:15 +00:00
François Laignel d83184cf9a sdp: accept empty attribute value represented as a NULL pointer
Some empty media attribute values are set to an empty string, others as a NULL
pointer. It seems that code is able to deal with both, except for the UTF8
validation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6119>
2024-03-08 10:28:15 +00:00
François Laignel aeaef7a7f0 webrtcbin: RFC5576 - early CNAME support
See RFC5576: have CNAME available to the rtpjitterbuffer before the the first
RTCP SR is received, for rapid synchronization. Similar to what was done for
RTSP (last 2 commits) of [MR 2132].

[RFC5576]: https://www.rfc-editor.org/rfc/rfc5576
[MR 2132]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6119>
2024-03-08 10:28:15 +00:00
Jan Schmidt d3e79077dc identity: Don't refuse seeks unless single-segment=true
identity only needs to configure the internal seek segment if it's
aggregating upstream segments into 1. If it's not, don't break
other seek behaviour by refusing (for example) instant-rate change
seeks.

Fixes: #3363
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6299>
2024-03-08 17:07:25 +11:00
Michael Tretter 5b3082257e meson: Fix description in qt options
The qt-x11 description contains a copy/paste error from the qt-wayland option.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6292>
2024-03-08 02:14:11 +00:00
Seungha Yang 4db7eb0290 d3d12screencapturesrc: Add support for WGC API
Adding support for window and monitor capturing by using
Windows Graphics Capture API.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6256>
2024-03-08 01:05:24 +09:00
Seungha Yang 63ef405131 d3d12memory: Implement NT handle caching and custom user data support
Same as the d3d11 memory implementation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6256>
2024-03-08 01:03:28 +09:00
Mathieu Duponchelle 04077ce906 onvif: tests: check for T flag on all packets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Mathieu Duponchelle 519546aea3 rtpgstpay: flush on EOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Mathieu Duponchelle 0631a59803 rtponviftimestamp: make sure to set E and T bits on last buffer of lists
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Sebastian Dröge b88d69b722 rtpgstpay: Delay pushing of event packets until the next buffer
And also re-timestamp them with the current buffer's PTS.

Not doing so keeps the timestamps of event packets as
GST_CLOCK_TIME_NONE or the timestamp of the previous buffer, both of
which are bogus.

Making sure that (especially) the first packet has a valid timestamp
allows putting e.g. the NTP timestamp RTP header extension on it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5173>
2024-03-07 14:02:33 +00:00
Seungha Yang 37578454b9 avviddec: Fix interlaced mode detection
Fixing regression introduced by the commit b46559102b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6285>
2024-03-07 11:53:07 +00:00
Elizabeth Figura e2167867d5 qtdemux: Do not set channel-mask to zero
Leave it uninitialized, so that the downstream decoder will initialize it appropriately. Setting it to zero is wrong.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6225>
2024-03-07 12:52:30 +02:00
Jan Schmidt f53dbb28b2 rtspsrc: Parse Speed/Scale before Range in responses
Parse the speed and scale in the server's response
*before* the range, so that the range start/stop
are swapped (or not swapped) correctly based
on the server's actual chosen values. Otherwise,
the old rate from the segment is used - what the
last seek asked for, but not necessarily what
the server chooses.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 57013e1a7c rtspsrc: Handle queries and events with no manager
When doing direct output with no session manager, we still
want to respond to queries and events from downstream, so
install the handlers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 4d2f000125 rtspsrc: return NO_PREROLL on PLAYING->PAUSED too
When transitioning back to PAUSED and rtspsrc is live, return
NO_PREROLL so the pipeline knows to skip preroll here too.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 8356bd04a8 rtponviftimestamp: Use gst_segment_to_stream_time_full()
In the situation where playback starts from a keyframe before
the target playback segment, then the first buffers will be
outside the configured segment and gst_segment_to_stream_time()
will return GST_CLOCK_TIME_NONE unconditionally.

If drop-out-of-segment is false, the RTP buffers will not be
dropped, but will be sent witout ONVIF extension timestamps
and given GST_CLOCK_TIME_NONE timestamps on the receiver.

Instead, use gst_segment_to_stream_time_full() to extrapolate
stream time outside the segment so that such buffers still
get assigned their correct timestamps on the receiver.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6248>
2024-03-06 17:50:53 +00:00
Jan Schmidt 4b107b60e7 dvbsubenc: Fix bottom field size calculation
Don't accidentally include the stuffing byte (if present)
into the bottom field size. It should only be included in the
total segment length.

Fixes problems with FFmpeg not rendering the subtitles
with a stuffing byte, giving a "Invalid object location!" error.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6250>
2024-03-06 16:47:38 +00:00
Piotr Brzeziński ca0d4dd6cc macos: Fix glimagesink not respecting preferred size
Cocoa version of glwindow only checks the preferred size upon window creation. glimagesink sets the size right before
calling gst_gl_window_show(), which might be way after the window is created in some cases. If the size was set too
late, glimagesink on macOS would remain 320x240 unless manually resized.

This change makes sure to resize the existing window when _show() is called.

Curiously, this has always been an issue, but went from manifesting every once in a while to being almost completely
broken once old event loop workarounds were removed and gst_macos_main() was introduced.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6185>
2024-03-06 15:48:03 +00:00
Jan Schmidt cca0bc31a7 gstsegment: Don't use g_return_val_if_fail()
Don't use g_return_val_if_fail() to catch the
open-ended segment or empty segment cases in
gst_segment_to_running_time_full()

g_return_val_if_fail() is for programmer errors,
and can be compiled out with a flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6219>
2024-03-06 14:48:50 +00:00
François Laignel 7b5a5afa3a ptp clock: fix annotations for gst_ptp_clock_new
* Set `name` as `nullable` same as for gst_ntp_clock_new.
* Set return value as nullable as the constructor can fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6251>
2024-03-06 12:17:17 +00:00
Sebastian Dröge df00962cb8 ajasink: Make logging between ajasrc and ajasink more consistent
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6208>
2024-03-06 11:09:58 +00:00
Sebastian Dröge 396aa55958 ajasrc: Improve clock handling
Provide a clock from the source that is a monotonic system clock with
the rate corrected based on the measured and ideal capture rate of the
frames.

If this clock is selected as pipeline clock, then provide perfect
timestamps to downstream.

Otherwise, if the pipeline clock is the monotonic system clock, use the
internal clock for converting back to the monotonic system clock.

Otherwise, use the monotonic system clock time calculated in the above
case and convert that to the pipeline clock.

In all cases this will give a smoother time than the previous code,
which simply took the difference between the driver provided capture
time and the current real-time clock time, and applied that to the
current pipeline clock time.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6208>
2024-03-06 11:09:58 +00:00
Sebastian Dröge 86e3009448 ajasrc: Move frame drop detection after the frame transfer
Otherwise there's a small window between querying the state and doing
the transfer in which a frame could be dropped, and we would then output
the frame right after the dropped one as if it was the dropped frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6208>
2024-03-06 11:09:58 +00:00
Sebastian Dröge 170bf0cc8e ajasrc: Improve debug output related to frame transfers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6208>
2024-03-06 11:09:58 +00:00
Sebastian Dröge 9ab9ceb964 ptp-helper: Fix clippy warning and simplify code a bit
warning: you seem to be trying to use `match` for an equality check. Consider using `if`
   --> ../subprojects/gstreamer/libs/gst/helpers/ptp/main.rs:246:17
    |
246 | /                 match ptp_message.message_type {
247 | |                     PtpMessageType::DELAY_REQ => {
248 | |                         if args.verbose {
249 | |                             trace!("Ignoring our own PTP message");
...   |
253 | |                     _ => (),
254 | |                 }
    | |_________________^

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6245>
2024-03-06 09:17:53 +00:00
He Junyan a5a1944db4 MSDK: Set the job type when create context from external handle
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6221>
2024-03-06 05:22:23 +00:00
He Junyan 1a78d61b9f vah265enc: Set backward_num to 1 in low delay mode
In low delay B mode, the P frame is converted as B frame with forward
references. For example, One P frame may refers to P-1, P-2 and P-3 in
list0 and refers to P-3, P-2 and P-1 in list1.
So the num in list0 and list1 does not reflect the forward_num and
backward_num. The vaapi does not provide ref num for forward or backward
so far. In this case, we just consider the backward_num to be 1 conservatively.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6249>
2024-03-05 23:39:43 +00:00
He Junyan b9c28920e0 vah265enc: Improve B pyramid mode in HEVC
If the reference frame number is bigger than 2, we can enable the
pyramid B mode. We do not need to assign a reference frame to each
pyramid level.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6249>
2024-03-05 23:39:43 +00:00
He Junyan 196de61035 vah265enc: Expand log2_max_pic_order_cnt if needed
In b_pyramid mode, B frames can be ref and prevPicOrderCntLsb can
be the B frame POC which is smaller than the P frame. This can cause
POC diff bigger than MaxPicOrderCntLsb/2 and generate wrong POC value.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6249>
2024-03-05 23:39:43 +00:00
Xi Ruoyao 7e8873c100 gst-plugins-base: meson: Fix the condition to skip theoradec test
Due to operator priority "not a and b" is interpreted "(not a) and b".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6260>
2024-03-05 20:13:39 +00:00
Sebastian Dröge 8859f257c2 ptp: Don't install test executable
And handle it like all our other test executables.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6262>
2024-03-05 18:55:00 +00:00
Tim-Philipp Müller 4db25f1500 rtspsrc: Consider 503 Service Not Available when handling broken control urls
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6213>
2024-03-05 17:45:18 +00:00
Tim-Philipp Müller a827c7e2b4 subprojects: track orc main branch again
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6261>
2024-03-05 13:25:19 +00:00
Tim-Philipp Müller 756064b9c3 Back to development
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6261>
2024-03-05 12:58:57 +00:00
Tim-Philipp Müller b125253cad Release 1.24.0 2024-03-04 23:59:25 +00:00
Mathieu Duponchelle f1e2c7918e analytics: whitespace matters for gtk-doc syntax
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête caac280466 analytics: Add documentation to hotdoc build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête 7a14b48dad analytics: Add missing documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 17:33:00 +00:00
Olivier Crête 0aecef9b63 analytics: Fix various typos in the documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6253>
2024-03-04 09:59:12 -05:00
Edward Hervey 3f7f9145d2 playback: Remove USE_PLAYBIN3 registration override
This was only introduced as a convenience for testing playbin3 instead of
playbin2.

Now that playbin3 is (explicitely) default in many cases, we should not do this
hack anymore

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6255>
2024-03-04 12:23:34 +01:00
Jurijs Satcs 23f654a943 audioconvert: set mix-matrix when user changes it to empty
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6243>
2024-03-01 11:58:57 +00:00
Seungha Yang d0713e029c d3d11memory, d3d12memory: Fix outstanding memory count tracing
Gets being released memory back to queue even if allocator is flushing
in order to count the number of outstanding memory objects.
Also, clear queue if there's no outstanding memory object and
allocator is flushing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Seungha Yang 27d5e269cc tests: d3d11: Add buffer pool test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Seungha Yang f77f3e83ed cudamemory: Fix outstanding memory count tracing
Gets being released memory back to queue even if allocator is flushing
in order to count the number of outstanding memory objects.
And fixing double count increment

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Seungha Yang 05aae3dd02 tests: cuda: Add buffer pool test
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6240>
2024-02-29 11:57:50 +00:00
Thibault Saunier 14d6773aba ges: framepositioner: Expose positioning properties as doubles
Making it possible to properly handle compositors that have those
properties as doubles and handle antialiasing.

Internally we were handling those values as doubles in framepositioner,
so expose new properties so user can set values as doubles also.

This changes the GESFramePositionMeta API but we are still on time for 1.24

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6241>
2024-02-29 00:56:30 +00:00
Marvin Schmidt 1b74f039ab allocators: drmdumb: Remove extra semicolon after G_DECLARE_FINAL_TYPE
The `G_DECLARE_FINAL_TYPE` macro does not need to be terminated with a
semicolon and the extra semicolon breaks building e.g. libcamera with
clang because `-Wextra-semi` is used which produces the following
error in conjunction with `-Werror`:
```
gstreamer-1.0/gst/allocators/gstdrmdumb.h:61:43: error: extra ';' outside
of a function is incompatible with C++98 [-Werror,-Wc++98-compat-extra-semi]
   61 |     GST, DRM_DUMB_ALLOCATOR, GstAllocator);
      |                                           ^
1 error generated.
```

Fix this by removing the extra semicolon

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6239>
2024-02-28 23:56:53 +01:00
Thibault Saunier 3077e4d8a5 docs: Update lumen theme
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6224>
2024-02-28 14:35:16 +00:00
Damian Hobson-Garcia dd8ef3ec1b waylandsink: Move buffer commits to the display thread
Syncrhonizing buffer commits to the streaming thread can lead to
dropped frames when frame callbacks are not processed before the
next frame is ready for rendering.  Depending on the drift between
the wayland compositor and buffer source timings, this can lead to
periods of significant frame drop, especially when the media frame
rate is close to the display frame rate.

Cache buffers in the streaming thread and peform commits on the
display thread to eliminate the buffer commit racing.

The implementation is the same for both waylandsink and gtkwaylandsink,
so move it to the common wayland library under gst-lib.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia 612ee3b591 wayland: Add API to ref/unref current GstBuffer inside a GstWlBuffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
Damian Hobson-Garcia 1b3bb334eb wayland: Add synchronized requests to WlDisplay
Add synchonized versions of wl_display_sync() and wl_callback_destroy()
that will ensure that to callbacks can be managed in a thread safe way
on the display queue even when they are dispatched from a separate
thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6133>
2024-02-27 17:20:42 +00:00
Thibault Saunier 1baa36c14a volume: Expose the volume-full-range as another property
In https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063
the range of volume value has changed which breaks backward compatibility
when  using a GstDirectControlBinding which is not acceptable. To avoid
breaking compatibility add the feature of allowing the full range  using
another property with the full range. When using that full range, the
value of the `volume` property might end up being out of its valid
range but we do not really have a good solution for that.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3257
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6222>
2024-02-27 12:33:44 +00:00
Nirbheek Chauhan cf2238a522 rtspsrc: Increase rank to PRIMARY for autoplug purposes
This affects autoplug by gst_element_make_from_uri() in, for example,
uridecodebin. The element should've already been PRIMARY rank, but it
was NONE because gst_element_make_from_uri() doesn't ignore NONE rank
elements when searching for element factories, unlike decodebin.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/502

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6226>
2024-02-27 11:36:01 +00:00
Edward Hervey a3980f4838 docs: Use Discourse and Matrix as prefered communication channels
Part of: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6220
2024-02-27 09:35:47 +01:00
Edward Hervey 760793e843 gitlab_template: Remove duplicate entry and remove mention of IRC
Part of: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6220
2024-02-27 09:35:41 +01:00
Alexander Slobodeniuk f92c27a49e d3d11window_win32: fix crash on RC unprepare() vs window_proc()
Unprepare method posts WM_GST_D3D11_DESTROY_INTERNAL_WINDOW
command to the window queue, and from that moment considers
internal_hwnd to be released, and so it sets it to null.
The problem is that it's possible that right at that moment
the window thread might be already processing some other
command, or just another command might be already in the queue.
On practice we met a crash when WM_PAINT got processed in between
(unprepare already finished and WM_GST_D3D11_DESTROY_INTERNAL_WINDOW
was not handled yet)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6187>
2024-02-26 23:17:05 +00:00
Arnaud Vrac 49fa99737b queue2: post 100% buffering message even when waiting for space to be freed
In the case where the queue shrinks due to a property change and the queue
becomes full, we would set the waiting_del flag, which would prevent posting the
100% buffering message on the bus. Since the pipeline is not aware of the new
buffering value, in the common case where the pipeline is paused during
buffering, it would never resume.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 7293c313d4 queue2: move gst_queue2_get_buffering_message code to the only call site
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 15a18281d7 queue2: remove redundant check to avoid posting the same buffering value twice
Remove the percent_changed check to determine whether a buffering message should
be posted. The check on the last posted buffering value is sufficient, and the
removal doesn't introduce additional complexity.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:08 +00:00
Arnaud Vrac 517498dd11 queue2: consolidate buffering message posting code
No need to copy paste the code, simply call the common gst_queue2_post_buffering
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:07 +00:00
Arnaud Vrac 54aa6b66d8 queue2: make sure update_buffering is called with the lock taken
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6165>
2024-02-26 18:53:07 +00:00
Seungha Yang 125c89319a jpegdec: Fix progressive/interlaced detection
If input height and parsed one are identical, do not consider it as interlaced

Fixing below pipeline:
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420,width=640,height=10 \
  ! jpegenc ! jpegparse ! jpegdec ! videoconvert ! autovideosink

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6181>
2024-02-26 23:21:44 +09:00
Seungha Yang 3afeb73538 jpegdec: Remove trailing white space
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6181>
2024-02-26 23:14:54 +09:00
Tim-Philipp Müller d474de8ff0 Release 1.23.90 2024-02-23 18:20:11 +00:00
He Junyan a734f95790 vabasedec: Fix a possible NULL pointer dereference
The format in _get_preferred_format_and_caps_features() may be NULL.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6206>
2024-02-23 16:55:50 +00:00
Edward Hervey 489f310881 urisourcebin: Handle legacy pad replacements from parsebin
When dealing with demuxers which aren't streams-aware, we need to handle the
old-school "stream replacement" dance from `parsebin` and hide that in such a
way that output pads are re-used (if compatible).

By analyzing the collection posted by parsebin, we can:
* Identify whether some output slots are no longer used (because the stream they
  currently handle is not present in the collection)
* Decide if some upcoming streams could re-use the existing slot

This supports both buffering and non-buffering modes.

Fixes #1651

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6201>
2024-02-23 16:05:44 +00:00
Sebastian Dröge e690b53d05 theoradec: Remove mis-leading and redundant uncropped_info
It's actually the cropped info, and equivalent to the info that is
already stored as part of the output state.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge 43fb350c42 theoradec: Don't leak input state if a second type packet is received
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge be4388c249 theoradec: Don't overwrite width/height of the input state
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Sebastian Dröge ee06666507 theoradec: Don't use custom allocation logic and always crop locally
All video frames have to be copied from libtheora's memory to the output
frame anyway, so we can as well do the cropping here directly instead of
copying the full frames and having downstream do the cropping.

This reduces the complexity of the code considerably, and among other
things gets rid of a bug related to buffer pool configuration.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6203>
2024-02-23 15:03:35 +00:00
Víctor Manuel Jáquez Leal 95436d1eb4 vabasedec: disable derived images for i965 driver
Since it has a very poor performance at reading derived images, which is the
most common use case for decoders.

Partially fixes: #3325

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6202>
2024-02-23 14:20:14 +00:00
Sebastian Dröge 00bbd6961c libav: Don't add -Werror=deprecated-declarations
It will fail the build for anybody who has an older FFmpeg version
than 6.1 and doesn't use the FFmpeg subproject.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6199>
2024-02-23 13:24:22 +00:00
Sebastian Dröge dc8d744789 ffmpeg: Update subproject to 6.1
Otherwise the build will fail after the recent changes because of
deprecated API usage.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6199>
2024-02-23 13:24:22 +00:00
Víctor Manuel Jáquez Leal 9567f8f444 vapostproc: optimization for va memory to system memory only
When the conversion is only caps feature from memory:VAMemory to system memory,
it's possible to optimize by doing a pseudo pass-through since the va-backed
buffers are the same for system memory buffers.

This change will also mitigates #2940

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6174>
2024-02-23 12:40:38 +00:00
Seungha Yang 06dc931b52 asiosink: Fix channel selection
Fixing copy paste mistake

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3321
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6170>
2024-02-23 11:21:08 +00:00
Víctor Manuel Jáquez Leal cc7726ea39 vabase: fail decide allocation if dmabuf without videometa
If the allocation query received from downstream doesn't handle GstVideoMeta but
it requests memory:DMABuf caps feature, it's incomplete, so we rather reject the
negotiation.

Both in base decoder, base transform and compositor.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6155>
2024-02-23 09:52:50 +00:00
Edward Hervey 5422c6c6d4 uridecodebin3: Atomically switch urisourcebin
When switching urisourcebin, ensure that we first unlink *all* pads from
decodebin3 before linking them again.

This is to ensure that decodebin3 completely knows that all previous pads are no
longer needed and can prepare itself to being re-used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6179>
2024-02-23 08:29:47 +00:00
Edward Hervey 3da09ba971 uridecodebin3: Unify urisourcebin probe handling
Instead of handling events from urisourcebin pads in different probes (a
blocking and regular one), move it all to the non-blocking one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6179>
2024-02-23 08:29:47 +00:00
Nirbheek Chauhan 4fc56a08ee soup: Re-add soup-lookup-dep option
It's still useful on Linux since it ensures that the tests are going
to be built, since they use the same dep lookup as the plugin now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6197>
2024-02-23 11:47:47 +05:30
Sebastian Dröge eb641af450 rtp: Fix constant for maximum two-byte RTP header extension length
The value is stored as an 8 bit integer, with 0 meaning that there is
not data for this extension. That means that the maximum length is 255
bytes and not 256 bytes.

On the other hand, the one-byte RTP header extensions are storing the
length as a 4 bit integer with an offset of 1 (i.e. 0 means 1 byte
extension length), so here 16 is the correct maximum length.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6180>
2024-02-23 02:18:28 +00:00
naglis 476a34cfdb gstplay: Fix typos in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6177>
2024-02-23 00:35:58 +00:00
Seungha Yang 5d62f408f2 nvcodec: Add plugin status message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6167>
2024-02-22 23:30:29 +00:00
Seungha Yang fa477a4a25 amfcodec: Add plugin status message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6167>
2024-02-22 23:30:29 +00:00
Víctor Manuel Jáquez Leal 301e281777 vabasedec: refactor format and capsfeature selection
This is a simplification of the venerable
gst_va_base_dec_get_preferred_format_and_caps_features() function, which
predates since gstreamer-vaapi. It's used to select the format and the
capsfeature to use when setting the output state. It was complex and hard to
follow. This refactor simplifies a lot the algorithm.

The first thing to remove _downstream_has_video_meta() since, most of the time
it will be called before the caps negotiation, and allocation queries make sense
only after caps negotiation. It might work during renegotiation but, in that
case, caps feature change is uncommon. Better a simple and common approach.

Also, for performance, instead of dealing with caps features as strings, GQuarks
are used.

The refactor works like this:

1. If peer pad returns any caps, the returned caps feature is system memory and
   looks for a proper format in the allowed caps.

2. The allowed caps are traversed at most 3 times: one per each valid caps
   feature. First VAMemory, later DMABuf, and last system memory. The first to
   match in allowed caps is picked, and the first format matching with the
   chroma is picked too.

Notice that, right now, using playbin videoconvert never return any.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6154>
2024-02-22 20:59:13 +00:00
Jeongki Kim 576dbcbd88 appsrc: clear eos flag on flush stop event
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6186>
2024-02-22 19:46:50 +00:00
Seungha Yang 781fc4a1b6 avviddec: Fix crash with FFmpeg n6.0
FFmpeg version 6.0 has an AV_CODEC_FLAG_COPY_OPAQUE related bug.

See a3bf63c26e

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6184>
2024-02-22 18:54:45 +00:00
Edward Hervey 03f8968119 urisourcebin: Use atomic lock for detecting shutdown
This fixes lock ordering issues

Fixes #3323

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6178>
2024-02-22 18:15:12 +00:00
Edward Hervey 3ce62be851 subtitleoverlay: Also use "Decoder/Subtitle" elements
Elements that "decoded" subtitle formats to raw text were historically
classified as "Parser" and not "Decoder. This is being gradually fixed.

This commit ensures that both classification are allowed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6153>
2024-02-22 14:39:54 +00:00
Edward Hervey c1d33126aa playbin3: Inform (uri)decodebin3 of the subtitle caps from playsink
Subtitles are better handled by overlayers/renderers within playsink. By
informing (uri)decodebin3 of the formats that can be handled we can avoid those
being "decoded" too early.

Fixes #1081

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6153>
2024-02-22 14:39:54 +00:00
Edward Hervey 479c0c5bb4 parsebin: Use pbutils utils to identify more stream types
Handles all cases provided they are identified in the pbutils descriptions
list.

Fixes #1081

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6153>
2024-02-22 14:39:54 +00:00
Edward Hervey 34a1245905 subparsers: Give proper category to subtitle "decoders"
Some subtitle "decoders" had a wrong category of "Parser", which `parsebin`
relies on to identify elements which do not *decode* streams but *parse* them.

This would cause such subtitle decoders to be plugged in within parsebin,
preventing the original stream to be properly used by (more efficient)
downstream decoders or subtitle renderers.

Fixes #1757

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6153>
2024-02-22 14:39:54 +00:00
Piotr Brzeziński 2832cc1267 csharp: Change gtk-sharp revision in gstreamer-sharp subproject to match monorepo subproject
Fixes build issues when building gstreamer-sharp separately from the monorepo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6182>
2024-02-22 13:21:06 +00:00
Mengkejiergeli Ba fc38459e50 msdk: Fix possible memory leaks
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6161>
2024-02-22 11:53:06 +00:00
Matthew Waters 697b35fe58 examples/qmlsinnk-multisink: allow running with leaks tracer
Include a gst_deinit() after the qml engine has been destroyed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:39 +00:00
Matthew Waters f1637a3601 examples/qml: fix some leaks in the multisink example
A GstPad was being leaked and possibly the qmlglsink element depending
on if Qt runs the scenegraph thread again when destroying the example
video item.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:39 +00:00
Matthew Waters 392fd00f4c qml, qml6: Fix leak of QSGMaterial/Geometry (and therefore a possible GstBuffer)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:26:31 +00:00
Matthew Waters 2dae3775d9 qml6: fix a leak of the wrapped QSGTextures
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:24:24 +00:00
Matthew Waters 3e13fc4f88 gl/x11: fix memory leak when retrieiving a foreign context's info
The FBConfig's were being leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>
2024-02-22 10:24:24 +00:00
Jochen Henneberg c6636533d4 ptp-helper: Allow sync to master clock on same host
If we drop all messages with the same clock id as ours we will also
drop all messages coming from a PTP clock on our host since both clock
ids are build from the same MAC address.

At least for Linux we do not see our own messages anyway since the
network stack can well distinguish between multicast send from our
socket or from another socket on the same machine. To make sure that
this works for all supported platforms just drop delay requests since
this is the only message that is sent from the GStreamer PTP clock.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6172>
2024-02-22 07:52:35 +00:00
Nirbheek Chauhan b5b7064419 gst-python: Print exception if pygobject fails to initialize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6159>
2024-02-21 21:47:12 +00:00
Nirbheek Chauhan 768aeb739a meson: Use cdata.set_quoted() for configuration data
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6159>
2024-02-21 21:47:12 +00:00
Nirbheek Chauhan 64fdded13a ges, gst-python: Fix libpython dlopen on macOS
First encountered at https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1171#note_2290789

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6159>
2024-02-21 21:47:12 +00:00
Nirbheek Chauhan 2cc9a181f9 ges, gst-python: Rework libpython loading to be relocatable
If we don't specify a path for loading, the runtime linker will search
for the library instead, which will use the usual mechanisms: RPATHs,
LD_LIBRARY_PATH, PATH (on Windows), etc.

Also try harder to load a non-devel libpython using INSTSONAME, if
available.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6159>
2024-02-21 21:47:12 +00:00
Nirbheek Chauhan ad8ea38e0a meson: Use host_system for the host_machine system
This is a convention everywhere else in gstreamer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6159>
2024-02-21 21:47:12 +00:00
Seungha Yang 911d840288 wasapi: Fix alloc/free function mismatch
... and fix leak in wasapi device provider

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3326
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6169>
2024-02-21 21:03:32 +00:00
Seungha Yang 06b9864dae wasapi2: Fix task memory leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6169>
2024-02-21 21:03:32 +00:00
Piotr Brzeziński 57eb69ff89 csharp: Add RTSP server example
Port of the test-launch.c example from gst-rtsp-server.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5961>
2024-02-21 19:00:50 +00:00
Piotr Brzeziński 4e31f2def5 csharp: Add GstRtspServer bindings
With a few unnecessary gst_rtsp_stream_transport_* methods manually disabled to avoid compilation errors.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5961>
2024-02-21 19:00:50 +00:00
Piotrek Brzeziński 2bc9abd60b csharp: Make nuget targets depend on underlying libraries
Without this, build will fail if meson/ninja decides to call nuget before building gstreamer-sharp.dll.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5961>
2024-02-21 19:00:49 +00:00
ekwange 0cbb396ab9 mse: Add logging init for mediasource sample map
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6033>
2024-02-21 18:11:25 +00:00
Sebastian Dröge 69e4564c87 rtphdrext-clientaudiolevel: Fix typo in documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6175>
2024-02-21 17:25:43 +00:00
Arnaud Vrac 9e2e456d9f adaptivedemux2: fix build with recent meson
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6168>
2024-02-21 13:53:40 +00:00
Sebastian Dröge 5ec73afe75 rtpbasedepayload: Add "extensions" property for the currently enabled extensions
This works the same way as the one from `rtpbasepayload`.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6163>
2024-02-21 12:17:24 +00:00
Sebastian Dröge 08d4527d22 rtpbasepayload: Use gst_value_array_append_and_take_value() as a micro optimization
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6163>
2024-02-21 12:17:24 +00:00
Sebastian Dröge ea261a58e0 rtpbasepayload: Also notify "extensions" property when changing list during negotiation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6163>
2024-02-21 12:17:24 +00:00
Tim-Philipp Müller 0a6948ee20 rtppassthroughpay: fix critical in gst-inspect
gst_segment_to_running_time() will fail noisily
if the segment has not been initialised yet.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6151>
2024-02-21 11:25:10 +00:00
Kamal Mostafa ce45e63dcc tests: cudafilter: actually check for cudascale
Actually check for availability of 'cudascale' instead of accidentally
checking for 'cudadownload' twice.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3327
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6158>
2024-02-21 10:16:02 +00:00
Stéphane Cerveau 977a59a3fb test: vkimagebufferpool: fix queue leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6143>
2024-02-21 04:50:47 +00:00
Nirbheek Chauhan 11f6984bf5 soup: Link to libsoup in all cases on non-Linux
We have unsolvable issues on macOS because of this, and the feature
was added specifically for issues that occur on Linux distros since
they ship both libsoup 2.4 and 3.0.

Everyone else should just pick one and use it, since you cannot mix
the two in a single process anyway.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6156>
2024-02-21 09:27:59 +05:30
Jan Schmidt f7e494f348 rtspsrc: Reset combined flows after a seek before restarting
After a flushing seek, rtspsrc doesn't reset the last_ret value for
streams, so might immediately shut down again when it resumes pushing
buffers to pads due to a cached `GST_FLOW_FLUSHING` result

Prevent a stored flushing value from immediately stopping
playback again by resetting pad flows before (re)starting
playback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6137>
2024-02-21 01:50:13 +00:00
Tim-Philipp Müller 9b84d6398a qsv: use new plugin status message API
Minimal example.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3832>
2024-02-21 00:58:19 +00:00
Tim-Philipp Müller 28f262b9ad gst-inspect: print plugin error/warning/info status messages
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3832>
2024-02-21 00:58:19 +00:00
Tim-Philipp Müller bc4f7040fa plugin: add API for plugins to provide status info messages
This can be used to store informational messages, errors or
warnings which can later be shown to the user in gst-inspect-1.0,
which can be useful for plugins that expose elements dynamically
based on external libraries or hardware capabilities.

Status messages can then provide an indication as to why a
plugin doesn't have any elements listed, for example.

Plus unit test to make sure code paths are exercised a little.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3832>
2024-02-21 00:58:19 +00:00
Tim-Philipp Müller 59c09eb029 gstobject: add CONSTRUCTED flag
This can be used later by base class APIs to know whether they're
called from a subclass instance init function (where the object
isn't properly constructed yet and one should only really poke
at the instance structure but not much else) or after object
construction has been finished.

Fix up GstBin unit test for CONSTRUCTED flag addition.

See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2794

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6150>
2024-02-20 19:16:54 +00:00
Edward Hervey 157471889e meta: Skip gst_meta_info_new in gir
```
gstmeta.c:500: Warning: Gst: gst_meta_info_new: return value: Invalid
non-constant return of bare structure or union; register as boxed type or (skip)
```

Skip this for now

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6147>
2024-02-20 12:30:39 +00:00
Seungha Yang 354af30d9f wasapi2: Respect ringbuffer buffer/latency time
Decide buffer size based on configured buffer/latency time
if low-latency is disabled, so that ringbuffer can buffer more
than minimum required size.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2870
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6141>
2024-02-20 11:37:09 +00:00
Edward Hervey 62b9049d20 mpegst: Fix ownership of return value
This inherits from the same rule as gst_buffer_add_meta

```
gst-mpegtspesmetadatameta.h:98: Warning: GstMpegts:
gst_buffer_add_mpegts_pes_metadata_meta: return value: Invalid non-constant
return of bare structure or union; register as boxed type or (skip)
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6146>
2024-02-20 11:33:33 +02:00
Maksym Khomenko ccf544a50e osxaudio: add mapping for top/left/right surround channels
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5731>
2024-02-20 08:03:15 +00:00
Maksym Khomenko f1e02ebb92 osxaudio: correct mapping for left/right surround
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5731>
2024-02-20 08:03:15 +00:00
Philippe Normand 6059391e10 protection: Document original-media-type caps field
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6142>
2024-02-19 18:35:03 +00:00
Guillaume Desmottes d972acd3c5 uridecodebin3: fix deadlock when switching input item
There was a race between urisourcebin src pad handlers.
One was starting the next item before the other was blocked.

See
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3297#note_2288799
for details.

Fix #3297

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6145>
2024-02-19 16:22:12 +01:00
Marc Leeman eb17de27d6 qt6: search in /usr/lib/qt6/bin/ for qsb
In Debian and possibly other distributions, qsb (qt6-shader-baker) is
not in the default path, but in a QT6 specific path. Search there too

Applied changes from Nirbheek

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6095>
2024-02-19 12:29:32 +00:00
Jochen Henneberg 6608b89977 rtpxqtdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 4788a3da0d rtpasfdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 5d1d0cf9a5 rtpmp4gdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 75849c63c8 rtpsbcdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 3fffcd021a rtpvorbisdepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg e1e7421982 rtpmp4vdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 334ceaca21 rtptheoradepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one
process run we push them all into a GstBufferList and push them out at
once to make sure that each buffer gets notified about each header
extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 0a4918a509 rtpsv3vdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg d810049f01 rtpmp4adepay: Enabled header extension aggregation
Because this depayloader may build several output buffers within one process
run we push them all into a GstBufferList and push them out at once to
make sure that each buffer gets notified about each header extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 90b5d2eb93 rtpklvdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:17 +00:00
Jochen Henneberg 2c3f169ebb rtpjpegdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00
Jochen Henneberg 460813f7ee rtpj2kdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00
Jochen Henneberg ae3a00abd2 rtph263pdepay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00
Jochen Henneberg 4fd4c240e0 rtph263depay: Enabled header extensions aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00
Jochen Henneberg ae5bdaa7e1 rtph261depay: Enabled header extension aggregation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5378>
2024-02-19 11:23:16 +00:00
Philippe Normand 2834973d55 parsebin: Fix stream type for encrypted streams
Without this patch the stream type for encrypted streams would be 'unknown'.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6138>
2024-02-19 09:50:03 +00:00
Priit Laes 4e782da32e cacasink: add driver selection support from the pipeline
https://bugzilla.gnome.org/show_bug.cgi?id=599018

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5491>
2024-02-19 07:50:15 +00:00
Guillaume Desmottes b4752ef792 docs: initialize values when GST_PLUGIN_API_FLAG_IGNORE_ENUM_MEMBERS is set
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5491>
2024-02-19 07:50:15 +00:00
Seungha Yang 93f0135798 wasapi2: Fix choppy rendering
This reverts questionable commit 009bc15f33
which looks completely wrong.

The GstWasapi2RingBuffer:buffer_size variable is used to
calculate available buffer size we can write
(i.e., available size = buffer_size - padding_size).
But the commit makes the size to be exactly same as buffer period.
Then, it can confuse this element as if the endpoint buffer is full on
I/O event callback (if padding size is equal to buffer period)
but it's not true.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2870
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6132>
2024-02-19 04:39:25 +00:00
Loïc Molinari fb02516b75 video: Fix NV12_16L32S video frame size
The size of a NV12_16L32S video frame is bigger than expected because
it uses the size of a Y tile to compute the interleaved UV plane
size. Get the right UV tile size instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6118>
2024-02-16 17:07:03 +00:00
Víctor Manuel Jáquez Leal 03d7082657 gstreamer-vaapi: tests: test vaapipostproc only if exists
Fix: #2491
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6129>
2024-02-16 15:11:23 +00:00
Robert Mader 6b024b50ab v4l2codecs: h264: Fix a memory leak on renegotiation
We only use this anchor when streaming, in which case output_state is
set and needs to get unreffed.
This is in line with how it is handled for all other codecs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6127>
2024-02-15 22:37:11 +01:00
Xavier Claessens 22b7200d60 bus: do not leak message on invalid handler return value
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6124>
2024-02-15 18:37:48 +00:00
Xavier Claessens 57f12dd2fa bus: do not leak messages if there is no async handler
This does not typically happen because "enable-async" property is TRUE
by default. The only place where it is set to FALSE is in GstBin where a
sync handler is used and always returns GST_BUS_DROP.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6124>
2024-02-15 18:37:48 +00:00
Xavier Claessens 350345150e bus: warn when message queue grows too much
It usually means application is not handling messages causing memory
consumption to grow infinitely.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3313>
2024-02-15 17:45:06 +00:00