Fixes a bug where playback would completely stop when manually seeking
to the end of the file. Playback should not officially stop until
playback has unpaused.
If seeking occurs too close to the previous time value, it could cause
the playback to delay an abnormal amount of time, or if the time value
is under the previous value, then it would cause an assert. So instead,
reset the next timestamp value to be instant in both cases if a seek
occurs to ensure timely playback.
(Note: This commit also modifies deps/media-playback)
Co-authored-by: Eric Lindvall <eric@5stops.com>
Co-authored-by: Ryan Foster <RytoEX@gmail.com>
Co-authored-by: Jim <obs.jim@gmail.com>
FFmpeg YUV to RGB conversions require extra destination padding.
The Mantis issue might have been fixed when some YUV format conversions
were moved to the GPU, but this may fix other YUV formats.
Fixes https://obsproject.com/mantis/view.php?id=1177
Instead of erroring out completely when it can't determine if the
certificate is valid, proceed anyway. This matches how web browsers
treat failed cert revocation checks. schannel just has somewhat
paranoid defaults.
Add PyDict_New and PyTuple_New to obs-scripting-python-import.[ch];
these functions are used by SWIG's generated code when I build OBS on
macOS with SWIG 4.0.1.
When using an IP camera on a local network, we wanted to minimize
delay. In order to achieve minimum delay, we allowed Media Source to
set BufferingMB to 0, and when it is 0, also enable AVFMT_FLAG_NOBUFFER
in the AVFormatContext flags.
SIMDE was introduced for aarch64 support, however, the library itself
supports non-SIMD fallback, which allows us provide support to other
platforms without code changes.
There is another world beyond x86. So we can simply enable SIMDE for
processors without SSE2 support.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
This fixes an issue where local files were using the avformat interrupt
callback, which is only supposed to be use to prevent blocking on
network calls.
The interrupt callback is designed to prevent the media source from
blocking; FFmpeg will internally call it periodically to prevent FFmpeg
function calls from blocking too long, and allow the caller to determine
whether blocking should stop.
The problem with this however is that AVERROR_EXIT causes the thread to
completely exit. This fixes it so that it treats it as an EOF rather
than as an abnormal error.
The current scripting directory path given to Python on OSX is
`../data/obs-scripting`. This works when bin/ and data/ are in the same
folder like rundir after a compile and in the old .app bundles but the
new normal .app bundle structure is different.
For bundles move obspython.py and _obspython.so to the binary folder,
just like the Lua one, and pass that bin path to the Python interpreter
so it can find it.
The current working dir isn't guaranteed to be set with .app bundles
so look up binary path at runtime.
_obspython.so currently links directly against python as @rpath/Python
and has 3 common python install paths set as rpaths so it would only
work if a user had python installed at one of those hardcoded paths.
Don't link _obspython against python at all but instead link it with
"-undefined dynamic_lookup" so when it is imported by python all it's
undefined python symbols get resolved at runtime against the user
supplied python instance loaded into the process earlier.
The rpaths aren't needed anymore this way.
The libpython .dylib files on MacOS are in the python_path/lib
subdir. The user supplied python_path still needs to be to the actual
python root and not lib/ as the root path get's used as python home dir
so just add lib/ when loading the dylib.
Cuda appears to be a bit buggy and can result in corruption where as
it's not being seen with other hardware decoders. Remove cuda for now
as a hardware decoder to prevent the possibility of corruption.
Fixes a bug where hardware frames would not transfer to RAM for the last
few frames of a video. The 'ret' variable can be 0 even though there
are still frames ready.