Commit graph

5147 commits

Author SHA1 Message Date
jp9000 9eabfdbf1e deps/obs-scripting: Add scripting support
Allows Lua/Python scripting support.
2018-01-04 11:37:42 -08:00
jp9000 fd9e5d45a3 libobs: Add obs_property_set_modified_callback2
Allows the ability to pass private data to a callback (useful
specifically for scripting purposes).
2018-01-03 17:04:04 -08:00
jp9000 6d628c1ceb libobs: Add obs_properties_add_button2
Allows passing button-specific private data to the button callback
rather than just passing the private data of the properties object.
2018-01-03 17:04:04 -08:00
jp9000 1902594da4 libobs: Fix function to be static inline
The function in the header was marked as just inline, which would cause
processing problems for SWIG.
2018-01-03 17:04:04 -08:00
jp9000 66f993d214 libobs: Exclude certain declarations from SWIG processing
Prevents SWIG from being able to process certain declarations that would
cause binding generation errors/warnings.
2018-01-03 17:04:04 -08:00
jp9000 2de3973fae UI: Allow temporarily disabling filter/source types
Implements the OBS_SOURCE_CAP_DISABLE capability flag in to the user
interface.
2018-01-03 17:04:04 -08:00
jp9000 da0e3ef0ee UI: Do not show deprecated filters 2018-01-03 17:04:03 -08:00
jp9000 6cd79f8105 UI: Add scene collection cleanup event to frontend API
This event is called when all scene data has been unloaded.
2018-01-03 17:04:03 -08:00
jp9000 bf31e1c233 UI/obs-frontend-api: Move function declarations 2018-01-03 17:04:03 -08:00
jp9000 518290c404 UI: Trigger scene change event on scene collection load
When the program first starts up, or rather when a scene collection is
loaded, the frontend API OBS_FRONTEND_EVENT_SCENE_CHANGED event would
not get triggered.
2018-01-03 17:04:03 -08:00
jp9000 4fd43f55fb UI: Add refresh/reload button icons 2018-01-03 17:04:03 -08:00
jp9000 03b8fd0186 UI: Call frontend callbacks in reverse order
Allows safely removing callbacks from within the callbacks themselves.
2018-01-03 17:04:03 -08:00
jp9000 5645c02c8f UI: Add preload callbacks to frontend API
Allows loading data before actually loading any scene data.
2018-01-03 17:04:03 -08:00
jp9000 260fb571b8 UI: Set ENABLE_UI and DISABLE_UI as root CMake variables
Allows for projects other than UI to be able to reference these CMake
variables.
2018-01-03 17:04:03 -08:00
jp9000 f06f85fd56 libobs: Prevent access to OBS context during shutdown
The "obs" global variable can still be accessed by functions during
shutdown.  To prevent access to the variable during shutdown, move the
pointer to a temporary function variable, and set the "obs" global
variable to NULL before shutting down.
2018-01-03 17:04:03 -08:00
jp9000 ad64f7834d libobs: Store string copies in properties
Individual property objects would store pointers to strings rather than
copies of the strings and assume that memory would continue to exist, so
instead just duplicate the strings.
2018-01-03 17:04:02 -08:00
jp9000 a730f9d6ce libobs: Add ability to disable source types
Because it would be troublesome to add the ability to remove source
types (in case for example a script fails to reload), instead make it so
source types can be temporarily disabled while the program is running.
2018-01-03 17:04:02 -08:00
jp9000 c8a0f661fb libobs/callback: Add global callback to signal handler
A global callback allows capturing all signals from a signal handler
rather than just a specific signal.
2018-01-03 17:04:02 -08:00
jp9000 b8bb60c83b libobs/callback: Add signal_handler_remove_current func
Convenience function that allows removing the current signal handler
callback within the callback without having to use
signal_handler_disconnect with all of its required parameters.
2018-01-03 17:04:02 -08:00
jp9000 b56c33a260 libobs/util: Add THREAD_LOCAL macro
Adds a thread local storage macro to declare thread local storage
independent of platform.
2018-01-03 17:04:02 -08:00
jp9000 0ffc9bbf05 libobs: Add video tick callback functions
Allows the ability to have a callback invoked every time video ticks.
Particularly useful for scripting.
2018-01-03 17:03:57 -08:00
jp9000 9e8a2e333b cmake: Add helper module for finding Lua
This is mostly for win32-specific files
2018-01-03 17:03:05 -08:00
jp9000 102075847a cmake: Add Lua/Luajit as part of MSVC dependencies 2018-01-03 17:03:05 -08:00
jp9000 9f9cd1fec3 libobs/util: Ignore PRINTFATTR if using SWIG preprocessor
SWIG will fail because it doesn't define _MSC_VER and because it doesn't
know what to do with things like __attribute__.
2018-01-03 17:03:05 -08:00
jp9000 97ec7166b7 libobs/util: Optimize strlist_* functions
When splitting a string in to a string list via stringlist_split, it
would previously allocate memory for each sub-string and again for the
list itself.  This optimizes that function to use a single contiguous
chunk of memory for the sake of access optimization and memory
allocation efficiency.
2018-01-03 17:03:05 -08:00
jp9000 92b4276ee7 libobs: Add obs_source_info::get_properties2
Uses type_data to get the type-specific data of a source type
2018-01-02 13:51:03 -08:00
jp9000 5d7c899ebe libobs: Add obs_source_info::get_defaults2
Uses type_data to get the type-specific data of a source type
2018-01-02 13:51:03 -08:00
jp9000 7f6cf97bd7 libobs: Add obs_render_main_texture
(Note: This commit also modifies UI and test)

This makes it so that main preview panes are rendered with the main
output texture rather than re-rendering the main view.  The view will
render all objects again, whereas the output texture will be a single
texture render of the same exact thing.

Also fixes some abnormal artifacting when scaling the main preview pane.
2018-01-01 18:52:47 -08:00
Richard Stanway 2f577c1b71
libobs: Make get_reg_dword handle missing keys
Previously if the key didn't exist it would return uninitialized stack
memory. Reported at https://obsproject.com/forum/threads/obs-freezes-computer-on-startup-sometimes.78030/#post-330590
2017-12-19 12:04:00 +01:00
jp9000 0863247936 Fix typo in README 2017-12-14 12:13:42 -08:00
jp9000 3febcf5237 Move documentation to links in CONTRIBUTING file 2017-12-14 10:48:22 -08:00
jp9000 a6e90abd53 Add documentation links 2017-12-14 10:46:47 -08:00
Richard Stanway 66ec96d52c
win-capture: Fix memory capture crash on new capture
If the target process re-creates its D3D context, the game capture tick
can trigger before the capture is setup, in which case OBS gets a
CAPTURE_RETRY message. However with the memory capture method, it
continues to try and copy from the shared memory pointer which is no
longer valid, resulting in a crash. The fix uses the old texture until
the next tick at which point the new capture should be ready for use.
2017-12-14 16:40:14 +01:00
Richard Stanway cf9f016820
win-capture: Rename structs to avoid SDK conflict
Windows SDK 10.0.16299.0 defines these structures as part of winternl.h
but using different types and names. Unfortunately there's no macro to
detect the SDK version, so to avoid conflicting with newer / older SDKs
the OBS structs have been renamed.
2017-12-12 18:20:56 +01:00
jp9000 0497095f97 Fix a number of GCC warnings 2017-12-06 16:42:45 -08:00
jp9000 4704723759 Fix a number of MSVC warnings 2017-12-06 16:07:23 -08:00
jp9000 530266917d obs-ffmpeg: Use correct function with older FFmpeg vers.
When this was being fixed up, the incorrect function name was used --
however it still compiled because the author was using the newer FFmpeg
version at the time.
2017-12-06 10:10:03 -08:00
jp9000 3114a240b4 libobs/media-io: Add ifdef for newer FFmpeg functions
The AVCodecParameters weren't introduced until avcodec version 57.48.101
(FFmpeg version 3.1), so this will make sure to still use the older
avcodec_copy_context if the detected FFmpeg version is earlier.
2017-12-06 07:46:49 -08:00
jp9000 0d6204c8af Fix a number of MSVC warnings
Fixes a number of warnings with all modules
2017-12-05 13:53:44 -08:00
jp9000 ffdecc34f4 obs-vst: Fix a few warnings (update submodule) 2017-12-05 13:52:47 -08:00
Jim 46d54ce68a
Merge pull request #1103 from RytoEX/fix-ci-linux
cmake: Correct CMake checks for LINUX
2017-12-04 10:02:28 -08:00
Ryan Foster 12abbd9205 cmake: Correct CMake checks for LINUX
Some CMake checks were recently switched from UNIX to LINUX to get them
to not apply to macOS/OSX. Since LINUX doesn't seem to be defined,
switch these checks to UNIX AND NOT APPLE.
2017-12-03 19:10:34 -05:00
Jim 0daade5f8f
Merge pull request #1102 from juvester/fix-linux-ci
Revert "CI: Linux - Install FFmpeg from source"
2017-12-03 14:09:58 -08:00
juvester 2f78871662 Revert "CI: Linux - Install FFmpeg from source"
This reverts commit de32d89fc6.

Fixes an issue where Linux CI builds fail because FFmpeg fails to
compile. Using FFmpeg git master in CI builds was obviously not the
smartest idea because changes in FFmpeg can break things unexpectedly.
Sorry about that.

The reason for the original commit was that OBS failed to compile
with FFmpeg 2.4. That has been fixed since.
2017-12-03 23:10:46 +02:00
Jim c529c519eb
Merge pull request #1101 from DDRBoxman/clion
git: Add Clion to .gitignore
2017-12-03 11:14:36 -08:00
Colin Edwards ddf796e6c5 git: Add Clion to .gitignore 2017-12-03 12:57:26 -06:00
Jim c4ed55d8f4
Merge pull request #1099 from DDRBoxman/x11
cmake: Do not require X11 on OSX
2017-12-03 10:18:16 -08:00
Jim 410a3cd40b
Merge pull request #1100 from RytoEX/fix-ci-osx
CI: Fix Mac builds on Travis CI's Xcode 8.3 image
2017-12-03 03:16:31 -08:00
Colin Edwards fcea48490f cmake: Do not require X11 on OSX 2017-12-02 22:40:10 -06:00
Ryan Foster b6348c932b CI: Fix Mac builds on Travis CI's Xcode 8.3 image
The Travis CI Xcode 8.3 image uses macOS 10.12, where some OS and Xcode
components were changed. This commit finally fixes macOS deployments on
Travis for Xcode 8.3. This commit also reverts a few changes that got
into master while we were trying to fix this.
2017-12-02 23:04:10 -05:00