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.
This fixes an issue where, when the MAX_CODECS length was equal to the
amount of supported codecs (3), it would leave the list without a null
terminator and crash when iterating over the elements.
During high graphics thread pressure it can take a significant time to
acquire the graphics lock. This change releases the OpenGL texture after
rendering to avoid the 2nd lock after sending the frame to FFmpeg. This
improves 99%-tile/100%-tile and median encode in a near encoder overload
scenario, and modestly raises the ceiling before encoder overload in my
test scene.
Master:
min=0 ms, median=4.29 ms, max=33.072 ms, 99th percentile=8.877 ms
min=0 ms, median=4.438 ms, max=77.157 ms, 99th percentile=9.853 ms
min=0 ms, median=4.527 ms, max=57.292 ms, 99th percentile=9.282 ms
This commit:
min=0.97 ms, median=3.009 ms, max=13.215 ms, 99th percentile=5.899 ms
min=1.181 ms, median=2.91 ms, max=9.854 ms, 99th percentile=5.56 ms
min=0.461 ms, median=3.013 ms, max=10.693 ms, 99th percentile=5.871 ms
Support building AJA plugins with either the new libajantv2 library, or
the deprecated ntv2 library.
Finder scripts updated to search for libajantv2 and fall back to ntv2 if
not found. This allows this PR to be merged without requiring a
corresponding update to the pre-built obs-deps packages.
Adds the `whip_output_audio` and `whip_output_video` output kinds,
which selectively advertise only video or only audio support.
To use these types, it is effectively the same as with the AV
version. Just create the output, assign your video or audio encoder,
and you're good.
libobs does not have support for "optional" outputs. With an AV output,
if you only assign a video or audio encoder, start will fail.
We used to swap in a buffer with (0,0,0,1) for all vertex colors for
drop shadows and outlines. However, this vertex buffer couldn't be
uploaded separately from the vertex data in OBS, so we were reuploading
the text vertices every frame.
Instead, let's use a uniform for this uniform data and save 500us (or
more when handles are visible), a significant portion of my test scenes
render time.
Pass down texture/host memory choice for fallback encoders. During
fallback we don't (can't) initialize a shared texture pool and should
use the regular host memory path.
This fixes usage on multi-GPU systems, and enables texture encoders.
We had these advances laying around but didn't use them here. Loading
the glyphs from the fonts is extremely slow, so let's avoid that since
we take the time to cache these already.