This reverts commit ce4c99be4e.
This was causing infinitely looping log errors in systems with no
CUDA-capable hardware when hardware decoding was enabled on video
capture devices with custom config enabled.
On some systems (eg. mine), VAAPI fails on vaInitialize. Valgrind was
able to spot that the device was not being closed, and it appears to
have been correct. This fixes a memory leak.
Before we used the default value set by libdatachannel. At
higher bitrates the cache would be undersized. Because of the undersized
cache we wouldn't have enough NACK history to fix the stream.
Adds index correction present in QSV test binary to Windows encoder
initialization as well. This is necessary when the adapter index of the
Intel GPU is not the same as the "implementation" index in MFX.
Previously, we just checked for H264 regardless of which codec was
selected. This mostly worked, but on Fedora they ship AV1 without H264
or HEVC. In that case users wont see AV1 as an option.
Per [1] type 3 chunks/RTMP_PACKET_SIZE_MINIMUM always use
the previously sent (delta) timestamp as their _delta_ timestamp,
so we need to inspect whatever was previously sent, rather than just
looking at the previous packet's absolute timestamp. I.e., type 3
chunks are only permissible in this case if the previously encoded
(delta) timestamp equals the current delta timestamp.
[1] https://rtmp.veriskope.com/docs/spec/#53124-type-3
Also changes clang-format SeparateDefinitionBlocks to Leave on ObjC
files, which avoid having an empty new line after API_AVAIABLE and the
declaration.
If an output does not support HEVC, it should not advertise it. For
services, however, a service primarily defines the codecs which are
supported for the protocol spec itself/destination platform, so HEVC
can be advertised still.
Allow to select both main type of ScreenCast (monitor, window)
with only one source type rather than adding a source type per
ScreenCast type.
This change is made as a new Screen Capture source type which
obsoletes the use of the previous Screen Capture (monitor-only)
and Window Capture.
`obs_output_initialize_encoders()` and can_begin_data_capture are
already being called in the `Start()` function, so these duplicate
calls serve no function.
I'm assuming they were introduced accidentally during a previous
refactor.