Commit graph

354 commits

Author SHA1 Message Date
Jim 6eace37e06
Merge pull request #8229 from derrod/hashed-tables
Hashtable Adventures
2023-03-19 00:34:44 -07:00
gxalpha 283b6a4789 deps/file-updater: Use LOG_INFO log priority for info logging 2023-03-18 15:32:35 -07:00
derrod d0554e25c1 deps: Add uthash 2023-03-18 10:46:28 +01:00
derrod 198c2b9e86 media-playback: Fix libavutil version check 2023-03-10 08:15:54 +01:00
derrod 3eff81207e deps: Remove lzma 2023-03-07 15:34:27 -05:00
Ricardo Tavares 0516371823 deps/media-playback: Enable CUDA HW decoder 2023-03-03 21:47:40 +00:00
pkv 2e79d4c902 obs-ffmpeg: Fix for FFmpeg 6 deprecating a flag
Also modifies libobs & deps/media-playback.
AV_CODEC_CAP_TRUNCATED was removed in avcodec 60 [1].
We ifdef the code depending on it to allow compilation.

[1] avcodec: remove FF_API_FLAG_TRUNCATED
3ceffe7839

Signed-off-by: pkv <pkv@obsproject.com>
2023-03-01 13:23:51 -05:00
Jim 4bf14d09b4 obs-transitions: Add option to preload stinger video to RAM
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.
2023-02-25 18:13:11 -08:00
PatTheMav cfa0dc573e media-playback: Fix non-exhaustive switch statement 2023-02-18 15:22:33 -08:00
PatTheMav 7035ca7964 libcaption: Fix missing newline at the end of file 2023-02-18 15:22:33 -08:00
PatTheMav 318db2842a obs-scripting: Add PyType_Modified import for Swig 4.1.1 compat 2023-02-04 15:26:38 -08:00
tytan652 918c0c0aeb deps/media-playback: Fix deprecation warning 2023-01-28 23:20:41 -08:00
tytan652 e13e0937a2 obs-scripting: Fix compilation warnings on Clang and GCC
* Fix unused-parameter when Python is disabled
* Calm PySys_SetArgv deprecation since Python 3.11
2023-01-28 23:20:41 -08:00
tytan652 f147be2d68 obslua: Ignore maybe-unitialized warning with SWIG and GCC
Only with SWIG version earlier than 4.1 because it is fixed upstream.
fa2f9dc5da
2023-01-19 13:08:46 -05:00
tytan652 2d7e854476 deps/jansson: Disable warnings on Clang and GCC 2023-01-19 13:08:46 -05:00
tytan652 c6a8b03719 obs-scripting: Fix compilation warnings on Clang and GCC
- Fix Python deprecation warnings
- Fix maybe uninitialized warning (GCC only)
2023-01-19 13:08:46 -05:00
Chensiyy c97b5cf7ee libcaption: Fix invalid data at utf8_load_text_file 2022-12-03 15:35:11 -08:00
PatTheMav bd12a3e919
deps: Replace invocations of sprintf with snprintf
Fixes deprecation warnings in Xcode 14/clang on macOS and reduces
chance of buffer overflows.
2022-11-11 19:51:27 +01:00
pkv ce2d1ffab7 obs-ffmpeg: Fix deprecation of channels member of several structs
This fixes deprecation warnings since the channels member of
AVCodecContext is marked as deprecated [1], as well as the channels
member of AVFrame [2].
In all instances where a warning appear, a switch to the new API is
done.
[1] lavc: switch to the new channel layout API
FFmpeg/FFmpeg@548aeb9
[2] Bump minor versions after the channel layout changes
FFmpeg/FFmpeg@cdba98bb80

Signed-off-by: pkv <pkv@obsproject.com>
2022-11-10 19:37:07 -05:00
PatTheMav d9f89be35a obs-scripting: Add obs_sceneitem_group_enum_items function call
Adds function call to enumerate over items contained in a source group.
2022-10-11 15:19:41 +02:00
Patrick Heyer 49b4ba8ed9 obs-scripting: Fix block comment formatting
Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-10-10 02:07:02 +02:00
PatTheMav 0af8bdb350 obs-scripting: Fix script state variable being reset by tick callback
When loading a new Python script, the GIL might be released while
importing the module, allowing the tick to run and change and reset the
cur_python_script state variable. Use the busy_script variable to save
and restore the value if not null.
2022-10-10 02:07:02 +02:00
Matt Gajownik 77d810148d obs-scripting: Enable Python autodoc
This provides more useful information in auto-complete, complete with
parameter summaries.

Example:

"""
    obs_properties_add_path(props, name, description, type, filter, default_path) -> obs_property_t *

    Parameters
    ----------
    props: obs_properties_t *
    name: char const *
    description: char const *
    type: enum enum obs_path_type
    filter: char const *
    default_path: char const *

"""
2022-10-01 16:16:45 -07:00
Matt Gajownik 0c7abb7fca obs-scripting: Re-enable Python annotations
The default for this setting was changed in SWIG 4.
For more info see https://github.com/swig/swig/commit/2072ae19c
2022-10-01 16:16:45 -07:00
Exeldro ddff584b46 obs-scripting: Fix compile when python is not found 2022-10-01 05:26:21 -07:00
Matt Gajownik 1b2fc73021 frontend-tools: Display Python version in UI 2022-09-23 12:08:11 +10:00
PatTheMav 6adb973b6a w32-pthreads: Add pthread.h as public header
When exporting w32-pthreads, the public header file `pthread.h` needs
to be exported as well to expose the implemented functionality.
2022-09-17 16:35:20 -07:00
PatTheMav 76c782bcdc deps: Fix broken prefix for obspython binary module on Linux 2022-09-17 16:11:31 -07:00
derrod 9140c260ee UI: Add Whats New for macOS/Linux
- Requires MbedTLS on Linux
- Enabled by default on macOS and Flatpak
- Enabled on linux via ENABLE_WHATSNEW_LINUX
- Enables compilation of blake2 on Linux/macOS
- Makes header name check also work with lowercase header
- Changes WahtsNew to be only enabled when browser panels are available
2022-08-13 16:46:48 -07:00
Norihiro Kamae 0929a78e8c deps/w32-pthreads: Remove unnecessary UTF characters 2022-08-13 00:49:17 -07:00
PatTheMav 43a49dca47 cmake: Fix CMake package export templates for CMake 3.24
CMake 3.24 implemented changes that break dependency discovery of the
exported libraries built by OBS.
2022-08-09 19:48:03 -04:00
tytan652 1272209710 obs-scripting: Fix SWIG flags for non-macOS POSIX 2022-08-08 15:00:09 +02:00
PatTheMav 24a123119a obs-scripting: Fix issues between runtime and compile-time versions
Calling `PyEval_InitThreads` has been deprecated in Python 3.7 and the
function itself will be removed in Python 3.11. The current check
guards this function behind a version check that only happens at compile
time.

This in turn leads to crashes when run on Python 3.6, as the necessary
initialization for `PyEval_ReleaseThread` did not take place.

This commit ensures the manual initialization takes place based on the
runtime version of Python and avoids loading the associated symbols
on Python 3.9 or later.
2022-08-02 19:36:50 -04:00
jpark37 d3bd511d4d media-playback: Fix crash on free
Need to call mp_decode_clear_packets before destroying orig_pkt in case
packet_pending is true.
2022-08-01 09:20:26 -07:00
jpark37 d8551e444b media-playback: Compute HDR colorspace
Figure out colorspace from TRC and primaries if necessary. AMF in
particular doesn't seem to provide full metadata.
2022-07-30 17:25:37 -07:00
gxalpha ca470b2d53 deps/obs-scripting: Ignore base_set_crash_handler 2022-07-27 12:05:16 -04:00
Kurt Kartaltepe 57c9844f15 v4l2,scripting: Add more thread names
This sets some thread names for the scripting backend's defer thread and
the v4l2 udev thread.
2022-07-24 09:21:58 +10:00
tytan652 17ba8359e4 deps,libobs,plugins: Fix discarded-qualifiers warnings with FFmpeg 5 2022-07-22 08:50:36 -04:00
PatTheMav ab21c7e5b0 obs-scripting: Add support for multiple Python 3 versions
This changes the way obs-scripting looks for and loads an available
Python 3 library. It tries to find a best possible version (starting
with Python 3.10) down to and including Python 3.6 by existing file
naming conventions and loads the most recent variant it can find.

User specified search path is either a Python installation directory
(Windows), or a Framework directory containing `Python.framework`
(macOS). The dll or dylib names are composed automatically.
The Python home path is also composed automatically on macOS (where
it has to point inside the Framework directory).
2022-07-21 12:16:36 -04:00
PatTheMav 47b3ff5e64 obs-scripting: Switch swig to stable ABI usage 2022-07-21 12:16:36 -04:00
Jim 9025d92f7a
Merge pull request #6771 from tytan652/no_more_OBS_UNUSED
Remove OBS_UNUSED
2022-07-20 05:19:13 -07:00
tytan652 ba6f9f3f46 obs-scripting: Replace OBS_UNUSED with UNUSED_PARAMETER
OBS_UNUSED is not portable to MSVC.
2022-07-20 08:22:08 +02:00
Richard Stanway 009fc43bee
deps/opts-parser: Skip parsing of empty strings 2022-07-20 03:29:59 +02:00
mvji f0b3593349 deps/media-playback: Fix invalid seek at reset
When AVFormatContext->startime is set to AV_NO_PTS
mp_media_reset try to seek to INT64_MIN
use 0 instead.
Fix loop with aac file
2022-07-16 16:29:02 -07:00
PatTheMav e27f90fa5a obs-scripting: Fix crashes introduced by Swig update to 4.1.0
Fixes issues introduced by https://github.com/swig/swig/pull/2238. As
obs-scripting is not compatible with the SWIGPYTHON_BUILTIN, obspython
needs to disable this feature.
2022-07-13 16:50:09 -04:00
jpark37 5e3c824801 obs-scripting: Suppress long volatile warning 2022-07-11 22:07:10 -07:00
PatTheMav 62ca01e181 libcaption: Disable compiler warnings about non-exhaustive switch cases 2022-07-10 09:59:55 +10:00
PatTheMav 64efcd155d obs-scripting: Fix swig runtime header generation for macOS
Due to swig using a hardcoded swig library path in self-compiled
variants, we need to pass our custom swig library path with every
invocation of swig on macOS.

CMake's `add_custom_command` function does _not_ inherit the environment
variables used during configuration, hence why it needs to be passed
explicitly on invocation.

Usage of CMake's "-E env" command module should allow for cross-platform
compatible invocation.
2022-07-07 14:19:23 -04:00
gxalpha e1776d872a deps/obs-scripting: Log script load/unload 2022-07-02 16:35:20 -07:00
jpark37 22fde5cdcd deps/media-playback: Fix metadata for hw_accel
av_hwframe_transfer_data doesn't seem to transfer metadata, so do it
manually.
2022-06-18 16:03:34 -07:00