Commit graph

186 commits

Author SHA1 Message Date
gxalpha 92352f18b8 cmake: Add obs-config.h to libobs headers
Adds the header to make it findable in IDEs
2024-06-19 13:08:30 -04:00
derrod 89c7a9608b libobs/util: Add buffered file serializer
Adapted from 898256d416

Co-authored-by: Richard Stanway <r1ch@r1ch.net>
2024-05-18 16:15:41 -07:00
derrod e885d25f5b libobs: Add os_process_args_t and associated functions 2024-04-20 18:30:46 -07:00
PatTheMav 0af0de26eb libobs: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2024-04-13 23:48:38 -04:00
tytan652 e032c2d0c9 deps,libobs: Replace uthash with prefix/system install 2024-04-07 10:01:25 +10:00
derrod 1938d65c9f libobs/util: Add deque 2024-01-16 16:44:12 +01:00
jpark37 a8866fe3fa libobs-d3d11: Remove new/delete replacements
MSVC noticed inline is not allowed, and new/delete replacments also
don't belong in a header file. We're also just leaning on
__STDCPP_DEFAULT_NEW_ALIGNMENT__ being 16 for MSVC x64 now.
2024-01-11 04:02:31 -06:00
PatTheMav e065f2a839 libobs: Update CMake target source lists with alphabetic sorting 2023-12-19 17:59:44 -05:00
PatTheMav 9ae47a7937 cmake: Update FFmpeg find package to use explicit version 2023-12-19 17:59:44 -05:00
PatTheMav 8135085a23 cmake: Replace custom Qt discovery function with CMake default
find_qt was necessary during the transitional period between Qt5 and
Qt6. With Qt6 being the only supported Qt version (for open source) for
the time being, code complexity can be reduced for easier maintenance.
2023-12-19 17:59:44 -05:00
gxalpha 92ea7cb145 libobs: Remove obs-ui from public headers
This file got removed in 5177a593af and
as such should no longer be declared as a public header.
2023-12-17 22:13:47 +01:00
derrod 5177a593af libobs: Remove module UI functions 2023-12-02 18:09:20 -06:00
David Rosca 722ca8447e libobs: Add AV1 parsing functions
One notable difference from the AVC/HEVC code is that it also inserts
the METADATA and SEQUENCE_HEADER OBUs into new_packet, otherwise the
resulting video file wouldn't play.
2023-11-04 01:16:25 -05:00
PatTheMav 5127c22773 libobs: Add more files to list of public headers 2023-11-02 11:50:30 -04:00
PatTheMav ff2a7063c2 libobs: Export SIMDe headers unconditionally for plugin development 2023-10-26 18:20:53 -04:00
Ryan Foster fc693f9c3d libobs: Update CMake minimum to 3.22
Since Ubuntu 22.04 is now our minimum supported Ubuntu version, and it
has CMake 3.22, let's make CMake 3.22 the minimum CMake version.
2023-08-05 16:45:46 -07:00
cg2121 620eff0768 libobs: Make video frame header public
This fixes compilation of third party plugins that need this
header.
2023-08-03 16:02:56 +02:00
gxalpha 55237ab2ef libobs: Export more libobs/util headers 2023-07-15 16:17:42 -07:00
PatTheMav db895092ed cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-06-29 10:11:32 -04:00
PatTheMav 2966c4030e libobs: Use static library for version string information
Switching to a static library that contains version information as
const char strings has multiple benefits:

* The version information provided externally via compiler definitions
  will fail compilation early if malformed
* An updated version string (which will happen with every commit) will
  not invalidate existing compilation units, because only the static
  library is affected by the change
* An update of the version change just requires a recompilation of the
  static library and a linker update
* An update of the version will _not_ infect the rest of the codebase
  (as it does currently, because everything includes obsconfig.h one
  way or another)
* Other modules which used the macro definition directly have been
  updated as much as possible to use the proper getter method from
  `libobs` instead (some Windows-specific modules use preprocessor
  string composition, the value has been added as a compiler definition
  directly in those cases)
* Because the impact of a version change due to a commit hash change
  is limited to the static library, ccache hit rates should be
  improved considerably
2023-05-27 16:48:24 -07:00
PatTheMav e52256184a libobs: Adds obs.hpp to exported header files
Required for plugins built using C++ linking against libobs.
2023-05-17 11:47:08 -04:00
PatTheMav b2e66bb401 libobs: Add missing headers for framework export 2023-04-12 17:17:00 +00:00
gxalpha caccd86092 cmake: Sort libobs target_sources alphabetically 2023-04-01 16:15:41 -07:00
PatTheMav 349372b3b3 cmake: Add changes for CMake build framework 3.0
New code path only taken if OBS_CMAKE_VERSION is set to 3.0.0 or
greater, old functionality remains unchanged.
2023-03-26 18:20:38 -04:00
derrod 2986d36d9b libobs/util: Add uthash
Adds a header including uthash and redefining some of its options for
use withint libobs and plugins (potentially).
2023-03-18 10:47:49 +01:00
derrod f72cc4498f libobs: Add os_generate_uuid() to platform utils 2023-03-12 01:11:38 +01:00
tytan652 b0c1c9c86c libobs,plugins: Remove individual -Wno-switch 2023-01-19 13:08:46 -05:00
jp9000 78f3389d17 libobs: Add funcs to get windows video adapter LUIDs
Useful for providing adapter order to encoder test subprocesses
2022-12-19 11:59:44 -08:00
Ryan Foster 9f31a9d7a5 libobs: Suppress LNK4098
Suppress LNK4098 to allow building against pre-built Jansson for now.
2022-11-22 00:14:16 -05:00
PatTheMav 2bb0818fb4 libobs: Use system header notation for pthread.h include
Using a relative path for the pthread.h header by w32-pthreads breaks
compilation of plugins which include threading.h from libobs (as
w32-pthreads will exist at a different location relative to the
libobs header).

As w32-pthreads (and its include directory) is added to the libobs
target by CMake, the pthread.h header will be found even when using
system header notation.

Fixes https://github.com/obsproject/obs-studio/issues/7155
2022-08-24 05:40:37 -07:00
jp9000 97b34ebb76 libobs: Add currently used Qt version to obsconfig.h.in
Allows the ability to have code depending on whether OBS is being
compiled with Qt5 or Qt6
2022-07-28 16:36:01 -07:00
jpark37 69ff026647 libobs, win-capture: Share window helper code
Add "ms_" prefix as makeshift namespace.
2022-07-23 17:41:34 -07:00
PatTheMav 91c915e4e9 libobs: Disable compiler warnings about non-exhaustive switch cases 2022-07-10 09:59:55 +10:00
tytan652 9a33e49087 cmake: Fix enabling PulseAudio monitoring
Also adds a warning if null monitoring is "enabled".
2022-05-28 18:36:36 -04:00
tytan652 7ed5415a2b libobs: Include HEVC files only if enabled 2022-05-07 16:13:21 -07:00
jpark37 a8bc994f07 libobs: Add color spaces to scale shaders 2022-03-26 13:00:34 -07:00
PatTheMav aae3a6a466 cmake: Fix diverging prefix padding for OBS status outputs
Status output related to OBS configuration is prefixed with the string
"OBS" and added padding for enabled and disabled features. This padding
was not aligned between platforms.

By moving the padding and prefix decoration into its own function,
both elements are controlled in a single place. CMake scripts were
changed to use this new function `obs_status` instead of using CMake's
`message` function directly.
2022-03-26 09:44:23 -04:00
jpark37 76893fb7b9 libobs: Add HEVC parsing functions
Also create obs_nal_find_startcode from obs_avc_find_startcode to share
with HEVC functions.
2022-03-19 15:46:34 -07:00
PatTheMav 1fd7770548
libobs: Update CMakeLists.txt for libobs and associated libraries
Also updates libobs-opengl, libobs-d3d11, libobs-winrt
2022-03-16 23:11:08 +01:00
jpark37 657c4d0125 libobs: Add effect files to CMakeLists.txt
Makes them easily searchable from Visual Studio.
2022-01-29 17:16:16 -08:00
Jim 03d9bda387 libobs: Deprecate obs object addref functions
Deprecates:
obs_source_addref()
obs_output_addref()
obs_encoder_addref()
obs_service_addref()
obs_scene_addref()

These functions should be considered unsafe and not used. Instead, use:
obs_source_get_ref()
obs_output_get_ref()
obs_encoder_get_ref()
obs_service_get_ref()
obs_scene_get_ref()

These functions return a pointer to the incremented object only if the
object is still valid, otherwise they will return null, indicating that
the object is no longer valid or is unsafe to use.

The reason why this is being done is because certain third party plugins
seem to be using addref, and are somehow managing to call addref on
sources that have already been fully released. For the sake of safety,
almost all usage of these functions within OBS have also been replaced
as well.
2022-01-25 05:20:03 -08:00
tt2468 167f539416 libobs: Rename obs_audio_monitoring_supported to _available
With the reasonable possibility of monitoring support becoming a
runtime check, the phrase `available` is more fitting.
2021-12-22 02:43:14 -08:00
jp9000 5a36bd5c9a libobs/util: Add task queue helper
Adds a cool little task queue thing so a dedicated task thread can be
spawned
2021-12-19 11:25:57 -08:00
Kurt Kartaltepe 0729007f19 libobs: Add Wayland hotkey infrastructure
Users on Wayland are displeased that they cannot see their hotkey
bindings. This enables key reporting like X11, and has the infrastructure
in place in case Wayland ever decides to allow for capturing input.
2021-12-16 10:54:29 -03:00
tt2468 6e9644ec15 libobs: Add obs_audio_monitoring_supported()
Currently, ifdefs are used to determine if monitoring is supported.
This is difficult to maintain and restricts plugins from knowing if
monitoring is supported by OBS. This adds a runtime function to fix
that issue.
2021-11-20 20:00:59 -08:00
jpark37 e582879303 libobs/media-io: Register audio thread with MMCSS
Ensure audio gets more priority to help prevent glitching.
2021-10-10 19:19:01 -07:00
Jimi Huotari 9d6ecc8beb cmake: Don't link with PulseAudio when disabled
Don't search for, or link with the PulseAudio library when
DISABLE_PULSEAUDIO is true, and set as REQUIRED when false.

Closes https://github.com/obsproject/obs-studio/issues/4025
2021-10-08 15:30:22 +11:00
jpark37 f20a7c0540 libobs: Remove dependency on psapi.lib 2021-09-12 14:10:36 -07:00
jpark37 0d282c0715 libobs: Add missing util.hpp to CMakeLists.txt 2021-08-23 23:15:15 -07:00
Ryan Foster ea9c75bacb cmake: Remove local files for checking threading support
These local copies of CheckForPthreads.c and FindThreads.cmake override
the ones included with CMake. These versions create CMake::Threads, but
Qt6 expects Threads::Threads created by CMake 3.1+. These local versions
seem to be based on old copies from CMake from late 2014 with some
customizations. Let's just use the built-in ones that CMake ships.

This commit also changes CMakeLists.txt files in UI and libobs to
require and link to Threads::Threads.

Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com>
2021-08-17 02:46:09 -07:00