gstreamer/subprojects/gst-plugins-bad/sys
Piotr Brzeziński 1a28d541a4 vtenc: Restart encoding session when certain errors are detected
Sometimes under certain loads, VT can error out with kVTVideoEncoderMalfunctionErr or kVTVideoEncoderNotAvailableNowErr.
These have been reported to happen more often than usual if CopyProperty/SetProperty() is used close to the encode call.
Both can be worked around by restarting the encoding session.

These errors can be returned either directly from VTCompressionSessionEncodeFrame() or later in the encoding callback.
This patch handles both scenarios the same way - a session restart is be attempted on the next encode_frame() call.

If the error is returned immediately by the encode call, it's possible that some correct frames will still be given to
the output callback, but for simplicity (+ because I wasn't able to verify this scenario) let's just discard those.

In addition, this commit also simplifies the beach/drop logic in enqueue_buffer.

Related bug reports in other projects:
http://www.openradar.me/45889262
https://github.com/aws/amazon-chime-sdk-ios/issues/170#issuecomment-741908622

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7449>
2024-09-09 13:40:00 +00:00
..
aja aja: Replace global semaphore with per-device flock() 2024-02-15 09:30:20 +00:00
amfcodec amfcodec: Add plugin status message 2024-02-22 23:30:29 +00:00
androidmedia androidmedia: add NDK implementation of Android MediaCodec 2024-01-11 19:00:13 +00:00
applemedia vtenc: Restart encoding session when certain errors are detected 2024-09-09 13:40:00 +00:00
asio asio: Fix {input,output}-channels property handling 2024-03-14 13:46:28 +00:00
bluez avdtpsink: post error message when failing to start 2024-02-09 10:09:13 +00:00
d3d11 d3d11compositor: Fix transparent background mode with YUV output 2024-07-16 17:02:08 +00:00
d3d12 d3d12compositor: Fix transparent background mode with YUV output 2024-07-16 17:02:08 +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 dwrite: Fix crash on device update 2024-04-08 11:38:43 +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: Do not close the DRM prime handle twice 2024-05-23 23:08:36 +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 infinite loop in device provider 2024-04-21 16:56:39 +01:00
msdk msdk: replace strcmp with g_strcmp0 2024-08-13 18:13:56 +01:00
nvcodec nvcodec: Accept progressive-high profiles for h264 2024-05-17 13:14:23 +01:00
opensles meson: Call pkgconfig.generate in the loop where we declare plugins dependencies 2022-09-01 21:17:35 +00:00
qsv qsv: Fix critical warnings 2024-07-27 23:16:01 +01: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 uvcgadget: Use g_path_get_basename instead of libc basename 2024-06-13 01:18:29 +01:00
uvch264 meson: Add a wrap file for libgudev 2023-04-19 22:47:19 +00:00
v4l2codecs v4l2codecs: decoder: Reorder caps to prefer DMA_DRM ones 2024-05-09 23:46:16 +01:00
va va: don't use GST_ELEMENT_WARNING in set_context() vmethod 2024-08-19 15:09:50 +01: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