Commit graph

220 commits

Author SHA1 Message Date
Jim 9607a9f46e
Merge pull request #2384 from LiamCoal/allow-no-buffering
media-playback: Unbuffered Media Source
2020-05-21 17:40:08 -07:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Jimi Huotari c7f84f8fc4
deps/glad: Fix build with GCC-10
GCC-10 defaults to '-fno-common' [1], which triggers issues with
defining global variables multiple times.  To fix the build, use
'extern' to turn the first definition of 'gladGetProcAddressPtr'
into a declaration.

1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678

Closes https://github.com/obsproject/obs-studio/issues/2828
2020-05-04 11:02:49 +03:00
Clayton Groeneveld a149b1df88 obs-scripting: Expose platform functions to scripts 2020-04-27 09:33:43 -05:00
Colin Edwards 55e2985026
Merge pull request #1944 from WizardCM/windows-rc-definition
CMake: Build Windows modules with file descriptors
2020-04-18 18:27:22 -05:00
Ed Maste f4e7bd31ab deps: lzma: also use .note.GNU-stack on FreeBSD
FreeBSD uses the same .note.GNU-stack section to indicate that the
stack should not be executable.
2020-04-07 13:25:43 -04:00
Richard Stanway 49bd76755b Make cert revocation check fails non-fatal on Win
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.
2020-03-13 07:48:47 -07:00
comex 849d5462ad obs-scripting: Add missing Python imports
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.
2020-03-08 18:35:35 -07:00
jp9000 c2e055c901 deps/media-playback: Fix formatting
Apparently CI did not catch this.
2020-02-24 04:17:03 -08:00
Clayton Groeneveld e0df5e8868 deps/media-playback: Fix buffering/sync issues 2020-02-13 05:14:34 -06:00
Clayton Groeneveld 9730b270a7 deps/media-playback: Simplify seek/time code 2020-02-10 23:03:04 -06:00
LiamCoal 2b7f4dfa6b media-playback: Unbuffered Media Source
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.
2020-02-07 20:38:06 -08:00
jp9000 65d38864b6 deps/media-playback: Fix formatting 2020-02-01 21:51:20 -08:00
Jim 4cae7c55a1
Merge pull request #2300 from cg2121/media-pause-seek
media-playback: Add functions to pause/seek media source
2020-01-30 18:30:36 -08:00
Jiaxun Yang 6366f6ab59 libobs: Build SIMDE on platforms without SSE2
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>
2020-01-22 15:41:15 +08:00
jp9000 345e933d9f deps/obs-scripting: Fix incorrect parameter type 2020-01-21 02:43:21 -08:00
Clayton Groeneveld f24c1004c1 media-playback: Add functions to pause/seek media source 2020-01-12 01:08:01 -06:00
Jim 8870676667
Merge pull request #2287 from pkubaj/patch-1
CMake: Fix build on ppc64
2020-01-04 03:37:25 -08:00
pkubaj 03ab727495 CMake: Fix build on ppc64
ppc64le was fixed before, but ppc64 (big-endian) was still failing.
2020-01-04 02:19:38 -08:00
Scratch 41fcb9ae08 obs-scripting: Add Python functions for frontend events 2020-01-03 12:07:17 +11:00
Rat 83fdf41e3f deps/obs-scripting: Expose matrix3 & 4 to scripting
Various functions available in the scripting API aren't usable
currently since you can't create the matrix3 and matrix4 needed
for their arguments.
2019-12-25 00:37:31 +01:00
Jim 2a6baf9886
Merge pull request #2069 from pgwipeout/aarch64
Enable Aarch64 support via SIMDe
2019-11-25 23:56:43 -08:00
jp9000 9826528c31 deps/media-playback: Don't use interrupt cb for local files
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.
2019-11-25 23:04:06 -08:00
jp9000 2fae85ab4a deps/media-playback: Don't exit thread on AVERROR_EXIT
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.
2019-11-25 23:04:06 -08:00
Peter Geis 64d0b7fcb4 libobs: Enable compilation on aarch64
Add arch checks to enable aarch-compat layer on aarch64, retain normal
gcc intrinsics on x86 and ppc64.
2019-11-25 13:04:21 -05:00
Jim 654508de7c
Merge pull request #2183 from ratwithacompiler/macos-python-fix-2
obs-scripting: Fix Python in new MacOS .app bundles
2019-11-18 19:46:09 -08:00
jp9000 6ab6fdffd1 deps/obs-scripting: Fix formatting 2019-11-17 18:06:56 -08:00
Rat a19fef2248 obs-scripting: Fix Python in new MacOS .app bundles
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.
2019-11-17 22:11:44 +01:00
Jim 9bdb21205d
Merge pull request #2085 from ratwithacompiler/macos-python-fix
obs-scripting: Fix Python on MacOS
2019-11-14 20:38:53 -08:00
Jim def6fcb0ee
Merge pull request #2125 from DDRBoxman/appbundle
Fixes to make OBS work on Catalina
2019-11-13 12:21:13 -08:00
Colin Edwards 32690926b9 CI: Use custom macdylibbundler for OSX deps 2019-11-03 00:00:38 -05:00
jpark37 7336226774 obs-scripting: Quiet CMake SWIG warnings 2019-10-15 21:08:30 -07:00
Jim 7d34034ee2
Merge pull request #2099 from ioangogo/LinuxCaptionFix
cmake: Compile option to fix libcaption linking
2019-10-15 11:25:05 -07:00
Matt Gajownik 51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +11:00
luz.paz d124e6402c docs/sphinx: Fix various typos
(This modifies UI, libobs, deps/obs-scripting, various cmake files)

Found using:
`codespell -q 3 -S *.ini,./UI/data/locale,./deps/w32-pthreads -L aci,dur,iff,mut,numer,uint`
2019-10-14 17:19:38 -07:00
Ioan Loosley 5483de10ee cmake: Compile option to fix libcaption linking 2019-10-07 12:57:54 +01:00
Rat a44ff34ef0 obs-scripting: Link _obspython as dynamic_lookup on MacOS
_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.
2019-09-26 23:42:33 +02:00
Rat e7801e10ba obs-scripting: Fix python lib path on MacOS
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.
2019-09-26 23:37:00 +02:00
jp9000 86572935af deps/media-playback: Remove cuda for hardware decoding
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.
2019-08-29 12:06:55 -07:00
jp9000 43957286d7 deps/media-playback: Fix hw decode dropping last few frames
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.
2019-08-29 11:55:49 -07:00
VodBox c2a2bc5e40 deps/media-playback: Use hwaccel with non-alpha WebM files 2019-08-27 22:57:59 -07:00
jp9000 707f83f57d deps/media-playback: Fix memory leak
The hardware accelerated decoder context needs to be explicitly unrefed
when it's no longer in use, otherwise it and many resources associated
with it will leak.
2019-08-24 18:15:25 -07:00
jp9000 94581952b5 deps/media-playback: Fix hw accel decode crash
When hardware accelerated decoding is enabled, sometimes it can't
initialize for whatever reason, so it will fall back to software on its
own.  When this occurs, it will not use the hardware pixel format on the
frame; instead it will defer to a standard format on the frame.  So if
the frame format does not match the expected format, assume software
decoding.  (This was also what the hw-decode.c FFmpeg example did if the
format did not match the expected format)
2019-08-24 18:12:02 -07:00
Jim 5f7ff6fbcc
Merge pull request #1970 from cg2121/fix-warnings
various: Fix compiler/theme warnings
2019-08-17 08:22:03 -07:00
Jason Francis 34c8538ab9 cmake: Fix SWIG deprecation warnings 2019-08-16 21:12:31 -04:00
Clayton Groeneveld e8ad89fc75 libobs, obs-scripting, vlc-video: Fix compiler warnings 2019-08-15 03:00:06 -05:00
Jim 444991ba21
Merge pull request #2021 from jpark37/yuva-format
Add support for YUV alpha formats
2019-08-11 20:38:17 -07:00
jpark37 1e87df89bb deps/media-playback: Convert YUV alpha formats to RGB on GPU
I40A -> RGBA, 1080p, CPU
swscale (MMX), Intel i7-6700: 1910 us -> 0 us

GPU measurements used Intel GPA with SetStablePowerState.

I40A -> RGBA, 1080p, GPU
Intel HD Graphics 530: 0 us -> 677 us
NVIDIA RTX 2080 Ti: 0 us -> 43 us
2019-08-11 11:26:52 -07:00
jpark37 6600bd13ea deps/media-playback: Add missing header to CMake 2019-08-11 07:27:42 -07:00
Michael Fabian 'Xaymar' Dirks cdc613a5ea obs-scripting: Use a recursive mutex for Lua scripting
This enables stacking of Lua driven filters of the same kind without
freezing OBS Studio in place, or even crashing.
2019-08-08 22:57:35 -07:00