Commit graph

7494 commits

Author SHA1 Message Date
Jordan Yelloz
317c70651f h265parse: Reject FD received before SPS
A previous fix, a275e1e029, is correct but was too
permissive since it treats all un-matched NAL units the same as AU delimiters
even though some other NAL unit types can be encountered in the processing loop.

The problem this can cause is that some hardware decoders experience bad
performance when handling FD units that precede the SPS.

This change restores the original behavior for FDs so that they're ignored until
the SPS is received and it preserves the codec conformance test gains that the
fix has achieved.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7166>
2024-08-02 13:51:43 +00:00
Nicolas Dufresne
7bd5c5073f glframebuffer: Improve error tracing
glCheckFrameStatus() can fail by returning 0, and otherwise return a
status. Fix the trace to make it clear when we get an unkown status
compare to having an error, in which case we also trace the error code.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7291>
2024-08-02 13:03:51 +00:00
Nicolas Dufresne
d321afcd1b qt6glwindow: Only use GL_READ_FRAMEBUFFER when we do blits
This fbo target is not always supported, and should only be used
along with the frame buffer blit extension.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7291>
2024-08-02 13:03:51 +00:00
Jan Schmidt
c1a1584dde splitmuxsrc: Don't create part reader elements initially
Only create the part reader elements internally the first time
the part is activated. Saves some startup time when preloading
a large number of fragments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
8a1fab9594 splitmuxsrc: Drop lock when unpreparing parts
Parts may emit bus messages that want to take the splitmuxsrc
lock and prevent the downward state change. Avoid a deadlock
after a part sends an error message by taking a ref and
dropping the lock around the unprepare call

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
ec1c6c5b60 splitmuxsrc: Make sure to re-take lock
In the error path when activating a part fails, make
sure to re-take the splitmuxsrc lock before returning
to the caller.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
44005ab9fb splitmuxsink: Fix race in unit tests. Add fragment-id to messages
Publish fragment-id in the messages that splitmuxsink and splitmuxsrc
send, so when they are received out of order (due to async finalization,
for example), they can still be identified / ordered correctly.

Fix a race in the splitmuxsink unit test where messages might be
received out of order

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
356710f6fa splitmuxsrc: Document new properties and signals
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
64fd2b265f splitmuxsrc: Add num-lookahead property
Add a `num-lookahead` property that will 'prepare' a number of
fragments in advance of the playhead if they have been deactivated
or closed by a limited number of `num-open-fragments`. It can help
to avoid any play stalls reading the indexes or headers of the next
file from high-latency media or on resource limited machines.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
93c04e7473 splitmuxsrc: Rename some internal terminology
A part reader can be 'loaded' (prepared, but not currently outputting anything)
or 'playing' (actively being used to output data)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
3121eeeb08 splitmuxsrc: Allow adding fragments during playback
Trigger measurement / inclusion of new fragments into
the playback timeline if they are added after the
element is already running.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:12 +10:00
Jan Schmidt
ed03e8f8ab splitmuxsink: Add fragment offset and duration to message
Publish the playback offset for and duration into the
splitmuxsink-fragment-closed bus message as each fragment
finishes.

These can be passed to splitmuxsrc via the 'add-fragment'
signal to avoid splitmuxsrc measuring all files on startup

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
b0df6ee408 splitmuxsink: Fix a race in fragment switching with async handling
Only do output/muxer operations at the output side of splitmuxsink
to avoid races if fragments are small, by moving the RUNNING_TIME
qdata setting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
eca97e7940 splitmuxsink: Refactor command queue buffer
Make the command struct a bit clearer by giving it an explicit
enum cmd_type instead of just a boolean to differentiate a
finish-fragment command from a release-gop command

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:05 +10:00
Jan Schmidt
bfdaae81f4 splitmuxsrc: Default to only keeping 100 files open
Add a reasonably large default for the number of simulataneous
files to open, that won't affect users that split recordings into
a few large files, but will help prevent fd exhaustion for users
that make recordings with lots of small fragments

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
1294264ab9 splitmuxsrc: Keep streams aligned during adjustments
When calculating the timestamp offset to apply to
media streams in a fragment, ensure that all fragments
are offset "together" to preserve alignment in cases
where there might gaps in a recording at a fragment boundary.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
682db96a41 splitmuxsrc: Add add-fragment signal and examples
Add a signal that allows adding fragments with a specific offset
and duration directly to splitmuxsrc's list. By providing the
fragment's offset on the playback timeline and duration directly,
splitmuxsrc doesn't need to measure the fragment making for faster
startup times.

Add a bus message that's published when fragments are measured,
reporting the offset and duration, so they can be cached by an
application and used on future invocations.

Add examples for handling the bus message and using the 'add-fragment'
signal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
1821b52dd5 splitmuxsrc: Add num-open-fragments property
Add a property to limit the number of parts splitmux will open
simultaneously. Modify the part handling to support deactivating
and reactivating the demuxing for each part.

The default is '0', to preserve the existing behaviour of opening
all parts at the beginning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Jan Schmidt
eeb5a42b5d splitmuxsrc: Report minimum timestamp for each media stream
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7053>
2024-08-02 15:30:04 +10:00
Matthew Waters
8dac91537d cuda/nvcodec: Add support for importing and producing embedded NVMM memory
As produced on the Nvidia Jetson series of devices.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7274>
2024-08-02 01:59:07 +00:00
Nicolas Dufresne
adcc6c8d38 xv: imagepool: Improve error logging
The shm creation function can return a GError, use this to improve the error
reporting.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7285>
2024-08-01 16:42:35 +00:00
Nicolas Dufresne
ab70aa60e2 xvimagesink: Fix crash in pool on error
The set_config() virtual function is not support to free the config. As a side
effect, when there is protocol error of some sort, we endup with a crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7285>
2024-08-01 16:42:35 +00:00
Nicolas Dufresne
5df658cfdd qt6: glwindow: Don't leak previously rendered buffer
If the consumer reads the buffers too slowily, simply unref the
previously rendered buffer instead of leaking it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7286>
2024-08-01 12:44:06 +00:00
Víctor Manuel Jáquez Leal
28e16f897e vkimagebufferpool: fix documentation grammar
Original-patch-by: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7288>
2024-08-01 10:09:34 +00:00
Carlos Bentzen
48ae40f477 webrtcbin: create and associate transceivers earlier in negotation
According to https://w3c.github.io/webrtc-pc/#set-the-session-description
(steps in 4.6.10.), we should be creating and associating transceivers when
setting session descriptions.

Before this commit, webrtcbin deviated from the spec:
1. Transceivers from sink pads where created when the sink pad was
   requested, but not associated after setting local description, only
   when signaling is STABLE.
2. Transceivers from remote offers were not created after applying the
   the remote description, only when the answer is created, and were then
   only associated once signaling is STABLE.

This commit makes webrtcbin follow the spec more closely with regards to
timing of transceivers creation and association.

A unit test is added, checking that the transceivers are created and
associated after every session description is set.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7156>
2024-08-01 07:38:46 +00:00
Víctor Manuel Jáquez Leal
ef9875640e vulkanupload: honor downstream pool allocation parameters
If a downstream buffer pool is offered, vulkanupload checks its allocation
parameters to honor them. Only adds to usage the TRANSFER bits, which are
required to upload buffers.

Also, fail if the buffer pool cannot be configured with the current parameters.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7219>
2024-07-31 12:15:43 +00:00
Víctor Manuel Jáquez Leal
baac191d13 vkimagebufferpool: expose config_get_allocation_params()
Also enhanced the documentation and added a config parameter check for
gst_vulkan_image_buffer_pool_config_set_allocation_params()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7219>
2024-07-31 12:15:43 +00:00
Shengqi Yu
7576d14762 v4l2object: append non colorimetry structure to probed caps
If the stream has a special colorimetry that is not in the colorimetry
list, it will cause negotiation to fail. We should allow passing any
colorimetry, so add an extra structure without the colorimetry field.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7029>
2024-07-31 09:28:18 +00:00
Hou Qi
5dffbd492c v4l2: Fix colorimetry mismatch for encoded format with RGB color-matrix
video-info supports encoded format to have RGB color-matrix, while
v4l2object just leave the v4l2 matrix to default when mapping
GST_VIDEO_COLOR_MATRIX_RGB. It causes gst matrix changed to be
GST_VIDEO_COLOR_MATRIX_BT601 when mapping v4l2 colorimetry.

So add support for encoded format with RGB color-matrix in v4l2object.
Note that for M2M encoders, we should in theory assume that that we can
transfer this value from OUTPUT to CAPTURE queues, though its only true
if the drivers does not do CSC. For now, we don't support any RGB
codecs, but leaving a note for the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
1ddb8797b5 v4l2object: SRGB colorspace is documented limited-range
Split JPEG and SRGB so that we can follow the specified difference. The
SRGB definition in V4L2 does not follow the standard, and is document
so. This is also why JPEG colorspace exists.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
20eb14b85b v4l2object: Fix size of plane_size array calculation
Due to missing parenthesys, only the first element of the array was
being cleared. As it is a staticly sized array in the object, this
code could also be simplified.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Nicolas Dufresne
152df21644 v4l2object: Fix translation of quantization
The V4L2_MAP_QUANTIZATION macro has been fixed to something a lot saner,
fix our replica accordingly. The new macro now simply set the quantization
to full range is the pixel formats is RGB based, or if the JPEG
colorspace is used.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3952>
2024-07-30 20:26:06 +00:00
Guillaume Desmottes
beb1cef3d4 rsvgoverlay: add debug category
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7246>
2024-07-30 17:51:51 +00:00
David Rosca
6fe5d9013d vaapi: Fix sps_max_dec_pic_buffering_minus1 value in h265 decoder
Fixes decoding SLPPLP_A_VIDYO_2 sample.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7242>
2024-07-30 17:31:07 +00:00
Daniel Morin
4ff98d66bb onnx: fix formating
Code alignement was not alway consistent

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7205>
2024-07-30 16:50:15 +00:00
Víctor Manuel Jáquez Leal
43edff4e29 vaapi: tests: fix uninitialized variable compiler warning
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7279>
2024-07-30 15:06:25 +00:00
Edward Hervey
b7828d237b nlecomposition: Don't leak QoS events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7276>
2024-07-30 14:22:54 +00:00
Edward Hervey
a38e244794 vulkan: Add missing since markers
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7277>
2024-07-30 13:46:42 +00:00
Edward Hervey
30c2f67e49 bad: Add missing plugin since
These predate current stable release. Was never spotted since they weren't built
on the CI

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7277>
2024-07-30 13:46:42 +00:00
Nirbheek Chauhan
fa25dd4de5 vtenc: Do not set the CRF/Quality parameter with ProRes
It's not supported with ProRes, setting the property will fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
cbadb0b4ae vtenc: Log warnings when setting a property fails
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
f8711239e4 vtenc: Add max-frame-delay property
This controls the number of frames allowed in the compression window.
Not all encoders and implementations support it; I've only managed to
successfully use it with ProRes.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
30d2b8895a vtenc: Support emulating CBR mode with data rate limits
CBR is only supported on Apple Silicon, and this "emulation" works
surprisingly well. We set the window size to a single frame, and don't
set ABR at all.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
d327105228 vtenc: Add new property for setting data rate limits
This proxies kVTCompressionPropertyKey_DataRateLimits, except it
only supports a single limit for now.
https://developer.apple.com/documentation/videotoolbox/kvtcompressionpropertykey_dataratelimits

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
4207b4e281 vtenc: Add support for constant bitrate encoding
Only supported on macOS 13.0+ and iOS 16.0+ on Apple Silicon.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
2e39aefe22 vtenc: Eliminate some needless complex code
We do not need a helper that takes a lock to fetch the values of these
properties. There is no race being prevented.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Nirbheek Chauhan
3621b82c63 vtenc: Fix setting of quality property
gst_vtenc_set_quality() will never actually set the VT compression
property, because it tries to set it on self->session which is not
initialized at this point.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7232>
2024-07-30 12:42:17 +00:00
Edward Hervey
c623f2db21 validate: reporter: Don't pollute logs
There was a stray g_printerr introduced by 2a4b9c8dc1

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7275>
2024-07-30 11:39:02 +02:00
Jan Schmidt
0faec707a0 adaptivedemux: Fail cleanly if parsebin is not installed
Detect a failure to construct a parsebin and error out
cleanly instead of trying to operate on a null pointer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
213726ca41 adaptivedemux2: Post a bus error when failing to start download
If a download completely fails to start, due to malformed URI or so,
post a bus error instead of just stalling out with no indication
why.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
f2a18ab277 adaptivedemux2: Implement file:// URI handling
Add the ability to play HLS and DASH from local files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
9dc1d68e2f codec-utils: Recognise mjpg mime type
Add mjpg to gst_codec_utils_caps_from_mime_codec_single()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
ef0e822559 hlsng: Check caps are not null after parsing HLS CODECS tag
If the mime codec wasn't recognised, caps will be NULL and cause
a critical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Jan Schmidt
7bd51afd04 gsturi: Ensure file:// URIs retain //
Add the // back after the scheme for file URIs so 'file:///path/to/file'
doesn't become 'file:/path/to/file' in gst_uri_to_string()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6969>
2024-07-30 00:06:50 +00:00
Víctor Manuel Jáquez Leal
bff24e5ab7 vulkanupload: comment zero value usage with VK_ACCESS_NONE
Zero is used only for Vulkan version prior to 1.3, because it wasn't defined
before.

Just for readability.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
fad06c9b6f vkimagebufferpool: refactor how image usage is set
Now that driver version is expected to be equal or superior to 1.3.275 the bug
in NVIDIA and RADV regarding usage is solved, we can revert commit b7ded81f7b.

Also this patch sets the internal usage variable after all the validation are
run, thus the state don't keep an invalid usage.

Finally, the now unused supported_usage variable is dropped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
bb9eb6f477 vkimagebufferpool: add encoding usage as video usage
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:15 +02:00
Víctor Manuel Jáquez Leal
541e2e93ca vkimagebufferpool: reset the number of profiles at set_config()
Virtual method set_config() can be called several times, and if the number of
profiles counter isn't reset the pool will reach an error state.

The purpose of number of profiles is to check the number of valid vulkan video
profiles (two in the case of transcoding use-case, for example) so it's local to
set_config() virtual method.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:14 +02:00
Víctor Manuel Jáquez Leal
d8e384085a vulkan: encoder and decoder runtime check for driver version 1.3.275
Which is the one checked in meson. See commit 21ee264d65

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7247>
2024-07-29 17:10:14 +02:00
Philippe Normand
bd64374174 parsebin: accept-caps handling for elements with unusual pad names
In case the last element of the parse chain doesn´t have a sink pad named
"sink", send the accept-caps query to the first sink pad of the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7255>
2024-07-29 12:41:33 +00:00
Víctor Manuel Jáquez Leal
8faefccfd5 va: refactor dmabuf handle close
Moved the close loop into a function guarded for non-win32 platforms.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7254>
2024-07-29 10:34:56 +02:00
Seungha Yang
080a838fca qsv: Fix critical warnings
Fixing warnings
GStreamer-CRITICAL **: 01:21:25.862: gst_value_set_int_range_step:
assertion 'start < end' failed

Although when QSV runtime reports a codec is supported, resolution query
fails sometimes, espeically VP9 encoder case on Windows.
Don't try to register an element if resolution query returned an error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7250>
2024-07-27 19:33:52 +00:00
Nirbheek Chauhan
0bb336f34c svtav1enc: Fix segfault when flushing
gst_video_encoder_get_oldest_frame() is nullable, and will signal that
all frames are handled by returning NULL.

Fixes #3650

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7249>
2024-07-27 19:21:37 +01:00
Seungha Yang
f04f6f43c3 d3d12frame: Fix frame copy method
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 04:18:47 +09:00
Seungha Yang
28a7adf4dd d3d12memory: Check heap flag before trying to create NT handle
CreateSharedHandle() will fail eventually if the resource was created
with non-shared heap. Instead of trying to create handle blindly,
validate resource first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 04:17:03 +09:00
Seungha Yang
1c8c5ed457 dwrite: Prefer d3d12 resource allocated with shared heap
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:39:22 +09:00
Seungha Yang
4a6daad517 d3d12: Suppress fence data object leak report
We don't release GstD3D12Device intentionally, thus
a GstD3D12FenceDataPool owned by a device will not be released
but that's expected leak.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00
Seungha Yang
9a8d7db5de d3d12: Fix debug category name
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00
Seungha Yang
88efaa35a8 d3d12download: Do not overwrite fence of non-writable memory
A fence configured in GstD3D12Memory should be used only for
write access to be completed. And because d3d12 -> d3d11 copy path
is read access to d3d12 resource, we should not set fence to
memory. Otherwise another read access to the d3d12 resource
will wait for d3d11 device context's copy operation although
simultaneous read access is allowed.

Use background thread to keep d3d12 resource and wait for d3d11 device's
copy operation instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7243>
2024-07-27 03:23:22 +09:00
Jan Schmidt
1ebbcc31ef va: Fix dmabuf handle leaks
Close dmabuf handles manually when they're not going to
be passed into GStreamer FD memory, to avoid fd handle
leaks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7240>
2024-07-26 10:32:48 +00:00
Jordan Yelloz
f11735c97b tsmux: Adjust byte counter when adjusting bitrate
When configured in constant bitrate mode, the muxer computes timing information
using the configured bitrate and the byte counter (now = bytes sent / byterate).

When an application changes the bitrate in CBR mode during playback, the
relationship between bytes sent and bitrate is no longer valid so new timing
values will be off by the ratio of the old bitrate to the new bitrate.
Furthermore, it will upset the way that padding is generated.

pad_stream() works by trying to fit the byte counter to now * byterate.
The result is that when decreasing bitrate, the muxer stalls, waiting until the
byte counter is in agreement with now * byterate. Also, when increasing
bitrate, the padding will spike in volume until the byte counter fits with
now * byterate.

If the byte counter is scaled by the ratio of new bitrate / old bitrate when
adjusting bitrate, then padding is generated in a way that applications would
more likely expect.

One detail this change doesn't yet address is whether the next PCR will match up
optimally with the previous PCR right after the byte counter is scaled. In that
case, some correction may be necessary. Also, perhaps the user should be
prevented from changing from bitrate=0 to bitrate=nonzero during playback since
it's not straightforward how to scale the byte counter in that case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7158>
2024-07-25 15:02:11 +00:00
Nicolas Dufresne
96a2408147 glcolorconvert: Fix syntax error in detiling shader
Mesa compiler complains of:
    error: `rgba' redeclared

This regression got introduced by 674e643428, which introduce
colormatrix computation without revoing the pre-declaration of
rgba variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7231>
2024-07-25 14:10:52 +00:00
Edward Hervey
f7337b7477 ffmpeg: Don't register elements for which we have no caps
We would previously register a whole bunch of encoder/decoder for which the caps
were ... "unknown/unknown".

Add a function to quickly check (without generating caps) whether a given
AVCodecID has a known mapping (which can include the {video|audio}/x-gst-av-*
ones) without generating the caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6237>
2024-07-25 12:14:50 +00:00
Guillaume Desmottes
a82151b84f qroverlay: redraw overlay when caps changes
The position needs to be updated as it depends of the video size.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7230>
2024-07-25 06:55:29 +00:00
Guillaume Desmottes
6e7300d2a8 qroverlay: add some debug logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7230>
2024-07-25 06:55:29 +00:00
Shengqi Yu
df28aceb49 videoscale: correct classification error
videoscale does not have convert function, so remove the convert
description in it's classification. Otherwise, if we want use
autovideoconvert to convert colorsapce, autovideoconvert will select
videoscale to do convert and this will cause to fail.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7215>
2024-07-25 05:42:25 +00:00
Tim-Philipp Müller
0f537919a2 wraps: libgudev: add fallback uri
Release tarball is .xz but we currently use a snapshot
from gitlab, so just mirror the .bz2 instead of changing
all URLs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7221>
2024-07-24 11:44:28 +00:00
tomaszmi
07d601bbbc avtp: Fixed Linux/Alpine 3.20 build
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7226>
2024-07-24 12:07:09 +02:00
Seungha Yang
0b285fc1a1 cuda: Fix runtime compiler loading with old CUDA tookit
Fallback to PTX if CUBIN symbol is unavailable

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3685
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7220>
2024-07-23 19:53:09 +00:00
Ruben Gonzalez
3e4c8f1b16 avmux: Fix crash when muxer doesn't get codecid
gst_ffmpeg_formatid_get_codecids from gst_ffmpegmux_base_init to gst_ffmpegmux_base_init

FFmpeg 7.0 included new muxer rcwt for Raw Captions with Time
(RCWT). Commit [1].  GStreamer couldn't get sink caps for muxer it.

Calling gst_ffmpeg_formatid_get_codecids in gst_ffmpegmux_register to
avoid create muxer without pad templates.

[1] https://github.com/FFmpeg/FFmpeg/commit/3525544e48

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7168>
2024-07-23 18:42:22 +00:00
Loïc Yhuel
13034cc63f meson: fix SIZEOF_OFF_T when cross-compiling with Meson >= 1.3.0
https://mesonbuild.com/Release-notes-for-1-3-0.html#clarify-of-implicitlyincluded-headers-in-clike-compiler-checks

With only stddef.h, off_t is not defined, so when cross-compiling SIZEOF_OFF_T is -1.
We now use sys/types.h which should define off_t.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7217>
2024-07-23 15:32:22 +02:00
Sebastian Gross
c35302a071 asfdemux: Be more lenient towards malformed header
VLC counts METADATA as 1 even if the specification states you must not.
This leads to asfdemux failing since there are no bytes left when asfdemux
tries to extract the "last" header.

Do not fail hard in this case and try to proceed when everything else went
fine.
So at least gst-discoverer will see what's in the file.

Closes #3684

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7209>
2024-07-23 06:35:11 +00:00
Víctor Manuel Jáquez Leal
2387c3c4aa vkimagebufferpool: no aliased images for video decoding
This fix regression in validation layer introduced by commit 3a2e8d2d19

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7211>
2024-07-22 16:46:53 +00:00
Víctor Manuel Jáquez Leal
423f0d5384 vkdecoder: handle barrier internally for coincide references
This is to avoid a regression in validation layer (introduced by commit
916c4e70cd) when using vulkandownload

VUID-VkImageMemoryBarrier2-srcAccessMask-03914 ..  vkCmdPipelineBarrier2():
pDependencyInfo->pImageMemoryBarriers[1].srcAccessMask (VK_ACCESS_TRANSFER_READ_BIT)
is not supported by stage mask (VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR)

since vulkandownload set DPB memories' access mask to
VK_ACCESS_TRANSFER_READ_BIT, while they are retain by the DPB queue, so when
they are used as DPB after been shown, this validation error is raised.

Must of the barrier values are set ignoring the previous state of the vulkan
images.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7211>
2024-07-22 16:46:53 +00:00
Stéphane Cerveau
9736b9e7b7 vulkan{up,down}load: check for a graphics family queue
Vulkan queue retrieved from peer elements should be a graphics family one.
Otherwise, get a compatible queue from the given device.

Co-Authored-By: Víctor Jáquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7162>
2024-07-22 15:18:35 +00:00
Seungha Yang
800961cf28 d3d12decoder: Add support for d3d11 output again
Although d3d12download supports d3d12 to d3d11 texture copy,
this feature might be useful if an application is not ready to d3d12
support and it expects output type of decodebin(3) is d3d11.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7208>
2024-07-22 23:17:25 +09:00
Seungha Yang
8c2bbd8760 meson: d3d12: Use configuration file
Move defines to config header

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7208>
2024-07-22 23:02:48 +09:00
Mengkejiergeli Ba
84cb1ef895 msdk: Add new driver name "xe"
Intel has released a new graphic driver named "xe" for
newer Gen12/Xe graphics (i.e. from Lunar Lake).
This patch add "xe" name when getting device in gst-msdk plugins.
See xe driver public in
https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7178>
2024-07-22 12:51:47 +00:00
Víctor Manuel Jáquez Leal
035e0698cf vkoperation: fix documentation
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7203>
2024-07-22 10:49:33 +02:00
Nirbheek Chauhan
2ee51bf6f6 glvideomixer: Fix critical when setting start-time-selection
It caused a critical, but did not affect functionality because the
GValue was passed as-is to the glvideomixerelement which actually does
something with the property.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7204>
2024-07-20 01:05:58 +00:00
L. E. Segovia
35271a2ef3 isac: Work around upstream having no shared library support for MSVC
None of the symbols in webrtc-audio-coding-1 are marked with
`__declspec(dllexport)`, rendering the library usable only if
it was built with GCC/Clang.

The only fix available (as the pulseaudio copy has not been updated
with Google's upstream) is to ensure the fallback builds statically.
Although this change will also affect webrtcdsp's dependency on
webrtc-audio-processing-1, it does not break its compilation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407>
2024-07-19 18:51:03 -03:00
Nirbheek Chauhan
6ce72488fa Revert "meson: Fix invalid include flag in uninstalled gl pc file"
This reverts commit 9d719b9937.

The old pkg-config implementation errors out if a variable specified
in the pkgconfig file is not defined, so this actually broke
uninstalled pc files.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7191>
2024-07-19 14:46:36 +00:00
Víctor Manuel Jáquez Leal
e91ffae1f0 vkimagebufferpool: reset buffer's access flags
The access flags are kept around the operations, but when the buffer is
released, the access flag should be reset to its original value, since queue
transfers can be done along the pipeline and, when reusing the buffer, the new
queue might not support the latest access flag.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
cdf07cd912 vulkanh264dec: set access NONE at buffer pool allocation parameters
Since the decoding queue might not have transfer capabilities.

This change also applies to unit test.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
2990cc5f71 vulkan: add source pipeline stage to _operation_add_frame_barrier()
Instead of dragging the last destination pipeline stage as current barrier
source pipeline stage (which isn't a valid semantic) this patch adds a parameter
to gst_vulkan_operation_add_frame_barrier() to set the source pipeline stage to
define the barrier.

The previous logic brought problems particularly with queue transfers, when the
new queue doesn't support the stage set during a previous operation in a
different queue.

Now the operation API is closer to Vulkan semantics.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7165>
2024-07-19 14:45:39 +02:00
Víctor Manuel Jáquez Leal
dd4027388e vulkan: fix wrong stages or access in barriers
While working on !7165 we found out that some parameters for barriers were wrong
or the destination pipeline stage was too coarse.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7200>
2024-07-19 12:44:51 +02:00
Matthew Waters
58db0e6ed8 decklinkvideosink: schedule frames before they need to be displayed
This removes most occurances of 'late' frame notifications produced by
decklink.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7107>
2024-07-19 01:28:16 +00:00
Seungha Yang
9a06330d09 d3d12converter: Update internal method names
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7193>
2024-07-18 14:17:43 +00:00
Seungha Yang
72895ed0fa d3d12: Always allocate output texture using shared heap
... if downstream preference is unknown (e.g., no proposed
buffer pool by downstream), so that produced textures can be
shareable with other APIs such as d3d11 or vulkan, or other processes

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7193>
2024-07-18 14:17:43 +00:00
Jakub Adam
9629d78b7c gstvideoaggregator: preserve features in non-alpha caps
Fixes caps negotiation when sink template caps of an element inheriting
GstVideoAggregator have features different from the implicit
"memory:SystemMemory".

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7102>
2024-07-18 14:17:45 +02:00
Robert Mader
f392e9b369 vabase: Stop aligning VideoInfo during DMABUF import
Doing so resets the stride from the VideoMeta and it wasn't done before
the commit below. While on it, drop the plane size check as we can't
reliably predict the correct size when using DRM modifiers.

Fixes: 89b0a6fa23 ("va: refactor buffer import")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7187>
2024-07-18 09:10:23 +00:00
Robert Mader
b30a83ed5a vabase: Use correct VideoInfo during DMABUF import
The changes to the VideoInfo, notably the stride from the VideoMeta,
were lost. Avoid such mistakes by explicitly using the VideoInfo from
drm_info.

Fixes: 9f5b2c4e25 ("va: use GstVideoInfoDmaDrm when importing buffers")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7187>
2024-07-18 09:10:23 +00:00
Nirbheek Chauhan
65ff618bb6 avfdeviceprovider: Fix debug category initialization
The device monitor calls into avfvideosrc functions without
initializing the debug category, which causes multiple criticals.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7192>
2024-07-18 07:20:06 +00:00
L. E. Segovia
5929829131 gst: clock: Move Android OS check to the __ANDROID__ macro
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6510>
2024-07-17 22:33:52 +00:00
Sebastian Dröge
8f8fc314db examples: webrtc: rust: Update to gstreamer-rs 0.23
And also update other dependencies.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7189>
2024-07-17 09:12:47 +00:00
Seungha Yang
b37bfc02f5 d3d12: Remove unnecessary event handles
null event NT handle to ID3D12Fence::SetEventOnCompletion()
will block the calling CPU thread already, thus it has no point that
creating an event NT handle in order to immediate wait for fence at CPU-side.
Note that passing a valid event NT handle to the fence API might be useful
when we need to wait for the fence value later (or timeout is required),
or want to wait for multiple fences at once via WaitForMultipleObjects().
But it's not a considered use case for now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7176>
2024-07-16 19:17:15 +00:00
Seungha Yang
783e1ea327 d3d12videosink: Fix mouse event handling
GstD3D12Window.priv.input_info is referenced by mouse event handler
in order to calculate corresponding original position
if scene is rotated/flipped by the videosink.
Fixing regression introduced by recent d3d12videosink refactoring

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7177>
2024-07-16 17:02:24 +00:00
Robert Mader
556e47580a va: Blocklist i965 driver for encoding
The driver - AKA intel-vaapi-driver - has been unmaintained for four years
now and encoding appears to be broken in various cases. As it's unlikely
that the situation will improve, blocklist the driver for encoding.
Decoding appears to be stable enough to keep it enabled.

The driver can still be used by setting the `GST_VA_ALL_DRIVERS` env
variable.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7170>
2024-07-16 15:53:37 +00:00
Víctor Manuel Jáquez Leal
c7259f3a5b vulkan: remove beta extensions guard for encode operations
This is not needed anymore since encoder operations are not beta anymore.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7179>
2024-07-16 15:08:39 +00:00
Seungha Yang
dbc8a1397d d3d12compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7181>
2024-07-16 14:18:12 +00:00
Seungha Yang
3922ae5d92 d3d11compositor: Fix transparent background mode with YUV output
In case of YUV format without alpha channel, zero clear value
for each channle will result in green color. Use calculated black
background color with alpha=0 for transparent background mode instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7181>
2024-07-16 14:18:12 +00:00
Seungha Yang
75d8dbc556 avauddec: Fix crash on stop()
GstFFMpegAudDec.context can be nullptr if decoder got closed
without opening new context. Note that we don't need to clear
AVCodecContext.extradata there since avcodec_free_context()
will do clear the data if needed.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7180>
2024-07-16 20:49:13 +09:00
Sebastian Dröge
3eec4703c6 ajasrc: Fix handling of timestamps and don't rely on driver frame counters
The driver frame counters (processed, dropped, buffer level) are not
always correct apparently, and don't allow reliably assigning a frame
number to captured frames.

Instead of relying on them, count the number of frames directly here and
detect dropped frames based on the capture times of the frames: if more
than 1.75 frame durations are between two frames, then there must've
been a dropped frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7163>
2024-07-16 09:59:36 +00:00
Seungha Yang
89096dde38 h264decoder: Update output frame duration when second field frame is discarded
In case of an interlaced stream, if each field picture belongs to
different GstVideoCodecFrame, updates output frame's duration
based on discarded second field picture's timestamp information.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7132>
2024-07-15 16:36:50 +00:00
Seungha Yang
2a6967a8cd d3d12videosink: Clear cached buffer on format change
Otherwise converter will try to read memory of which layout/format
might be different from configured converter pipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7167>
2024-07-15 10:20:46 +00:00
Víctor Manuel Jáquez Leal
058ae85b22 vadisplay: fix minor version check
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7164>
2024-07-12 14:34:31 +00:00
Víctor Manuel Jáquez Leal
3a2e8d2d19 vkimagebufferpool: set image creation flags in needed
set ALIAS bit if the usage is for both sampled and storage.

set MUTABLE_FORMAT and EXTENDED_USAGE bits if the image is a multiplane YUV and
uses multiple memories.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 20:28:04 +02:00
Víctor Manuel Jáquez Leal
0f8f2d0057 vkformat: add gst_vulkan_format_get_map function
This will be used later to compare the format selected by
gst_vulkan_format_from_video_info_2(), to verify if it's multiple memory buffer
or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 20:28:04 +02:00
Víctor Manuel Jáquez Leal
17f3a22130 vulkanupload: request storage usage for bufferpool
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
2d17bba6f1 vkimagebufferpool: define a default usage
Define a default usage and use it instead of repeating the same bitwise
addition.

Therefore, when usage is defined as zero, the usage is defined with the
format's supported usage and the default usage, now without the storage
bit, but with color and input attachment bits.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Víctor Manuel Jáquez Leal
b1eebec485 vkformat: unward G8_B8R8_2PLANE_420_UNORM
Since it exists since VK_VERSION_1_1. It should be ignored by usage flags or the
no_multiplane parameter.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6798>
2024-07-11 10:52:19 +02:00
Robert Mader
abf3361de3 waylandsink: Fix surface cropping for rotated streams
The wp_viewport source rectangle is applied in surface-local coordinates
after buffer_transform and buffer_scale. Therefore we need to swap width
and height for 90/270 deg. rotations.

This fixes playback of rotated videos such as portrait videos from
mobile devices.

See also: https://wayland.app/protocols/viewporter#wp_viewport

Fixes: 0b648f9a2d ("waylandsink: Crop surfaces to their display width height")
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7136>
2024-07-10 17:13:54 +00:00
Sebastian Dröge
a786c85c4f taginject: Modify existing tag events of the selected scope
Not doing so would mean that tags would be overidden by any tag events sent by
upstream. Also only send a tag event directly if upstream never sent one.

By default use GST_TAG_MERGE_REPLACE to override tags that exist in both the
upstream event and this element with the ones from this element, but provide a
new "merge-mode" property to adjust the behaviour.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7145>
2024-07-10 13:00:34 +00:00
Sebastian Dröge
a36b3d9fcd taginject: Add getters for the properties
There's no reason why they should be write-only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7145>
2024-07-10 13:00:34 +00:00
Sebastian Dröge
2ed84fe298 taginject: Use proper GType macro for the GstTagScope enum
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7145>
2024-07-10 13:00:33 +00:00
Sebastian Dröge
ee10aff273 docs: Add back SVG sources for the pipeline diagrams
The PNGs were created from these SVGs but didn't survive the transition from
docbook to markdown and the move to gst-docs 8 years ago.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7155>
2024-07-10 13:53:19 +03:00
Sebastian Dröge
a7bba83ded typefind: Add typefinders for formats that were previously available via ffmpeg
Co-Authored-By: Matthew Waters <matthew@centricular.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
e52f0bbc03 avvidenc: Make sure to pass always increasing PTS to the encoder
All MPEG1/2/4-based encoders at least are ignoring input frames if
backwards PTS or PTS that are equal to the previous one are passed in.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
1953bc6122 avviddec: Only use 2 ticks per frame if decoding interlaced video
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
dc0aebbea0 avvidenc: Set the DTS to 0 if it is negative, not the PTS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
ee518b9c7e avvidenc: Only use 2 ticks per frame if encoding interlaced video
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3518

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
03465d0904 avmux: Reset input context to NULL after closing in the muxer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
2a3f791c90 avdemux: Fix leak of demuxer input context in error cases
Also simplify context lifetime management a bit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
73d0cac16c libav: Update AVCodecContext lifetime to work properly with ffmpeg 7
avcodec_close() is deprecated and it's not supported anymore to re-open
a codec, so we only ever allocate the codec in set_format() now and
always free it after usage.

As part of this, also fix various memory leaks in related code paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:39 +00:00
Sebastian Dröge
0871a55c8a libav: Fix signature of avprotocol write function for ffmpeg 7
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:38 +00:00
Sebastian Dröge
9d465d9e68 avdemux: Remove typefinder implementation
Direct access to AVInputFormat::read_probe() is not possible anymore
with ffmpeg 7.0, and the usefulness of this typefinder seems limited
anyway. An alternative implementation around av_probe_input_format3() or
similar would be possible but it would be going over all possible ffmpeg
probes at once.

Having a typefinder here means that basically every application will
load the gst-libav plugin when typefinding is necessary, which has
unnecessary performance impacts. If a typefinder from here was indeed
missing from typefindfunctions in gst-plugins-base then it would be
better to add it there directly.

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6505>
2024-07-08 14:31:38 +00:00
Ruben Gonzalez
1c238aaa37 vkh265dec: Fix H.264 ref in logs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7146>
2024-07-08 15:30:45 +02:00
Seungha Yang
e692bf0fb9 d3d12memorycopy: Enhance d3d12 to d3d11 copy
If a d3d12 memory holds non-direct-queue fence but the fence was
created with D3D12_FENCE_FLAG_SHARED flag, use the fence instead of
waiting for fence at CPU side. Note that d3d12ipcsrc or
d3d12screencapture elements will hold such sharable fence.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7139>
2024-07-08 09:57:04 +00:00
Dan Yeaw
528fbe7b3c gst-python: Fix python3 not found in Windows
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7090>
2024-07-07 16:14:05 +00:00
Nirbheek Chauhan
0b9ec1b657 applemedia: Disable some deprecation errors
This needs significant work to use the new Metal→Vulkan integration
extension `VK_EXT_metal_objects`

```
MoltenVK/mvk_deprecated_api.h:132:1: note: 'vkGetMTLDeviceMVK' has been explicitly marked deprecated here
MVK_DEPRECATED_USE_MTL_OBJS
^
MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS'
 #define MVK_DEPRECATED_USE_MTL_OBJS   VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]]
                                                    ^
../sys/applemedia/videotexturecache-vulkan.mm:303:20: error: 'vkSetMTLTextureMVK' is deprecated:
Use the VK_EXT_metal_objects extension instead.
    VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture);
                   ^
MoltenVK/mvk_deprecated_api.h:151:1: note: 'vkSetMTLTextureMVK' has been explicitly marked deprecated here
MVK_DEPRECATED_USE_MTL_OBJS
^
MoltenVK/mvk_deprecated_api.h:74:52: note: expanded from macro 'MVK_DEPRECATED_USE_MTL_OBJS'
 #define MVK_DEPRECATED_USE_MTL_OBJS   VKAPI_ATTR [[deprecated("Use the VK_EXT_metal_objects extension instead.")]]
                                                    ^
2 errors generated.
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
8619e163bf vk-video: Fix uint64_t string format errors
With clang on macOS:

```
error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long')
...
error: format specifies type 'unsigned long' but the argument has type 'VkImageView' (aka 'unsigned long long')
```

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
156a016313 meson: Find MoltenVK with the objc++ compiler everywhere
When building for iOS in Cerbero, as of MoltenVK SDK 1.3.283, we have
to statically link to libMoltenVK since it no longer ships a dylib.
This requires linking to libc++, so we find the dep with the objc++
compiler to ensure that meson uses the right linker.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
adedac6bd9 meson: Fix some confusing code in applemedia's build file
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
4293719206 meson: Fix vulkan automagic in applemedia plugin
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
5ed3e045d8 meson: Fix vulkan library build on iOS
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
5c41d387e3 meson: Use / instead of join_paths for vulkan
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Nirbheek Chauhan
54a6643986 meson: Fix automagic dependency checks in gstvulkan
Windowing, in particular, was getting silently disabled.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7091>
2024-07-07 13:20:12 +00:00
Daniel Morin
a04ed4b91e doc: Add analytics support design
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6139>
2024-07-05 20:51:58 +00:00
Nirbheek Chauhan
fd971ed9d8 docs: CI insists that this docs update must be applied
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7130>
2024-07-05 16:20:22 +00:00
Nirbheek Chauhan
9d719b9937 meson: Fix invalid include flag in uninstalled gl pc file
${libdir}/gstreamer-1.0/include is only valid after installation, but
extra_cflags are added unconditionally, so we can't use that for
include flags.

Instead, let's add the include flag via variables, which are different
for installed and uninstalled pc files.

This is particularly bad for consuming GStreamer via CMake which barfs
on non-existent include paths.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7130>
2024-07-05 16:20:22 +00:00
Taruntej Kanakamalla
f54320b161 lc3: remove bitstream comparison in the tests
since the encoded output is changing based on version
it does not make sense to check the output bitstream with a fixed
bytearray since the version in the target might vary. So sticking
to checking the number of output buffers and encoded frame size
similar to the other tests

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7141>
2024-07-05 18:27:20 +05:30
Guillaume Desmottes
3b47b87038 downloadbuffer: send EOS in push mode
gst_download_buffer_read_buffer() returns FLOW_EOS but it was not
handled in the 'out_flushing' goto block which uses srcresult,
so EOS was not sent downstream.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128>
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
894bef7a1d downloadbuffer: initialize upstream_size when activated in push mode
Push mode flow relies on upstream_size but it was not initialized when
activated as it is when activated in pull mode.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128>
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
560d9b5b91 downloadbuffer: init upstream_size to -1
Code in check_upstream_size() is checking for -1 to check if
upstream_size has been set or not.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128>
2024-07-05 07:34:03 +00:00
Guillaume Desmottes
523adcfb1d downloadbuffer: properly log when receiving events
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7128>
2024-07-05 07:34:03 +00:00
Tihran Katolikian
cc1d978d7f qt6: explicitly specify path to QtGui private headers when including qrhi_p.h
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7131>
2024-07-04 09:52:57 +00:00
Víctor Manuel Jáquez Leal
426616cca7 vavpp: simplify gst_va_vpp_transform_caps()
The code is simplified by using GQuarks for looking for caps features, and
removing inner loops.

Also, it's used the pad template caps to compare with the incoming caps because
is cheaper at the beginning of negotiation, where the pad template caps is used.
And, since the ANY caps where removed, there's no need to check for an initial
intersection.

Finally, the completion of caps features is done through a loop.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:16 +00:00
He Junyan
9f1887a623 glupload: Add a comment in DMA's propose_allocation query for video meta
The video meta API now is a mandatory request for DMA kind negotiation. In
current code, the raw method always adds that video meta API in the query
of propose_allocation(), so we do not need to do the duplicated task here.
Just adding a comment to declare that.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
He Junyan
f235e0308d vadeinterlace: Do not append ANY caps into pad template
Just like the vapostproc, we delete the ANY caps in pad template to
avoid unexpected negotiation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
He Junyan
38a4224c8c vapostproc: Do not append ANY caps into pad template
The ANY caps in pad template caps seems to mess up the DMA negotiation.
The command of:

GST_GL_API=opengl gst-launch-1.0 -vf videotestsrc ! video/x-raw,format=NV12 !
  vapostproc ! "video/x-raw(memory:DMABuf)" ! glimagesink

fails to negotiate, but in fact, the vapostproc can convert the input NV12
formant into the RGBA format to render.

The ANY may help the passthough mode, but we should make the negotiate correct
first.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6698>
2024-07-04 08:54:15 +00:00
Lim, Siew Hoon
e82eb628b1 vacompositor: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run later on.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:46 +00:00
Lim, Siew Hoon
f498ba25da vabasedec: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:45 +00:00
Lim, Siew Hoon
c270c5643d vabasetranform: Initialize the allocation related variables in decide_allocation()
Prevent garbage value has been pass thru and causing
pipeline fail to run.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7097>
2024-07-04 06:48:45 +00:00
He Junyan
e9801cb0a5 vah265enc: Set the trellis only when HW supports it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:07 +00:00
He Junyan
2049c7e050 vah264enc: Init missing fields in reset_state()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
He Junyan
5706e3566c vah264enc: Set the trellis only when HW supports it
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
He Junyan
5b27aff33b va: baseenc: Set the trellis parameter anyway
The driver may enable trellis by default. So we should also set the
trellis info to driver even when the trellis option is turned off.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6663>
2024-07-04 05:59:06 +00:00
jadarve
fd25409a70 doc: fix Since marker
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:22 +00:00
jadarve
3323245606 mpegts: Added missing function prototype
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
5c3f3d8f16 doc: fix docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
14c4d62915 doc: fix single line Since comments
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
7f35a4f7c3 doc: fix Since marker for gst_mpegts_descriptor_from_metadata_pointer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
fad36407bb doc: update docstrings
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
c12a861fb7 doc: update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
728c83f74d mpegtsmux: mux meta/x-id3
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
0a57f361ce mpegts: use GstMpegtsMetadataApplicationFormat in metadata descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
992a35b8f9 mpegts: added metadata pointer descriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:21 +00:00
jadarve
669a351c78 mpegts: moved metadata descriptors to gstmpegtsdescriptor
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6793>
2024-07-03 08:40:20 +00:00
Tim-Philipp Müller
154b84649f info: remove unused valgrind header include
Follow-up to commit a2cbf75523.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Tim-Philipp Müller
6cc25bd630 subparse: remove regex optimized flag explicitly
That way the other flags in jit_flags are not touched and
flags changes in future only need to be done in one place.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Tim-Philipp Müller
084f6b3fbe gst-plugins-base: put valgrind header availability define into config.h for subparse
Make the valgrind header avaibility accessible to any code in
gst-plugins-base, currently it was only signalled to unit tests.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7126>
2024-07-03 03:46:19 +00:00
Alicia Boya García
506af5b8e4 gst-validate: Don't treat FALSE when sending flushes as an error
gst_element_send_event(FLUSH_START / FLUSH_STOP) returns FALSE in cases
where any of the most downstream elements have unlinked pads, even if
the pipeline is successfully flushed.

Currently this is considered expected behavior in GStreamer. This patch
updates gst-validate to treat it as such and therefore not fail the test
for a "failing" flush.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7064>
2024-07-02 19:06:02 +00:00
Chris Spoelstra
0f7bb97e81 srtsrc: fix case fallthrough of authentication param
Add missing breaks to two case statements.
Also adds a missing lock of srtobject->element when getting the value
of PROP_AUTHENTICATION.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4367>
2024-07-02 16:49:32 +02:00
Matthew Waters
5bbeccbb65 qml/glsink: also support GLES2 needing shader 'precision' directives
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3616
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7024>
2024-07-02 12:54:59 +00:00
Edward Hervey
01b397601f subparse: Don't use jitted regex when used with valgrind
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7117>
2024-07-02 09:44:25 +02:00
Vivia Nikolaidou
331b37ac9a ptpclock: Fix typo in comments
s/continous/continuous/

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7121>
2024-07-02 00:08:28 +00:00
Edward Hervey
b2edab940a gstreamer/gst-tester: Don't leak thread
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:40 +00:00
Edward Hervey
61a8d4d43d gst-inspect: Fix leak of plugin/feature
Reordering changes the initial list head

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
2c1c1ec575 encoding-target: Chain up to parent class
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Edward Hervey
651568d543 encoding-profile: Chain up to parent class finalize
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7115>
2024-07-01 23:19:39 +00:00
Seungha Yang
c0a02affa4 d3d12: Add support for resource copy between d3d11 and d3d12
If driver can support cross-api resource sharing, use device-to-device
resource copy in d3d12upload/download elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Seungha Yang
6cac053549 d3d12bufferpool: Use shared heap by default
... to make cross-api resource sharing possible

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7119>
2024-07-01 20:18:42 +00:00
Shengqi Yu
1875c178cd v4l2object: use v4l2 reported width for padded_width when complex video formats
Stride means bytes per line, and padded_width means pixels. Here,
padded_width shoule be pix width reported by v4l2 instead of stride.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7076>
2024-07-01 18:53:04 +00:00
Sebastian Dröge
1159d7144a ges-uri-asset: Annotate async/sync/finish functions correctly
Due to bad naming, gobject-introspection can't figure these out itself and
prints a warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7118>
2024-07-01 13:10:27 +00:00
Edward Hervey
43bf898f2d nlecomposition: Don't leak atomic rc box
* gst_structure_get => increases ref
* query_ancestors_position: There are two refs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
8addeae87b nlecomposition: Don't leak message
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
734ca44805 ges-layer: Don't use invalid layers
There's a possibility that there are no layers at that priority

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Edward Hervey
5d7a35ca59 ges-discoverer-manager: Properly initialize/free GRecMutex
Fixes small leak of mutex internals

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7116>
2024-07-01 12:25:41 +00:00
Sebastian Dröge
f8fb72b0d7 ajasrc: Drop some frames after signal recovery
After signal recovery the capture times for the next frames are simply
wrong. Experimentally this affected 2-3 frames and seemed to be related
to the buffer fill level after signal recovery, so drop at least 5
frames and up to fill level + 1 frames in this situation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Sebastian Dröge
63dec7c704 ajasrc: Reset clock after signal loss or signal change
Otherwise timestamps would continue as if there was no gap, and the next
frames until the clock has compensated would be all too late.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7106>
2024-07-01 11:37:08 +00:00
Thibault Saunier
5f50b93f0a meson: Remove duplicated library definitions for gstmse and gstanalytics
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7109>
2024-06-30 15:43:27 +00:00
Seungha Yang
c2531853fc d3d12commandallocatorpool: Remove unused methods
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Seungha Yang
c013e88295 d3d12decoder: Use sub-allocated bitstream buffer
Since a buffer resource will occupy at least 64KB,
allocating upload resource per decoding command might not be
an optimal approach. Instead, use sub-region of a upload resource
for multiple decoding command if sub-regions are not overlapped
each other.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7108>
2024-06-29 20:47:39 +09:00
Jordan Petridis
60454336c8 validate: Remove G_REGEX_OPTIMIZE usage
It's not needed and causes issues with valgrind (which doesn't support jit)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7112>
2024-06-28 14:13:31 +00:00
Tim-Philipp Müller
b4ebf52f06 subprojects: update liblc3 wrap to 1.1.1
See https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407#note_2472538

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7111>
2024-06-28 13:38:36 +01:00
Guillaume Desmottes
037d36f28d rtmp2: guard against calling gst_amf_node_get_type() with NULL
gst_amf_node_get_type() raises a CRITICAL if called with a NULL node.
All callers were checking for this except those.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7103>
2024-06-28 07:18:29 +00:00
Xavier Claessens
84b3a0950d build: Add missing common options that are yielding in subprojects
- Align `glib_debug`, `glib_assert` and `glib_checks` options with GLib,
  otherwise glib subproject won't inherit their value. Previous names
  and values are preserved using Meson's deprecation mechanism.
- Add `extra-checks` and `benchmarks` options in the main project so it
  can be inherited in GStreamer subprojects.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1165>
2024-06-27 15:53:46 +00:00
He Junyan
77f779e86a vaav1enc: Move repeat header data to a dedicated buffer
When enable parallel encoding, it is possible that the unshown frame
is not output but it is already be marked as a repeated frame header.
So we need to use a dedicated buffer to hold the repeat frame header,
don't mix it with the orignal frame data.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6867>
2024-06-27 12:48:37 +00:00
Seungha Yang
fca7e5aa23 video: convertframe: Add support for d3d12 conversion
Use d3d12convert in case of d3d12 memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7095>
2024-06-26 17:56:41 +00:00
Seungha Yang
76fd732d42 qsv: Check d3d shared resource tier using D3D11 API
We can check the tier using d3d11 API. Thus, don't need to
create d3d12 device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7099>
2024-06-26 16:25:06 +00:00
Jan Schmidt
73480e60d0 adaptivedemux: Fix handling closed caption streams
Fix a typo "CLOSED_CAPTION" -> "CLOSED-CAPTION" and
a broken if statement that always bailed out for
closed captions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6985>
2024-06-26 13:44:27 +00:00
Jan Schmidt
2bd682d326 webrtcdsp: Enable multi_channel processing
Enable multi_channel processing in webrtc-audio-processing when the
input or output has multiple channels.

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3220
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7100>
2024-06-25 22:29:21 +10:00
Piotr Brzeziński
32d4e5f73c vtenc: Fix redistribute latency spam
Just a quick fix to only report the maximum noticed delay (measured by frames inside the encoder) instead of changing
the reported latency every time the number there changes, which is way too often.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7094>
2024-06-24 16:08:37 +02:00
Seungha Yang
e71ffe978a d3d12converter: Make sure data upload before executing compute shader
Use read d3d12 map, so that upload can happen if needed

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:49:19 +09:00
Seungha Yang
245e15eab0 d3d12: Add ARGB64_LE format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:11:21 +09:00
Seungha Yang
8c538c8122 d3d12: Add AV12 format support
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:11:13 +09:00
Seungha Yang
2703f41da6 d3d12: Add NV16, NV61, and NV24 format support
Can reuse NV12 shader for the formats

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
bb0f95a67f d3d12: Add A420, A422 and A444 format support
Adding A420/A422/A444 and its 10/12/16 bits format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
52bc28c93d d3d12: Add YUV 4:1:0 and 4:1:1 format support
Adding Y41B, YUV9, and YVU9 format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7093>
2024-06-24 20:10:50 +09:00
Seungha Yang
69ea20b739 d3d12videosink: Present on GstVideoOverlay::expose()
... so that updated backbuffer can be swapped and presented

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7079>
2024-06-24 08:46:24 +00:00
Seungha Yang
25514c8fc1 d3d12: Add v216, v210, r210, v308, IYU2, RGB, BGR format support
Reuse the compute shader implemented for d3d11

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
c1498851b3 d3d12: Add support for UYVY, VYUY, and YVYU
Use already implemented compute shaders

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
6fcb5f6ae7 d3d12: Add RGB{16,15} and BGR{16,15} format support
d3d12 device can support B5G6R5_UNORM and B5G5R5A1_UNORM formats
in pixel shader. If the format is not supported by device,
U16_UINT format with compute shader will be used, like d3d11converter

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:40 +09:00
Seungha Yang
94bb9fec58 d3d12: Add BGRA64 and BGR10A2 format support
Map BGRA64 and BGR10A2 to Y416 and Y410, respectively,
since it's possible RGB space decoder output

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:30:30 +09:00
Seungha Yang
66cc3ff84e d3d12: Add support for DXGI native packed YUV formats
Adding YUY2, Y210, Y216, and Y416 format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
2024-06-23 22:11:32 +09:00
Seungha Yang
dd4d85272e d3d12converter: Fix Y410 conversion
Adding format conversion helper and use compute shader in case that
output format does not support RTV.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
Seungha Yang
f432e61bdc d3d12memory: Add support for UAV descriptor cache
Cache shader invisible UAV descriptor in memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
Seungha Yang
ec06b0445e d3d12: Format table refactoring
Hide format table from header. This is a preparation for compute
shader based format support

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7088>
2024-06-23 10:53:18 +00:00
George Hazan
9e1abc0797 parsebin: fix compilation problem with Visual C++ 2017
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7089>
2024-06-22 20:56:03 +03:00
Tim-Philipp Müller
03a60c9950 subprojects: bump opus wrap to 1.5.2
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7085>
2024-06-22 12:26:22 +01:00
Seungha Yang
5d18d8a109 d3d12converter: Upload shader buffer resources earlier
Schedule (semi-)static resource upload at converter creation time.
And use single resource for all vertex, index, and constant
buffers, since separate resources will waste GPU memory.
Note that size and address of a committed resource are 64K aligned
even if requested buffer size is small.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7081>
2024-06-21 20:16:19 +09:00
Edward Hervey
a20569b1ba basesink: Remove field not used
It was never actually used since it was introduced as part of the commit
introducing support for instant rate

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7077>
2024-06-21 09:29:48 +02:00
Seungha Yang
c5785fbeec d3d12converter: Make gamma remap work as intended
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7073>
2024-06-20 17:54:12 +00:00
Sebastian Dröge
8117ee4fa3 queue, queue2, multiqueue: Timestamps of gap events must be valid
This is checked in gst_event_new_gap() so doesn't have to be checked again here,
but simply can be asserted with a g_return_if_fail().

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7071>
2024-06-20 20:02:43 +03:00
Sebastian Dröge
909cd6d865 queue: queue2: multiqueue: Don't work with segment.position if buffers have no timestamps
If the first buffers have no timestamp then the sink position would be
initialized to 0. The source pad might output this buffer, which would then
initialize the source position to 0 too.

Afterwards two buffers with a valid but huge timestamp might arrive before any
of them are output on the source pad. The first one would set the sink position
to a huge value, the second one would notice that the difference between the
huge value and 0 is certainly larger than max-size-time and consider the queue
as full.

Instead, simply don't update the times from buffers without timestamps and
assume whatever was set before is still valid, i.e. the buffer has the same
timestamp as the previous one.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7071>
2024-06-20 20:02:43 +03:00
Seungha Yang
e90880e988 d3d12device: Don't warn for out of range device index
It can happen during enumeration as well, and it's expected error

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7070>
2024-06-20 14:23:13 +00:00
Seungha Yang
2983c50a9f d3d12device: Dump device feature support
... and use CD3DX12FeatureSupport helper class in d3dx12.h

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7070>
2024-06-20 14:23:13 +00:00
Edward Hervey
11ff2b2835 decodebin3: Fix keyframe drop probe handling
We were storing the probe id in a different structure (DecodebinOutputStream)
than the pad it is targetting (which is in MultiQueueSlot).

The problem is that when re-targetting outputs (to a different slot)... we would
end up having an invalid probe id, or not have a reference to an existing one.

Instead, store the probe id in the same structure as the pad it's targetting

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Edward Hervey
6aa0c8442d decodebin3: Fix detection of selection done
We should not assert if there are still some old streams that are waiting to be
deactivated.

Instead wait for them to be gone before posting the selection done message

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7069>
2024-06-20 12:56:46 +00:00
Seungha Yang
bdb12db5c6 d3d12device: Prevent too many in-flight GPU commands
Even if each element is checking its own in-flight commands,
total number of commands can get larger in case of complex pipeline.
Limits total number of in-flight commands at command queue level

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:58:45 +09:00
Seungha Yang
143efa2f86 d3d12commandqueue: Detect device removed event
Early return if device removed event is detected

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:07:41 +09:00
Seungha Yang
327fb9924c d3d12basefilter: Add adapter property
Allows initial GPU adapter selection

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7066>
2024-06-20 00:03:28 +09:00
Seungha Yang
2ec7d82bd7 d3d12: Move fence setter helper method to gst-libs
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:48 +00:00
Seungha Yang
fa7c4a2e39 d3d12converter: Update API signature
Always use device's main direct queue, and control gpu waiting
behavior by using boolean value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:48 +00:00
Seungha Yang
f6eb3a01c0 d3d12memory: Hide fence value from header
Instead of exposing fence value to wait in header, user setter/getter
methods.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
49c4247cb3 d3d12device: Add helper method for getting fence handle
Add get_fence_handle() method so that caller can get command queue's
dedicated fence handle from device

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
289bc1d440 d3d12: Remove notify_com and notify_mini_object helper methods
Use private macros instead of exposing multiple APIs for the same thing

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
6942868bda d3d12commandqueue: Update API name and arguments
Accepts multiple fences since single command list may have
multiple dependent resources which are associated with
different GPU engines

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Seungha Yang
713ea313f8 d3d12device: Use HRESULT return code if possible
Make function signature consistent with that of command queue

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7057>
2024-06-19 13:19:47 +00:00
Stéphane Cerveau
a4c976dd20 vkdecoder: support layered and non dedicated DPB
As NVIDIA Amperium. In this case the each output buffer is also a DPB,
but using a different view layer.

Still pending a validation layer issue:

VUID-VkVideoBeginCodingInfoKHR-flags-07244

Co-authored-by: Victor Jaquez <vjaquez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6954>
2024-06-19 10:37:32 +00:00