(This commit also modifies obs-ffmpeg)
This change was meant for track matte stingers to prevent the last frame
from having risk of flashing due to their transparent nature, but this
code had a negative side effect on normal stingers as well.
Fixesobsproject/obs-studio#8981
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
Stingers -- and especially track matte stingers -- are currently subject
to real time decoding, which can be detrimental in a production
environment where a stinger video may not be able to decode in a timely
fashion.
To remedy this, this change adds an option to fully decode stingers
immediately and cache the decoded video/audio in RAM for playback to
greatly improve stinger performance.
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.
This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
Regular SDR/HDR stingers, and SDR track matte should work. HDR track
matte might work, but would take a carefully crafted video that takes
the SDR white level into account, and this hasn't been tested.
On Windows, All Files was added by default with (*), but on macOS and
Linux this appeared as an empty option in the dropdown and treated as a
Video Files filter rather than All Files.
This also adds proper translation handling for 'Video Files', matching
the obs-ffmpeg-source.
Fixes#5870
Although obs_source_add_active_child indicates to a child source that a
child source needs to activate, sources will not activate until the next
tick. However, because the transition start call is made from within the
UI thread, the time in which the media source renders is not guaranteed
to be activated by the time the stinger renders due to a potential race.
Thus he media source of a stinger is not guaranteed to be activated,
causing a brief flash. This also applies when stopping a stinger.
This problem normally doesn't really affect normal stingers; instead, it
affects track matte stingers because it is critical for them to be on
time in order to have the mask data.
In order to solve this, check to see if the underlying media source is
actually active and able to render when performing the masking.
Because it's not currently possible to guarantee synchronization between
two separate media files (yet), disable separated track matte media
files for now. It'll just result in support requests that can't be
solved.
Fixes a memory leak with stinger texrender objects. These functions must
be called while the graphics context is locked. Caught via warnings
generated by the destroy functions.