Commit graph

119701 commits

Author SHA1 Message Date
Rafael Caricio c9a79b7387 av1parse: Add level and tier to caps
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6778>
2024-05-02 16:31:53 +00:00
Loïc Le Page 9d703439f1 pitch: add validate tests
Add pitch tests with different forward and backward playback rates.
Those tests depend on the libSoundTouch version to validate the buffers
checksums. The actual version uses libSoundTouch 2.3.2, use the
`--force-fallback-for=soundtouch` meson option to build using the same
version.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-02 13:26:09 +02:00
Loïc Le Page b628f1bc8f pitch: add interactive test
Test pitch with different forward and backward playback rates.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-02 10:24:30 +02:00
Loïc Le Page 8f5325ed11 pitch: make it work with reverse playback
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-01 20:12:02 +00:00
Loïc Le Page 35165da586 pitch: fix multithread accesses
- fully protect accesses to the libsoundtouch API that is not
  thread-safe.
- fully protect accesses to GstPitch members that could be read by a
  downstream query thread while written by an upstream streaming thread
  or a user thread.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-01 20:12:02 +00:00
Loïc Le Page 9f5bb30d3a pitch: refactor some variables names
- use the `GST_PITCH_GET_PRIVATE` accessor when needed
- rename `out_seg_rate` to `output_rate` to use the same name as the parameter
- rename `seg_arate` to `segment_applied_rate` to improve readability
- apply gst-indent to gstpitch.hh/cc

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-01 20:12:01 +00:00
Loïc Le Page 7f4c0e6fb1 pitch: fix time ratio computation
When changing playing rate, the output segment was not correctly
calculated because the stream time ratio was computed using the previous
input segment rate instead of using the actual rate. This was producing
wrong results for the output segment start and end values.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-01 20:12:01 +00:00
Loïc Le Page d5734159d1 videorate: add validate tests
Add tests with different reverse playback speeds.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6247>
2024-05-01 20:12:01 +00:00
Seungha Yang e6b9a45bfe qsvh264dec,qsvh265dec: Fix nalu leaks
Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3514
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6781>
2024-05-01 10:38:05 +00:00
Sebastian Dröge ec42cedf63 encoding-profile: Fix nullability of (de)serialization functions
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6775>
2024-05-01 09:51:35 +00:00
Piotr Brzeziński bfb7cf7d0b vtdec: Fix PAUSED->READY deadlock when output loop is running
Makes sure the GST_PAD_STREAM_LOCK is not taken when pad is being deactivated.
The lack of this was causing deadlocks when stopping the pipeline right after producing first buffers.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6783>
2024-05-01 08:59:37 +00:00
Stéphane Cerveau 10ce5a6857 vkh26xdec: Fix stop memory leak
The h26xdecoder 'stop' method was not called
as the vulkan h26x class rewires the video decoder
'stop' base method to its own one.

It was causing some memory leaks such as dangling parser
and dpb in h26xdecoder base class.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6782>
2024-04-30 18:51:10 +00:00
Edward Hervey dd3344fd2e ges-pipeline: Configure encodebin before linking
Modifying the `avoid-reencoding` property of `encodebin` could potentially cause
it to reconfigure itself, in which case the source pad will be removed and then
re-added.

Therefore set that property *before* attempting to link to that pad.

Fixes smart-render

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6757>
2024-04-30 15:47:41 +00:00
He Junyan 0c81d1a1e7 vabaseenc: delete the useless frame counter fields
They are used to calculate the PTS and DTS before, no usage now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6773>
2024-04-30 07:51:13 +00:00
He Junyan 477fea97b4 vabaseenc: Do not set the min_pts
Because all the va encoders improved their PTS/DTS algorithm, now
it is impossible to generate minus DTS. So no underflow will happen
and we do not need to set a 1000 hour offset now.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6773>
2024-04-30 07:51:13 +00:00
Matthew Waters 184d94305c glcolorconvert: add support for planar yuv->planar yuv conversions
Currently only supported by keeping the same colorimetry and is only
a repacking operation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6596>
2024-04-30 05:58:55 +00:00
Matthew Waters 674e643428 glcolorconvert: use color matrices
Allows programatically supporting whatever new formats are added to
libgstvideo.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6596>
2024-04-30 05:58:55 +00:00
Mengkejiergeli Ba 9480197377 msdk: Add Y212 format to hevc encoder static raw caps
Note that static caps is used for the old MSDK dispatch.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6750>
2024-04-30 04:05:29 +00:00
Sebastian Dröge e68eccff10 exiftag: Prevent integer overflows and out of bounds reads when handling undefined tags
Fixes ZDI-CAN-23896
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3483

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6766>
2024-04-29 20:06:22 +00:00
Shengqi Yu a92167ea6e glmixer: Add GL_SYNC_META option to bufferpool
when pipline is
glvideomixerelement->glcolorconvertelement->gldownloadelement and
glcolorconvertelement is not passthrough, the gl bufferpool between
glvideomixerelement and glcolorconvertelement will not add gl sync meta
during allocating buffer. This will cause that glcolorconvert's inbuf
has no sync meta to wait for.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6756>
2024-04-29 19:15:39 +00:00
François Laignel 59e17fa931 rtp: add value annotation for GST_RTP_VALID_VALUE
... otherwise its value is not available to bindings.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1425#note_2384464

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6762>
2024-04-29 18:27:40 +00:00
Edward Hervey 9c10726ae1 gstvalue: Add a GstAllocationParams to String conversion
Avoids ending up with plenty of warnings when serializing GstStructure
containing GstAllocationParams

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6714>
2024-04-29 16:01:33 +00:00
He Junyan ae68d9dda5 vah265enc: Set the correct buffer flag for output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
2024-04-29 13:25:09 +00:00
He Junyan d06b12c6f1 vah264enc: Set the correct buffer flag for output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
2024-04-29 13:25:09 +00:00
Seungha Yang b66834787c vabaseenc: Fix frame leak on error path
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
2024-04-29 13:25:09 +00:00
He Junyan c013b03a19 vah265enc: Do not touch the PTS of output frame
1. The PTS of all frames should not be changed.
2. Just update the DTS based on the PTS. For the frame which is not
   reordered, the DTS is equal to PTS. For frame which is reordered,
   the DTS is equal to previous DTS. For example:
   Input: F0[D0, P0] -- F1[D1, P1] -- F2[D2, P2] -- F3[D3, P3]
   Output: F0[I, D0, P0] -- F3[P, D0, P3] -- F1[B, D1, P1] -- F2[B, D2, P2]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
2024-04-29 13:25:08 +00:00
He Junyan 4d1a48c9e9 vah264enc: Do not touch the PTS of output frame
1. The PTS of all frames should not be changed.
2. Just update the DTS based on the PTS. For the frame which is not
   reordered, the DTS is equal to PTS. For frame which is reordered,
   the DTS is equal to previous DTS. For example:
   Input: F0[D0, P0] -- F1[D1, P1] -- F2[D2, P2] -- F3[D3, P3]
   Output: F0[I, D0, P0] -- F3[P, D0, P3] -- F1[B, D1, P1] -- F2[B, D2, P2]

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6703>
2024-04-29 13:25:08 +00:00
Tim-Philipp Müller eec64e372b rtph264depay: fix FU-B handling
Skip extra 16-bit DON in FU-B header.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/806

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6607>
2024-04-29 12:21:52 +00:00
Tim-Philipp Müller b1a45b527a rtph264depay: minor refactoring of FU handling code
Make code easier to follow, and prepare for next commit.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6607>
2024-04-29 12:21:52 +00:00
Edward Hervey 777c8a9b15 structure: Add a serialization for GArray in GstStructure
Instead of constantly spurting out warnings in the log files

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6691>
2024-04-29 11:05:44 +00:00
William Wedler 9ad6a9b942 fix: qmlglsink: video content resizes to new item size
Mark geometry dirty when the item rectangle changes in the
QtGLVideoItem::updatePaintNode method. This allows changes in the bounding
rectangle to be applied to the scene graph geometry node.

Fixes #3493

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6711>
2024-04-29 02:57:06 +00:00
William Wedler c02af39026 fix: qml6glsink: video content resizes to new item size
Mark geometry dirty when the item rectangle changes in the
QtGLVideoItem::updatePaintNode method. This allows changes in the bounding
rectangle to be applied to the scene graph geometry node.

Fixes #3493

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6711>
2024-04-29 02:57:06 +00:00
Seungha Yang cb20a371c2 d3d12decoder: Fix d3d12 resource copy
It was copying to self resource

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6753>
2024-04-28 15:31:19 +00:00
Seungha Yang 84f4068036 nvh265encoder: Fix crash with RGBx and BGRx
Both formats need to be handled in switch

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6752>
2024-04-28 23:34:37 +09:00
Seungha Yang 46131f0cb0 d3d12ipcclient: Fix deadlock when copying texture
Fixing deadlock in below case
* GC lock is taken by background thread, and the background thread calls
  gst_d3d12_ipc_client_release_imported_data() which takes ipc lock
* ipc lock is already taken in ipc thread and trying to pushing GC data
  via gst_d3d12_command_queue_set_notify()
* gst_d3d12_command_queue_set_notify() is trying to take GC lock
  but it's already taken by background thread

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 19932cf178 d3d12ipcsink: Handle external fence
Waits external fence before sending frame to peer.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang b7844ef307 d3d12decoder: Remove CPU-side waiting
Sets decoder command queue's fence to memory instead of waiting
from decoder's output thread. CPU-side waiting will happen
only if download is required.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang a05961ab7b d3d12screencapturesrc: Fix output to non-d3d12 element
Configures upload/download flags to memory after write

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang e29655e9ca d3d12screencapturesrc: Release and flush d3d11 objects before d3d12
Fixing device-removed error when closing pipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 3e08cdeebe d3d12memory: Do not wait external fence on map()
Only wait for external fence if upload or download is required.
Waiting for external fence in case of d3d12 mapping is caller's
responsibility

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 2c203e0d40 d3d12encoder: Handle external fence explicitly
Waits for external fence if any

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 2a14793ee1 d3d12converter: Add support for GPU-side external fence waiting
Ideally, GPU waiting should be scheduled just before executing command list.
But handling the case outside of converter is a bit complicated.
Under an assumption that constructed command list will be executed
immediately, schedules GPU-side waiting inside of conversion method
to simplify the flow.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang c95725bb79 d3d12memory: Use explicit type for GST_MAP_D3D12 define
C++ compiler will complain about different type between int and GstMapFlags

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 87f43c25cc d3d12frame: Extract external fence from memory and wait helper function
Adding gst_d3d12_frame_fence_{gpu,cpu}_wait() methods

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 478e49dd73 d3d12: Update copy_texture_region() method
Pass external fence value if any and allow passing fence
data so that dependent resources can be released
once copy is done

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang d8aa2eea83 d3d12commandqueue: Add execute_wait_and_command_lists() method
... so that GPU-side waiting and executing can be scheduled at once

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang ebb64dfd0d d3d12memory: Add get_external_fence() method
Required for caller to wait external fence without map() method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
Seungha Yang 00924d4820 d3d12bufferpool: Sync all memory objects on acquire_buffer()
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6749>
2024-04-28 12:49:07 +00:00
He Junyan ae5361b7fa vabaseenc: No need to call _finish_subframe()
After vaav1enc is aligned to TU, there is no case that generates
multi output for one input.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6688>
2024-04-28 07:49:02 +00:00
He Junyan 8d0a1a0c56 vavp9enc: Set the correct buffer flag for output
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6688>
2024-04-28 07:49:02 +00:00