jp9000 eabebd1774 obs-ffmpeg: Fix deadlock with nvenc lookahead
Lookahead requires examining frame data over a large number of frames,
so when pkv added the change to fully reset the encoder when the bitrate
changes, nvenc will invalidate all buffers and basically starts over
from a completely clean slate.

It's possible to make lookahead work when changing the bitrate, but due
to how lookahead seems to works internally in nvenc, it will cause
continually increasing latency every time the bitrate is updated, which
is unideal.

Additionally, when lookahead is enabled, deadlocks can occur when
changing the bitrate in a thread other than the graphics thread.
Currently we allow it to be reset outside of the graphics thread.  From
limited investigating, it would appear this deadlock occurs because
nvenc is locking and releasing old textures.

So instead of dealing with all these potential issues, disable the
ability to adjust bitrate when the user has lookahead enabled on nvenc.
It's not really worth implementing dynamic bitrate support when
lookahead is enabled if the latency is just going to continually
increase for every bitrate adjustment anyway.
2019-10-04 04:39:15 -07:00
..
2019-09-17 23:21:00 +02:00
2019-02-25 08:07:08 -08:00
2019-09-20 08:14:16 -07:00
2019-09-17 23:21:00 +02:00
2019-06-23 23:49:10 -07:00
2019-09-17 23:21:00 +02:00
2019-09-17 23:21:00 +02:00