gstreamer/subprojects/gst-plugins-bad/sys
Víctor Manuel Jáquez Leal 301e281777 vabasedec: refactor format and capsfeature selection
This is a simplification of the venerable
gst_va_base_dec_get_preferred_format_and_caps_features() function, which
predates since gstreamer-vaapi. It's used to select the format and the
capsfeature to use when setting the output state. It was complex and hard to
follow. This refactor simplifies a lot the algorithm.

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

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

The refactor works like this:

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

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

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6154>
2024-02-22 20:59:13 +00:00
..
aja aja: Replace global semaphore with per-device flock() 2024-02-15 09:30:20 +00:00
amfcodec amfcodec: Update plugin cache 2024-02-10 01:18:27 +00:00
androidmedia androidmedia: add NDK implementation of Android MediaCodec 2024-01-11 19:00:13 +00:00
applemedia vtenc: Fix PAUSED->READY deadlock when output loop is running 2024-01-18 07:37:58 +00:00
asio meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
bluez avdtpsink: post error message when failing to start 2024-02-09 10:09:13 +00:00
d3d11 d3d11screencapturesrc: Hide symbols 2024-01-05 21:27:35 +09:00
d3d12 d3d12screencapturesrc: Fix choppy display 2024-02-11 13:13:18 +00:00
d3dvideosink d3dvideosink: Fix navigation event leak 2023-06-15 05:09:46 +00:00
decklink decklink: Fix typo in element documentation 2023-11-09 07:53:12 +00:00
directshow sys: avoid double definition of symbol MEDIASUBTYPE_I420 2023-03-23 00:56:04 +00:00
directsound meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
dvb doc: Fix newline char between authors 2023-05-20 05:48:23 +00:00
dwrite d3d11: Rework memory allocation params signalling 2023-11-27 15:14:09 +00:00
fbdev meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
ipcpipeline meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
kms kmssink: Add TIDSS auto-detection 2023-10-12 18:25:50 +00:00
magicleap meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
mediafoundation mediafoundation: Fix build with GST_DISABLE_GST_DEBUG 2023-11-03 13:31:03 +00:00
msdk msdk: Fix possible memory leaks 2024-02-22 11:53:06 +00:00
nvcodec nvdecoder: Enable zero-copy only if explicitly enabled 2024-02-13 12:37:07 +00:00
opensles meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
qsv qsv: use new plugin status message API 2024-02-21 00:58:19 +00:00
shm shm: drop use of GSlice allocator 2023-02-03 17:48:10 +00:00
tinyalsa meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
uvcgadget uvcsink: use the pad's current caps to update caps_changed 2023-10-06 15:55:23 +00:00
uvch264 meson: Add a wrap file for libgudev 2023-04-19 22:47:19 +00:00
v4l2codecs v4l2codecs: h264: Fix a memory leak on renegotiation 2024-02-15 22:37:11 +01:00
va vabasedec: refactor format and capsfeature selection 2024-02-22 20:59:13 +00:00
wasapi wasapi: Fix alloc/free function mismatch 2024-02-21 21:03:32 +00:00
wasapi2 wasapi2: Fix task memory leak 2024-02-21 21:03:32 +00:00
wic bad: Update indent 2023-02-28 10:12:31 +00:00
win32ipc win32ipc: Fix pipe handle leak 2023-08-23 18:33:04 +09:00
winks ksdeviceprovider: Fix crash while probing device caps 2024-02-09 14:09:07 +00:00
winscreencap winscreencap: Warn for deprecated plugin use 2022-12-08 17:48:11 +00:00
meson.build aja: Integrate AJA plugin into the build system 2023-10-26 09:36:09 +03:00