0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

168 Commits

Author SHA1 Message Date
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
Georges Basile Stavracas Neto
99559aab5a libobs: Add portal inhibitor
XDG Portals provide a plethora of features meant to be used inside and
outside sandboxed environments. OBS Studio currently uses portals to
implement Wayland-compatible monitor and window captures.

However, OBS Studio performs another action that can be done through
portals: inhibit the screensaver. Under the Desktop portal (the same
used by the captures mentioned above), there is an "Inhibit" portal
that provides session inhibition.

Add a new portal-based inhibitor. This inhibitor is only used when the
Desktop portal is available and running; the previous D-Bus implementation
is used in the absence of the portal. Because it's basically another set
of D-Bus operations, wrap the new portal inhibitor under the HAVE_DBUS
call too.
2021-07-18 14:04:44 -07:00
jpark37
df30e3aca6 libobs: Add srgb.h to CMakeLists.txt 2021-05-13 18:31:18 -07:00
Georges Basile Stavracas Neto
ec1b07cc85 libobs/util: Replace libdbus by GDBus
GDBus is more and better maintained than libdbus these days. In the
future, a potential Wayland-compatible capture plugin will need to
interact with D-Bus in a way that's way too complicated for libdbus,
and it won't be nice to have both libraries talking to the D-Bus
socket.

Replace the libdbus usage by GDBus. As it turns out, it results in less
code.
2021-02-25 12:32:44 -08:00
Georges Basile Stavracas Neto
2b3cb54771 libobs: Add a Wayland platform
Introduce the OBS_NIX_PLATFORM_WAYLAND enum value, and try to detect
it when OBS Studio runs by looking into the platform name.
2021-02-09 09:39:04 -03:00
Georges Basile Stavracas Neto
506b950d02 libobs: Introduce the concept of a Unix platform
This is a Unix-specific code. The only available platforms
at this point are the X11/GLX and X11/EGL platforms.

The concept of a platform display is also introduced. Again,
the only display that is set right now is the X11 display.
2021-02-01 19:05:10 -03:00
Georges Basile Stavracas Neto
510c747459 libobs/nix: Move X11-specific code to obs-nix-x11.c
Currently, obs-nix.c is highly tied to the X11 display
server. It includes X11 headers directly, and make use
of X11 functions. Most of the code inside obs-nix.c that
is X11-specific is related to hotkeys handling.

Introduce a new vtable for hotkeys callbacks, that will
used by X11 and Wayland to expose their specific routines.
In this commit, only the X11 hotkeys vtable is implemented.

Move all the X11-specific code to obs-nix-x11.c, and add
a new function to retrieve the X11 hotkeys vtable.
2021-02-01 19:03:43 -03:00
Jim
2eca4d80b6
Merge pull request #2233 from VodBox/missing-files-dialog
libobs + UI: Add Missing Files API & Dialog
2021-01-31 08:02:16 -08:00
VodBox
fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
Marcus Rückert
12b6e28f03 libobs: Fix missing Linux libraries with certain flags
Make sure libobs links all libraries needed to satisfy symbols in the
library.

Fixes obsproject/obs-studio#3924
2021-01-11 14:10:53 -08:00
Michael R. Crusoe
1e96573328 libobs: Update to SIMDe 0.7.1
c3d7abfaba

Simplify usage of the SIMDe header

This obviates the need for sse2neon as well and fixes compilation of all
plugins that referenced sse-intrin.h on all architectures, not just
arm*.
2021-01-02 04:07:55 -08:00
pkubaj
d46e8b03c9 libobs: Add definitions in ARCH_SIMD_DEFINES
This is necessary on ppc64 to build plugins that use cmake, so that
-DNO_WARN_X86_INTRINSICS is defined.
2020-12-31 06:31:25 -08:00
PatTheMav
fb27900e94 CI: Remove explicit LANGUAGE flags for cmake 3.19+ 2020-11-21 12:00:52 -08:00
Colin Edwards
7b0d7c6357 Remove BUILD_CAPTIONS build flag 2020-11-02 22:46:55 -06:00
Colin Edwards
923f06bfa6 decklink: Add ability to ingest/embed cea 708 captions
(This commit also modifies libobs, UI)
2020-11-01 22:28:49 -08:00
jp9000
18486853a5 obs-ffmpeg: Add ability to debug ffmpeg-mux subprocess
Adds a cmake variable (DEBUG_FFMPEG_MUX) which enables FFmpeg debug
output in the ffmpeg-mux subprocess, and if on Windows, shows the
console window of the ffmpeg-mux subprocess so the current output can be
seen.
2020-10-14 18:42:22 -07:00
Kurt Kartaltepe
c3ab6b91f6 libobs: Fix underlinking X11
Add explicit linkage to X11 fixing #3305
2020-08-21 16:25:42 -07:00
Uro
5fd51eab31 libobs: Add util/sse2neon.h to CMakeLists
Add util/sse2neon.h to libobs_util_HEADERS in CMakelists.txt. The
previous patch #3180 for arm/rpi support was missing this in
libobs/CMakeLists.txt, and as a result plugins such as obs-websocket,
obs-ndi fail to compile on arm/rpi as the header is not copied with the
install.
2020-07-27 11:47:29 -07:00
Jim
8e28c89a93
Merge pull request #2786 from pkubaj/patch-1
Add CFLAGS necessary on PPC64(LE) to libobs.pc
2020-06-26 01:39:45 -07:00