The existing caption insertion implementation is to add H.264 specific
SEI NALs, because of this we will skip caption insertion unless the
video stream is H.264. This prevents corruption of AV1/HEVC/etc.
We will now keep a per track list of caption data. When caption
insertion is triggered we will add that to the list for each actively
encoding video track. When doing interleaved send, we pull the data
from the caption data for the corresponding video. This ensures that
captions get copied to all video tracks.
Rewrites the `struct video_frame` implementation, resolving a few
hidden bugs, and improving memory alignment reliability. Should also
make it much easier to implement and maintain texture formats in this
part of the codebase.
Calling `set_higher_ts` before offsets are known pollutes
`highest_video_ts` with timestamps that are out of range of actual
timestamps. They're generally somewhere high above 0 until an
offset for all streams is found, where they are then reset to 0 or
slightly below 0 in the presence of b-frames.
`highest_video_ts` also needs to start below 0 for the same reason.
Even with timestamps being reset to close to 0, b-frames will
cause initial DTS to drop below 0, thus we need a value that should
"always" be below any "real" timestamps observed.
`highest_video_ts` tracking now only starts once all input streams
are ready, and is computed based on all buffered packets at that
point.
NV12 and P010 device functions were not exported on all platforms.
Windows was exporting from C files instead. After CMake 3.0 we started
hiding symbols and resolution failed.
w32-pthreads is not correctly added to the generated CMake project
if the UI subdirectory is not also included, which leads to builds
configured without UI to fail.
In order to support crop_to_bounds, deprecates:
obs_sceneitem_set_info
obs_sceneitem_get_info
In favor of:
obs_sceneitem_set_info2
obs_sceneitem_get_info2
New space availability keys seem to have very specific file system
requirements not documented anywhere. Using the opportunistic free
space key opportunistically (and falling back on the legacy value
otherwise) should always yield a "good-enough" free disk space value.
As the comment mentions this only occurs during an encoder stall on the
first frame. On D3D both gs_texture_t's are actually a single D3D
texture object and both planes are copied during gs_copy_texture, for
everyone else we need to copy the textures separately as they are
independent OpenGL textures.
This adds gs_enum_adapters and gs_get_adapter_count to the opengl
backend and promotes these to multiplatform graphics functions.
However we need to make an internal device change, device_enum_adapters
must pass in the current device on opengl to ensure that adapter #0 is
the display adapter. We do this to avoid changes to plugins already
checking against obs_video_info.adapter which is always 0 and expected
to be the device OBS was initialized on.
The actual implementation reports the dri render node (or /Software).
This allows plugins to query non-video features of the adapters like
VA-API/NVENC/etc or other cross device functionality. `/Software` is
chosen to avoid opening random files in the current directory if its
passed along as a file path like the regular dri render nodes.
Enable all of the previously Windows only paths for OpenGL backends that
support encode_texture2
Co-authored-by: Torge Matthies <openglfreak@googlemail.com>
Transition from using popen() to using fork()/dup2()/execl() to provide
a way to read stderr from ffmpeg.
Co-Authored by: PatTheMav <PatTheMav@users.noreply.github.com>
MSVC noticed inline is not allowed, and new/delete replacments also
don't belong in a header file. We're also just leaning on
__STDCPP_DEFAULT_NEW_ALIGNMENT__ being 16 for MSVC x64 now.
To prevent sources from having to take too much extra consideration into
threading, defer the media control functions that directly affect
functionality to the video thread. Getters will still have to take
threading into account, but this should make things much more trivial
for media controls thread-wise.
(Lain note: Context: I noticed that things such as the slide show
require mutexes due to their media controls, and I felt that it was
largely unnecessary and that libobs should mitigate the threading issue
itself and keep it all in the video thread like it should be. Again, the
getters are still going to require *some* consideration into threading
but in terms of threading, for the type of stuff we're doing, querying
state is far more trivial to take into consideration.)
The OBS_SOURCE_CONTROLLABLE_MEDIA flag is required for controllable
media callbacks to be usable. These checks are being added so we can
defer most controllable media callbacks to the video thread.
(Lain note: This is mostly so more (yes more) can be added to this
god-forsaken structure without it getting too messy. In terms of actual
code, I need to be better about writing actual code comments. ...Meaning
that I actually need to start writing code comments.)