FFmpeg: Use promises for encoder/finalizer synchronization


RecordingEngine synchronization with encoder threads and finalizer was
done with circular semaphores, signals and boolean flags.

This patch refactors synchronization to utilize promises and futures to
provide encoder initialization resolutions and encoding start flag that
also represents header write status.

Pick-to: 6.12
Change-Id: I6d431a2fb35595773613ebc78239a5c4d29eb1f1
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
commit4a80f44cb01cb40c9545ef2ddede3dab3371e796
parenta756b6c36e70b59d13a35293acc4445aa18384b7
authorMikko Hallamaa <mikko.hallamaa@qt.io>
committerMikko Hallamaa <mikko.hallamaa@qt.io>
commit timeWed, 2 Sep 2026 07:55:36 +0000