gstreamer merge requestshttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests2024-03-28T12:55:31Zhttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6451v4l2src: need maintain the caps order in caps compare when fixate2024-03-28T12:55:31ZHaihua Huv4l2src: need maintain the caps order in caps compare when fixateif the calculated "distance" of caps A and B from the preference are equal, need to keep the original order instead of swap them.
eg, when run below cmdline
```
gst-launch-1.0 v4l2src device=/dev/video3 ! videoconvert ! video/x-raw,form...if the calculated "distance" of caps A and B from the preference are equal, need to keep the original order instead of swap them.
eg, when run below cmdline
```
gst-launch-1.0 v4l2src device=/dev/video3 ! videoconvert ! video/x-raw,format=YUY2,width=1920,height=1080 ! videoconvert ! waylandsink
```
User want to use yuy2 instead NV16 as v4l2src's output, but the actual result is NV16 is placed in the first place
```
0:00:00.642391213 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:535:gst_v4l2src_fixate:<v4l2src0> Preferred size 1920x1080
0:00:00.642556591 17684 0xffff7c000b70 TRACE v4l2src gstv4l2src.c:478:gst_v4l2src_fixed_caps_compare: Placing video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1 before video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
0:00:00.642671469 17684 0xffff7c000b70 TRACE v4l2src gstv4l2src.c:478:gst_v4l2src_fixed_caps_compare: Placing video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1 before video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1
0:00:00.642779221 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:558:gst_v4l2src_fixate:<v4l2src0> sorted and normalized caps video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1; video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV12, pixel-aspect-ratio=(fraction)1/1; video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, pixel-aspect-ratio=(fraction)1/1
0:00:00.665755453 17684 0xffff7c000b70 DEBUG v4l2src gstv4l2src.c:617:gst_v4l2src_fixate:<v4l2src0> fixated caps video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)60/1, format=(string)NV16, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
```GStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orgGStreamer Marge Botgitlab-merge-bot@gstreamer-foundation.orghttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6446vtdec: Improve error handling in edge cases2024-03-28T12:51:01ZPiotr Brzezińskivtdec: Improve error handling in edge casesFixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3425
Just ignoring these kinds of errors seems to be enough, as the faulty frame is (from my testing) always flagged to be skipped anyway. The decoding session does not s...Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3425
Just ignoring these kinds of errors seems to be enough, as the faulty frame is (from my testing) always flagged to be skipped anyway. The decoding session does not seem to need to be recreated or anything like that.
Also fixes vtdec being too trigger happy about aborting when an error-flagged frame appears.
```
vtdec: Handle some errors without stopping the decoder
ReferenceMissingErr is not critical and the simplest solution is to just ignore it. The frame has
the FrameDropped flag set when it occurs, so we can just drop it as usual.
BadDataErr is also not immediately critical, but in its case let's set the ERROR flag,
so the output loop can use GST_VIDEO_DECODER_ERROR to count and error out if it happens too many times.
```
```
vtdec: Use GST_VIDEO_DECODER_ERROR instead of aborting when frame has an ERROR flag
This was already being used in handle_frame() for errors that happen when queueing a frame for decoding,
let's do the same when a frame is flagged with an error in the output callback.
From quick testing, this makes seeking more reliable (previously, it would sometimes cause a decoding error
and shut the whole decoder down due to GST_FLOW_ERROR).
```https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6407gst-plugins-bad: Assorted fixes for MSVC2024-03-20T13:12:36Zamysparkgst-plugins-bad: Assorted fixes for MSVCHi all,
This MR is to fix some symbol visibility and dependency fallback issues I found in upstream dependencies, that break building out-of-the-box under MSVC. They are explained in the individual commits. The change in particular for ...Hi all,
This MR is to fix some symbol visibility and dependency fallback issues I found in upstream dependencies, that break building out-of-the-box under MSVC. They are explained in the individual commits. The change in particular for liblc3 was reported here: https://github.com/google/liblc3/issues/48 .
Let me know what you think.https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6400vkh26xdec: a couple decoding fixes2024-03-19T04:24:45ZVíctor Manuel Jáquez Lealvkh26xdec: a couple decoding fixes* remove unused variables
* vkh265dec: fix the used layered dpb usage
* implement close() vmethod to fix validation layer error at EOS* remove unused variables
* vkh265dec: fix the used layered dpb usage
* implement close() vmethod to fix validation layer error at EOShttps://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6398vulkan & va: sink floating references2024-03-19T20:20:59ZVíctor Manuel Jáquez Lealvulkan & va: sink floating referencesWhile compiling with Ubuntu 23.04, I got some warnings related with unref'ing floating references. So, this is the fix.While compiling with Ubuntu 23.04, I got some warnings related with unref'ing floating references. So, this is the fix.https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6144v4l2: silence valgrind warning2024-02-28T02:06:21ZTim Blechmannv4l2: silence valgrind warningValgrind complains about uninitialized memory used in an ioctl
```
==170306== Thread 11:
==170306== Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s)
==170306== at 0x719294F: ioctl (ioctl.c:36)
==170306==...Valgrind complains about uninitialized memory used in an ioctl
```
==170306== Thread 11:
==170306== Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s)
==170306== at 0x719294F: ioctl (ioctl.c:36)
==170306== by 0x3126A817: gst_v4l2_fill_lists (v4l2_calls.c:185)
==170306== by 0x3126A817: gst_v4l2_open (v4l2_calls.c:589)
==170306== by 0x3123F1C2: gst_v4l2_device_provider_probe_device (gstv4l2deviceprovider.c:122)
==170306== by 0x3123F648: gst_v4l2_device_provider_device_from_udev (gstv4l2deviceprovider.c:301)
==170306== by 0x3123F998: provider_thread (gstv4l2deviceprovider.c:395)
==170306== by 0x796FA50: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4)
==170306== by 0x710CAC2: start_thread (pthread_create.c:442)
==170306== by 0x719DA03: clone (clone.S:100)
==170306== Address 0x44008a34 is on thread 11's stack
==170306== in frame #1, created by gst_v4l2_open (v4l2_calls.c:524)
==170306== Uninitialised value was created by a stack allocation
==170306== at 0x3126A024: gst_v4l2_open (v4l2_calls.c:524)
==170306==
```Tim BlechmannTim Blechmann