Commit graph

354 commits

Author SHA1 Message Date
PatTheMav 358d706e38 cmake: Fix debian packages loosing all debug symbols
The correct way to build debian package and also provide debug symbols
is to use additional `ddeb` packages served with the original `deb`
package.

This will implicitly still strip the binaries contained in the `deb`
package (per convention) but also create a `.ddeb` package with the
stripped symbols.
2022-11-12 18:20:50 -05:00
PatTheMav 2c8a55f82b cmake: Fix rundir installation accepting DESTDIR environment variable
The environment variable DESTDIR is commonly used to specify an install-
time prefix for installation of build artifacts (e.g. for staging an
installation in a temporary directory while keeping the overall prefixes
intact).

This variable should be ignored by all targets but the install target,
which requires us to set it to an empty string/path when we use
`install` to set up our rundir.
2022-09-17 16:15:56 -07:00
PatTheMav e64b1117fc cmake: Fix CMake package files not being installed on FreeBSD
By default libraries and their CMake package files should be installed
on Linux and FreeBSD and omitted on Windows. This explicitly adds
FreeBSD.
2022-09-17 16:12:01 -07:00
derrod db766273b6 cmake: Fix Sparkle framework permissions 2022-09-06 01:49:46 +02:00
PatTheMav b81ab5a32b UI: Fix small font size on macOS and fallback font
Qt uses a default font size of 13pt for QWidgets on macOS. By setting
the default font size to 10pt, text becomes too small for comfortable
use on macOS.

This PR patches the font files copied into the macOS bundle to use a
larger font-size of 12pt. It also sets the fallback font to the more
modern SF Display-based `.AppleSystemUIFont` used by default in macOS
if Open Sans is not found.
2022-08-25 18:02:22 +02:00
derrod d1a1a2c060 cmake: Set RELEASE_CANDIDATE/BETA based on git describe 2022-08-22 14:55:27 +02:00
PatTheMav 6c2860a4ec cmake: Fix missing interface include directory on Framework export
For exported targets `INCLUDES DESTINATION` behaves in a specific way
when running `install`: It sets the `INTERFACE_INCLUDE_DIRECTORY` for
the target (relative to the `INSTALL_PREFIX` when a relative path is
given).

This is not implicitly done by CMake, which resulted in the exported
libobs Framework to miss the variable and as such targets linking to
libobs were not able to find the necessary headers anymore.
2022-08-20 22:02:41 +02:00
PatTheMav ef2b0a0f52 cmake: Update pluginhelpers script from obs-plugintemplate 2022-08-10 02:05:27 +02:00
PatTheMav f31c1c124b cmake: Update Xcode project generation on macOS
* If a valid team id is provided, automatic code sign management is
  enabled
* Different deployment targets for x86_64 and arm64 are enabled for
  Xcode-based builds
* Codesign identity and code-sign style are set globally
2022-08-10 02:05:27 +02:00
PatTheMav 8e3f19722e cmake: Fix unwanted public header installation on macOS 2022-08-10 02:05:27 +02:00
PatTheMav c6ea39534f cmake: Remove workarounds for legacy obs-browser submodule 2022-08-10 02:05:27 +02:00
PatTheMav 2006092076 cmake: Fix missing header installation for libobs and obs-frontend-api 2022-08-10 02:05:27 +02:00
PatTheMav 3c3fdc7a70 cmake: Fix M1-based OBS.app appearing as being an "iOS" app
MacOS' system information checks the CFBundleSupportedPlatforms value
in the app's property list file for the type. This was correctly set
for plugin bundles, but not binary bundles so far.
2022-08-08 18:54:29 -04:00
PatTheMav 61f862d826 cmake: Fix broken pthread detection on Windows with CMake 3.24
Workaround for CMake issue
https://gitlab.kitware.com/cmake/cmake/-/issues/23829
2022-08-08 15:50:42 -07:00
PatTheMav 8db359d060 cmake: Fix plugin RPATH entry on Linux 2022-08-07 04:06:54 +02:00
Ed Maste 39269a7ae9 cmake: fix default version if git describe fails
If the `git describe` command fails we want to fall back to a default
version.  _OBS_DEFAULT_VERSION is not in the same format as the string
returned by `git describe` though.  In the event that the command fails
just use _OBS_DEFAULT_VERSION directly rather than trying to parse it.

Fixes: cmake fails if git is not installed but .git/ exists #6940
2022-08-07 00:51:01 +02:00
Ryan Foster b4e056f39d CI: Use Qt6 by default when available 2022-07-31 13:45:57 -04:00
PatTheMav a70dd4d925 cmake: Remove prefix suppression for scripting plugins.
SWIG uses the prefix target property to prefix generated Python
libraries with an underscore (so that obspython.py is loaded first,
which acts as a shim for the actual _obspython.pyd library on Windows).

Usually the prefix is set to an empty string on Windows (to avoid the
automatic "lib" prefix used by CMake), but this also removed the
necessary underscore prefix required for the Python library.
2022-07-31 17:48:35 +02:00
PatTheMav 018f52bfab cmake: Switch file system used by CPack for disk image to APFS 2022-07-31 12:21:35 +02:00
PatTheMav c9859e5afc cmake: Add informal output of Qt version selected for current build 2022-07-30 18:04:15 +02:00
pkv e7d097cab8
obs-ffmpeg: Native SRT/RIST for mpegts output
Currently the ffmpeg_mpegts_muxer output is integrated with ffmpeg-mux.
Both use obs native encoders in contrast with obs-ffmpeg-output which
relies on avcodec library.
This allowed easy implementation of SRT, RIST & HLS protocols through
avformat library.
The main drawback is that obs-ffmpeg-mux exe doesn't allow for easy
debugging nor logging of the protocols.
It was written initially as a separate binary designed for recording so
that if obs fails for some reason, the recording can still terminate
gracefully.

In this commit the ffmpeg_mpegts_muxer is rewritten so that a pipe to
the ffmpeg-mux binary is not used any more.
The muxing to mpegts is still delegated to avformat.
But it can be traced more easily in all its steps.
Also the protocol part for SRT & RIST is implemented natively.
Custom avio_contexts for SRT & RIST are used to that end.
This allows to pass our own implementation of librist and libsrt
libraries instead of relying on avformat. This is very advantageous :
- this allows better logging.
- this allows better bug fixing and maintainance without having to rely
on hypothetical upstream fixes.

One immediate bonus of native implementation is that fixes bugs which
were not previously fixable.

Fixes: SRT & RIST auto-reconnect partly broken  #6749
Fixes: SRT: OBS unusable and uncloseable after starting stream to
invalid srt server #5791

Signed-off-by: pkv <pkv@obsproject.com>
2022-07-30 17:03:10 +02:00
tytan652 9c85ff8673 cmake,UI: Refactor find_qt macro
If QT_VERSION is not defined, it gets define with the AUTO value. And
its definition is moved to the helper file.

find_qt now:
- Check quietly for Qt5 and Qt6
- If QT_VERSION is set to AUTO. It checks firstly if Qt5 was found it
  will use it. If not it do the same for Qt6
- If QT_VERSION is set to 5 or 6, it checks if the choice was found and
  use it. And if not, it falls back to the other if found.
- If neither Qt5 or Qt6 are found, a fatal error is emitted.
- The macro saved the _QT_VERSION in the cache to replace QT_VERSION,
  so the process is not repeated each time that find_qt is used.
- When Qt::Gui is in the Linux component list, Qt::GuiPrivate is added.
  So using the versioned one is no longer required.
2022-07-26 17:34:26 +02:00
PatTheMav 4e206896b2
cmake: Fix public header files being installed to rundir
Fixes oversight from https://github.com/obsproject/obs-studio/pull/6768
2022-07-21 22:35:09 +02:00
PatTheMav c4f12f9055 cmake: Fix RPATH on Linux for frontend-tools to find obs-scripting
This will fix frontend-tools not being able to find the obs-scripting
library when OBS is compiled as a portable application.
2022-07-21 12:16:36 -04:00
PatTheMav 4afc2c8e6f cmake: Change desired Python3 DLL name to stable ABI variant 2022-07-21 12:16:36 -04:00
tytan652 4dd1da8a1e cmake: Add EXCLUDE_FROM_ALL to Linux install_headers
Even without it, we still need to run the following command for other
files:
`cmake --install . --component obs_libraries`
2022-07-20 15:08:30 -04:00
tytan652 2ba32763e5 cmake: Add PUBLIC_HEADER DESTINATION for development rundir
Fix a warning thrown by CMake.
2022-07-20 15:08:30 -04:00
PatTheMav 4252c8a069 cmake: Fix pkgconfig generation
Existing code didn't check for possible "empty" linked libraries
(e.g. Threads::Threads when compiler has built-in pthreads support).
Also adds support for compile options defined on linked dependencies.
2022-07-19 09:28:51 -03:00
jpark37 3f86354863 cmake: Treat warnings as errors on MSVC 2022-07-18 03:52:04 -07:00
PatTheMav 48c52c9d74 cmake: Fix libraries and header files being installed for packages
The `EXCLUDE_FROM_ALL` token, which is responsible for excluding
components from a "unspecified" installation (which we use to create
the distributed package) needs to be specified for _every_ destination
specified in an `install` call.

This commit remedies the issue of missing tokens in these calls.
2022-07-13 15:52:13 -04:00
PatTheMav d940f21457 cmake: Fix build architectures and deployment target not set to defaults
CMake seems to set either `CMAKE_OSX_ARCHITECTURES` and
`CMAKE_OSX_DEPLOYMENT_TARGET` implicitly to empty cache variables when
not defined explicitly on the commandline or via a GUI.

Setting a default thus requires the `FORCE` flag to overwrite these
empty defaults with our desired results. The branches ensure that user-
provided non-empty values are not overwritten as well.
2022-07-06 19:19:43 +02:00
PatTheMav 04a06d10a6 cmake: Fix hardcoded SWIG_DIR path on macOS 2022-07-02 19:31:20 -04:00
PatTheMav aec31a9e6d cmake: Fix handling of optional debug wrapper libraries for obs-browser 2022-06-20 14:24:52 -04:00
Ryan Foster 6a2e2aba03 cmake: Use correct capitalization for Qt in messages 2022-05-16 20:28:01 -04:00
Ryan Foster 872c6cd58c cmake: Normalize path to QtCore_DIR
Resolve the relative path to an absolute path once and then use that for
all other Qt file paths.
2022-05-16 20:28:01 -04:00
Ryan Foster 4d741833f8 cmake: Teach CopyMSVCBins to use Qt 5 or 6
Make CopyMSVCBins.cmake work with either Qt 5 or Qt 6 depending on what
version the user has chosen.
2022-05-16 20:28:01 -04:00
tytan652 ed486b00e1 cmake: Fix headers installation
- Headers are now installed per default on Linux.
- `obs-hevc.h` is not installed if HEVC is disabled.
- OS exclusive headers are no longer installed on the wrong OS.
2022-05-07 16:13:21 -07:00
PatTheMav 90286a537b cmake: Fix cURL library handling for updated dependencies
Soon to be updated obs-deps built on CI will retain CMake package files
created while building dependencies. When CMake uses packages, the usual
triplet of variables from finders are not set. `CopyMSVCBins` relies
on one such variable.

This PR sets the `CURL_INCLUDE_DIR` if the cURL target is present, but
apparently imported as a CMake package, to ensure prior functionality is
restored.
2022-05-03 13:57:02 -04:00
Arthus b94e960d25 cmake: Rename variable in FindPipeWire for clarity
PIPEWIRE_DEFINITIONS contains ready-to-use compile flags. If used with
INTERFACE_COMPILE_DEFINITIONS, this can lead to a compile error.

Rename the variable to PIPEWIRE_COMPILE_FLAGS to be clear about that and
prevent accidental misuse.
2022-04-14 18:01:23 -04:00
Arthus 3dfb999c65 cmake: Fix compilation of targets using FindWayland
If WAYLAND_DEFINITIONS is set to "-I/usr/include/wayland", setting its
value as INTERFACE_COMPILE_DEFINITION leads to CMake emitting
"-D-I/usr/include/wayland" in the compiler flags. This breaks the
compilation of targets that call find_package(Wayland), such as libobs
and libobs-opengl, in gcc.

To avoid this, rename WAYLAND_DEFINITIONS to WAYLAND_COMPILE_FLAGS to
reflect that it contains ready-to-use compiler flags. Use
WAYLAND_COMPILE_FLAGS as INTERFACE_COMPILE_OPTIONS so it just gets
appended without adding the superfluous "-D".
2022-04-14 18:01:23 -04:00
PatTheMav 9c6897324a
cmake: Fixes plugins not being copied into application bundle on macOS
Makes the check for the number of plugins in the global list an explicit
length check (not relying on CMake implicit functionality), also moves
it in line with how the same was solved in `ObsHelpers.cmake` globally.
2022-04-05 11:11:14 +02:00
Zhao Zhili 255c4096a8 cmake: check empty OBS_MODULE_LIST for macOS 2022-04-02 21:46:52 +11:00
Zhao Zhili df4315103f cmake: Fix configure error on macOS when -DENABLE_SCRIPTING=OFF 2022-04-02 21:46:52 +11:00
Patrick Heyer 3c1d7aeb86
Merge pull request #6245 from PatTheMav/cmake-resource-fix
win-capture: Fix added resources not properly copied to rundir
2022-03-31 11:52:50 +02:00
PatTheMav d42c98fa22
win-capture: Fix added resources not properly copied to rundir
The `add_target_resource` function uses unnecessary path components
when copying files to the rundir, resulting in files added that way
not to end up where OBS expects them to.

The generated binaries created by sub-targets also need to be copied
as part of `win-capture`'s data files, which was easy to fix as the
target exists before CMake switches into the subdirectories.
2022-03-30 11:10:54 +02:00
PatTheMav 2d70650a1e
cmake: Fix usage of relative paths for CEF finder
To enable relative paths for `CEF_ROOT_DIR`, the variable needs to be
explicitly set as `PATH` type to work.
2022-03-29 10:05:17 +02:00
PatTheMav a6532fc176 cmake: Fix obs-ffmpeg-mux missing rpath entries for libobs in build tree
When using `install`, CMake will fix up a binary's rpath entries
automatically. As `install` is also used to copy all build artifacts
into a common runtime directory, this will lead to independent binaries
such as "obs-ffmpeg-mux" to be fixed up to run within a fully portable
app bundle.

Yet during development, the app bundle is not fully portable, so rpath
entries to e.g. libobs need to be retained. Using CMake's
`install PROGRAMS` variant will achieve just that.
2022-03-28 14:54:58 -07:00
tytan652 c7bf564015 cmake: Fix dylibbundler path for case-sensitive partition 2022-03-28 13:44:10 -04: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
derrod fd27ead2a7 cmake: Move obspython.py to Resources on macOS 2022-03-23 14:56:55 +01:00
Patrick Heyer 13f2d7925f
Merge pull request #6190 from PatTheMav/cmake-pdb-branch
CMake: Fix PDB install directory for library installation
2022-03-22 17:10:27 +01:00
PatTheMav 15b6128d09
CMake: Fix PDB install directory for library installation
obs-plugintemplate uses the `obs_libraries` component to install
obs components required for plugin development. The need of the separate
`pdbs` directory was removed a while ago (as PDB target installation
can be flagged as `OPTIONAL` and enabled for specific configurations
only). This part was overlooked in that change.
2022-03-22 15:24:49 +01:00
PatTheMav 1a7f5fb48e cmake: Fix targets not being copied into rundir on Windows and Linux
Windows and Linux do not require a contained application bundle to run
and debug OBS - as such targets can and should be copied independently
from the main OBS application target.

Also silences the output of the `install` step that sets up those files.
2022-03-21 13:18:57 -04:00
PatTheMav 8fba906be4
CI: Add necessary build system changes for universal and M1 builds 2022-03-16 23:23:40 +01:00
PatTheMav c993b6059a
CI: Update build scripts and Github actions workflow
Also updates main CMakeLists.txt and CMakeLists.txt for unit tests,
also adds additional build directories to .gitignore file
2022-03-16 23:13:26 +01:00
PatTheMav b667fb3eff
cmake: Add bundle support files for macOS and Windows 2022-03-16 23:11:07 +01:00
PatTheMav df94b02075
cmake: Update CMake finders and helper modules 2022-03-16 23:11:06 +01:00
Matt Gajownik b154006c9b cmake: Add libRIST to copied Windows libs
Required for #5467 and https://github.com/obsproject/obs-deps/pull/86
2021-12-23 18:14:16 +11: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
Carlo Castoldi 4623a6b4bc obs-ffmpeg: Set DRI devices and their name persistently
retrieving the DRI devices from /dev/dri/by-path/ instead of
/dev/dri/renderDXXX. This enable us to use lspci to get the device
name as well.
2021-12-12 11:12:36 +11:00
Paul Hindt ce3ae8e423
aja: Capture and Output plugin for AJA Video Systems IO devices
* aja: Initial commit of AJA capture/output plugin

* aja: Fix clang-format on aja-output-ui code

* aja: Remove script used during dev/testing

* aja: Address pull request feedback from @RytoEX

* aja: Remove the SDK sources and update CMakeLists to point to new headers-only/static libs dependency distribution.

* aja: Only build AJA plugin on x64 on macOS for now

* aja: Remove the non-English placeholder locale files. The english strings/files will be produced via crowdin, according to @ddrboxman.

* aja: Add FindLibAJANTV2.cmake script to locate the ajantv2 headers and static libs in the OBS external deps package(s). Tested on Windows x64. macOS and Linux x64 TBD.

* aja: Add ajantv2/includes to FindLibAJANTV2 include search paths

* aja: Remove commented code from aja CMakeLists

* aja: Remove debug code and comments that are no longer needed.

* aja: Fix indentation

* aja: Remove disablement of clang-format in routing table and SDIWireFormat map

* aja: Use spaces for all indentation in widget crosspoint arrays where we disable clang-format

* aja: Address code style comments made by @RytoEX

* aja: Fix uneven indentation

* aja: More fixes to if/else placement and remove superfluous comments.

* aja: Rename 'dwns' to 'deactivateWhileNotShowing' for clarity. The DeckLink plugin still uses the variable name 'dwns' and should be changed, if desired, in a separate PR.

* aja: Remove X11Extras dependency from AJA Output frontend plugin

* aja: Add patch from Jim to find AJA release/debug libs

* aja: Improve AV sync of queued video/audio sent to the AJA card in the AJA Output plugin.
2021-11-23 20:31:11 -06:00
Matt Gajownik a2c3896e1a UI: Match Windows taskbar state to tray icon
This adds a status icon for active/paused outputs.

Stripped down version of #2442
2021-11-03 09:28:41 -07:00
jp9000 442886c0aa obs-ffmpeg: Add AOM AV1 and SVT-AV1 encoders
Adds the ability to encode with software AV1 encoders within FFmpeg,
specifically AOM AV1 and SVT-AV1.
2021-10-25 12:24:16 -07:00
Kurt Kartaltepe 7384f6f061
linux-capture: Add libdrm dependency check (#5326)
We require libdrm for its header so add the cmake module and header path
to the build. We don't need to link libdrm though so we dont add it to
libraries.
2021-09-23 13:05:53 -05:00
derrod c44e225143 cmake: Add Qt JPEG/GIF plugins to Windows libraries 2021-09-15 07:49:43 +02:00
Ryan Foster a7eb44b337 cmake: Copy correct file for Qt imageformat plugin
During CMake configuration for 64-bit builds, CopyMSVCBins.cmake would
copy plugins/imageformats/qsvg.dll from the Qt directory to
additional_install_files/exec64r/imageformats/qsvg.dll (exec32r for
32-bit builds). However, it would copy plugins/iconengines/qsvgicond.dll
to the corresponding debug imageformats files location,
additional_install_files/exec64d/imageformats/qsvgicond.dll (or exec32d
for 32-bit). This appears to have been a simple copy-paste mistake.
Let's copy plugins/imageformats/qsvgd.dll instead.
2021-08-23 01:34:19 -04: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
Ryan Foster ac59d51724 cmake: Fix Detours package name CMake warning
Since CMake 3.17, find_package_handle_standard_args (FPHSA) will emit a
warning if the package name in the caller and in FPHSA do not match.
This normalizes the name "Detours" in CMake calls to prevent this
warning.
2021-05-20 16:54:01 -07:00
jpark37 0c25581cd3 cmake: Add module for Detours 2021-05-17 02:28:11 -07:00
Neal Gompa ae60123f7f cmake: Fix FindJack to support finding PipeWire's libjack
FindJack was not using _INCLUDE_DIRS and _LIBRARY_DIRS set by
FindPkgConfig, which prevented it from locating the PipeWire
version of libjack when it is installed to a non-standard path.

In particular, this impacts Fedora Linux, which is the first
distribution to have made the change to have all audio routed
through PipeWire and eliminate the usage of PulseAudio and JACK
by default.

Reference: https://fedoraproject.org/wiki/Changes/DefaultPipeWire
2021-05-12 18:33:16 -07:00
Ryan Foster a7b20fcd2a cmake: Remove outdated osxbundle files
These files have been superseded by files in CI/scripts/macos. They are
no longer used, and keeping them around creates confusion and makes
people think they are still used. Let's remove them to prevent further
confusion.

This commit also removes the CMake function `obs_finish_bundle` that was
only used with the osxbundle resources and removes calls to that
function.
2021-05-08 18:57:14 -07:00
gxalpha 3efc3dbb0f CI,cmake: Fix macOS version information
Fixes an issue where on macOS the app’s Info window in Finder would say
"Version: OBS - Free and Open Source Streaming/Recording Software"
instead of the version set in CFBundleShortVersionString.

Since CFBundleGetInfoString is deprecated anyways, it can safely be
removed.
2021-04-18 17:30:31 -07:00
jp9000 63bcc54b32 cmake: Automatically copy datatarget PDBs
Helps ensure DLLs associated with game capture, virtual camera, and
other such files have their PDBs copied alongside them in any Windows
build, and allows the ability to trace crashes that may occur from
within those files more easily.
2021-04-11 16:47:32 -07:00
Kurt Kartaltepe 058f009746 cmake: Improve OBS_VERSION undefined failure
If someone tries to build without git they need to set
OBS_VERSION_OVERRIDE, this makes the error message occur before things
like string parsing on the OBS_VERSION which look like missing
parameters.
2021-03-30 04:56:18 -07:00
Georges Basile Stavracas Neto c2f8b2058b linux-capture: Add PipeWire-based capture
Add a new Linux capture based on PipeWire [1] and the Desktop portal [2].

This new capture starts by asking the Desktop portal for a screencapture session.
There are quite a few D-Bus calls involved in this, but the key points are:

 1. A connection to org.freedesktop.portal.ScreenCast is estabilished, and the
    available cursor modes are updated.

 2. CreateSession() is called. This is the first step of the negotiation.

 3. SelectSources() is called. This is when a system dialog pops up asking the
    user to either select a monitor (desktop capture) or a window (window capture).

 4. Start() is called. This signals the compositor that it can setup a PipeWire
    stream, and start sending buffers.

The reply to this fourth call gives OBS Studio the PipeWire fd, and the id of the
PipeWire node where the buffers are being sent to. This allows creating a consumer
PipeWire stream, and receive the buffers.

Metadata cursor is always preferred, but on the lack of it, we ask the stream for
an embedded cursor (i.e. the cursor is drawn at the buffer, and OBS Studio has no
control over it.)

Window capturing is implemented as a crop operation on the buffer. Compositors
can send big buffers, and a crop rectangle, and this is used to paint a subregion
of the buffer in the scene.

The new capture is only loaded when running on EGL, since it depends on EGL to
call gs_texture_create_from_dmabuf().

[1] https://pipewire.org/
[2] https://github.com/flatpak/xdg-desktop-portal/
2021-03-29 17:00:31 -03:00
Georges Basile Stavracas Neto afb7bfa941 build: Include gio-unix-2.0
This will be needed for fd-passing by the new capture, specifically for
g_dbus_proxy_call_with_unix_fd_list().
2021-03-29 17:00:31 -03:00
Ryan Foster 7ed1634530 cmake: Fix some Qt files not being logged in CMake output 2021-03-10 20:05:50 -08: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 7801b3301a deps-glad: Add EGL
The code is generated by https://glad.dav1d.de/
2021-02-01 19:03:14 -03:00
PatTheMav 20bb465047 CI: Fix macOS 10.13 crashes due to unsupported library symbols 2020-12-19 18:48:38 -08:00
jp9000 2902cdb2ff cmake: Make sure to copy other mbedtls libraries 2020-11-23 12:29:59 -08:00
jp9000 9f6e49d12c cmake: Add Qt5Network to copied windows libs 2020-11-22 14:32:35 -08:00
Vadim Zhukov 12719816fc
Add sndio support (#3715)
Add sndio support
2020-11-14 11:58:55 -08:00
Daniel Porter f96b6dfeed cmake: Fix finding libfdk header path
A generally accepted path for DepsPath or LibfdkPath is the parent
directory that includes the 'bin' and 'include' directories. This fix
ensures FindLibfdk.cmake acts like other cmake helper scripts.

Closes obsproject/obs-studio#3474
2020-10-02 09:26:00 -07:00
jp9000 dc3839ab74 cmake: Add function for installing data from abs path
Allows the ability to install extra data from a specific absolute path
rather than a path relative to the cmake current source dir.  Useful if
say I want to generate data files in to the cmake binary folder rather
than put them in the data folder of the cmake source dir.
2020-09-06 17:46:03 -07:00
Jérémy Farnaud 7e39109a86 obs-filters: Add option to use RNNoise for noise reduction
This commit adds support to using Xiph and Mozilla RNNoise library for
noise reduction.

RNNoise is a small library using an AI approach to noise reduction
using a pre-trained model like RTX Voice. But unlike RTX Voice, it is
very tiny, use CPU instead of GPU and only use little resources.
Obviously it is not as efficient but will effectively remove background
noise. It uses more CPU than the existing libspeex-based noise
reduction but it also sounds sounds way better.

RNNoise support is added to the noise reduction effect. It can be
enabled with a checkbox in the effect configuration. RNNoise has no
settings.
2020-08-18 11:25:21 -07:00
jp9000 ebb093b8a3 Revert "UI: Match Windows taskbar state to tray icon"
This reverts commit d442fda3fc.
2020-07-11 06:12:51 -07:00
PatTheMav d94709d945
CI: Update build script to use pre-built SWIG and QT dependencies 2020-07-10 01:01:32 +02:00
Kurt Kartaltepe d928bfd1ea cmake: Fix warnings and normalize variables/errors
As of 3.17 using find_package_handle_standard_args checks that the name
of the FindXXX file and the first argument are the same case.

Some modules used non-standard variables or the old singular variables
instead of plurals. This normalizes variable usage to the new-style.

Some CMakeLists.txt did custom error checking instead of propagating
find_package errors. These were changes to call find_package with
REQUIRED or without QUIET where needed and shortens the custom status
messages. This helps users who want to enable that functionality see
what precisely wasnt found.
2020-05-21 18:45:16 -07:00
Jim e822b47427
Merge pull request #2442 from WizardCM/windows-extras
Windows: Taskbar icon & colour
2020-05-21 17:45:34 -07:00
jp9000 8d6f29ffc7 Revert "Merge pull request #2637 from kkartaltepe/cmake-variety-fixes"
This reverts commit d777000a60, reversing
changes made to c9e5f30a78.
2020-05-21 00:03:09 -07:00
Jim d777000a60
Merge pull request #2637 from kkartaltepe/cmake-variety-fixes
cmake: Fix warnings and normalize variables/errors
2020-05-20 23:45:25 -07:00
Matt Gajownik d442fda3fc UI: Match Windows taskbar state to tray icon
This adds both a status icon, and changes the color
of the taskbar button itself.
2020-05-07 20:05:35 +10:00
Ka Ho Ng a5a8cc261c plugins: Add oss-audio plugin
This implements OSS audio input capturing support for OSS-capable OSes.
FreeBSD and DragonFly (not yet tested on) supports are added as a
starting point.
2020-05-02 17:38:27 +08: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
Kurt Kartaltepe c5b731e48f cmake: Fix warnings and normalize variables/errors
As of 3.17 using find_package_handle_standard_args checks that the name
of the FindXXX file and the first argument are the same case.

Some modules used non-standard variables or the old singular variables
instead of plurals. This normalizes variable usage to the new-style.

Some CMakeLists.txt did custom error checking instead of propagating
find_package errors. These were changes to call find_package with
REQUIRED or without QUIET where needed and shortens the custom status
messages. This helps users who want to enable that functionality see
what precisely wasnt found.
2020-04-03 21:32:10 -07:00
jp9000 e55a2b4331 cmake: Add FindVulkan module 2020-02-29 00:15:54 -08:00
jp9000 9646fd38b4 cmake: Copy a few missing dependency files 2020-02-24 14:51:38 -08: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
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
Rat f6aed7cb72 obs-scripting: Fix script plugin destination path on MacOS
The actual plugin files get copied to obs-scripting/ without the
64bit subdir like everything else on MacOs, fix this path accordingly
otherwise the scripting home dir passed to Python is incorrect
2019-09-26 23:29:05 +02:00
Colin Edwards ef668b239d
Merge pull request #1678 from boxerab/libvlc_pkgconfig
cmake: Fix pkg-config handling of libvlc
2019-03-13 23:10:23 -05:00
derrod 9cc0d459bd cmake: Fix Qt DLL filenames for debug builds 2019-03-10 09:47:16 +01:00
Clayton Groeneveld 80875768ad UI: Redo settings icons 2019-03-05 19:54:12 -06:00
Aaron Boxer c150eabe35 cmake: Fix pkg-config handling of libvlc
Tested against VLC 3
2019-02-28 10:21:59 -05:00
jp9000 85d259e05c cmake: Make directory before copying file
Fixes the install_obs_data_file cmake helper function to be more
consistent across operating systems.
2018-09-07 03:41:36 -07:00
jp9000 1ea4da3f98 cmake: Add install_obs_data_file function
Allows copying an individual file (which may not be in the data dir) to
an specified install location.
2018-09-07 00:20:14 -07:00
bluekirby0 0d25ab6776 cmake: Add luajit 2.1 support to build 2018-08-18 10:38:21 -04:00
Michael Goulet e67e2e12e6 obs-outputs: Add support for and use mbedTLS for SSL
This diff adds mbedTLS support to the obs-outputs plugin.  PolarSSL and
mbedTLS have grown so different between 2015-or-so when libRTMP was
written, and now it's no longer feasible to just use the USE_POLARSSL
flag.

This commit adds a WITH_RTMPS tri-state CMake variable (auto/on/off),
set to "Auto" by default.  "Auto" will use RTMPS if mbedTLS is found,
otherwise will disable RTMPS.  "On" will make it require mbedTLS,
otherwise fails configuration, and "Off" disables RTMPS support
altogether.

Closes obsproject/obs-studio#1360
2018-08-05 18:40:49 -07:00
Colin Edwards 27b5c3be71 OSX: Add NSCamera and NSMicrophone UsageDescription for 10.14 2018-07-27 14:11:55 -05:00
Shaolin 3aaa12aa17 cmake: Add xcb-xinput support
Ubuntu 17.04 updated libxcb1-dev to 1.12 where xinput should be enabled
by default but debian disables it by default atm. Compile libxcb with
--enable-xinput to use this within obs. Arch enables it by default,
debian does not and fedora is untested.
2018-05-07 21:31:16 -03:00
jp9000 a81de7fb61 cmake: Include windows style DLL when copying Qt files 2018-03-18 17:01:01 -07:00
Kurt Kartaltepe 59c3d195e6
cmake: Remove extraneous checks
These don't appear to be necessary and prevent qt binaries from
being found on some systems.
2018-03-14 20:52:14 -05:00
Ben Krueger f374810403 cmake: Fix LuaJIT search 2018-01-30 21:13:10 -08:00
juvester 206c853d00 cmake: Search for Python 3.4
Fixes an issue where Python libraries aren't found on Ubuntu 14.04
because CMake 2.8 only searches up to Python 3.3.
2018-01-21 14:27:55 +02:00
Jim bf6231e122
Merge pull request #1147 from kkartaltepe/swig-cmake-fix
CMake: Fix FindSwigDeps search path
2018-01-16 05:52:16 -08:00
jp9000 db2d4c97e8 deps/obs-scripting: Fix installed files/locations on linux
Uses the 'install' command in cmake to install scripting modules/files
(such as _obspython.so, obslua.so, and obspython.py), and changes the
install location of those files on all operating systems.  If using a
non-unix structure install, those files will be installed in
data/obs-scripting/[32bit/64bit], otherwise with unix structure installs
those files will be installed to [/usr/local/lib]/obs-scripting.
2018-01-16 03:55:38 -08:00
Kurt Kartaltepe 32049bfd43 CMake: Fix FindSwigDeps search path 2018-01-11 21:37:10 -06:00
SuslikV aa2055ea81
cmake: add more LuaJIT lib names
Makes building on Windows easier.
2018-01-08 18:07:08 +02:00
jp9000 96f481294b cmake: Fix copying lua51.dll (luajit) dep on windows 2018-01-07 19:21:35 -08:00
jp9000 2651d076db deps/obs-scripting: Fix swig/python lookup on windows
Fixes swig/python dependencies to search for the pre-compiled deps on
windows.
2018-01-07 17:47:55 -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
Joel Bethke d9b0c85daf cmake: Enable COPY_DEPENDENCIES by default on Windows
When setting up a build for the first time on windows, makes it so you
no longer have to run cmake twice:  once to build, then once again with
the COPY_DEPENDENCIES box to ensure dependencies are copied.

Closes jp9000/obs-studio#768
2017-01-23 22:21:38 -08:00
jp9000 b6bde7e026 cmake: Remove unnecessary find_package calls
Fixes a bug in cmake that would cause a libavcodec_dir being set to "not
found", confusing new contributors
2017-01-15 09:15:43 -08:00
Serge Paquet 64559a0cb8 cmake: Fix permissions with OSX fixup_bundle.sh
Fixes an issue where the files copied by fixup_bundle.sh will not work
with install_name_tool without proper permissions.

Closes jp9000/obs-studio#618
2016-11-24 07:15:03 -08:00
Serge Paquet ae9158216e cmake: Fix OSX fixup_bundle.sh to copy non-system deps
Without this fix, the fixup script misses any non-system dependencies
that are not in the /Users or /opt directories.

Closes jp9000/obs-studio#618
2016-11-24 07:13:34 -08:00
jp9000 5d332de45c cmake: Add macro to compile .tlb files via midl 2016-11-19 03:04:45 -08:00
jp9000 9f551d11b4 cmake: Add module to find RSSDK 2016-11-19 03:04:44 -08:00
Younes SERRAJ f029ec821e cmake: Fix FFmpeg search path on debian
Although FFmpeg is installed, OBS currently fails to build on debian
(tested on Debian Jessie 8.6).  It looks for libavcodec.a in
/usr/local/lib and not /usr/lib.

Closes jp9000/obs-studio#661
2016-10-16 01:01:34 -07:00
Jim 9cb8ae74e4 Merge pull request #635 from cortexmedia/msi-license
Display license in MSI installer
2016-10-09 17:09:25 -07:00
Colin Edwards f1a9c139b8 Add 256x256 icon to windows ico for HiDPI displays 2016-10-08 19:41:31 -05:00
Serge Paquet a97a9a966c Display license in MSI installer 2016-09-28 12:06:35 -04:00
jp9000 0d294cc049 cmake: Add module to find libspeexdsp 2016-07-25 20:17:13 -07:00
jp9000 670c655d41 cmake/external: Add function to install specific arch data file
Allows installing a single specific file to the data/[arch] directory.
2016-06-23 20:05:57 -07:00
jp9000 d3ece746f2 cmake/external: Fix a few external plugin script bugs
For install_external_plugin_bin_to_data and
install_external_plugin_bin_to_arch_data, they were using the
'plugin_target' variable instead of just 'target' for the plugin
directory output location, and they were using 'target' instead of
'additional_target' for the data/binaries they were supposed to be
installing.
2016-06-23 20:05:57 -07:00
jp9000 d89299fc1a vlc-video: Add VLC video source
Adds the ability to add video playlists via libvlc instead of via the
media source.  This is mostly just being added as a secondary option to
the media source to reduce maintenance costs and save time.  Currently
libff cannot pause/unpause/seek, and isn't programmed to handle
playlists yet.

If VLC is installed on the computer (with the same architecture) it will
allow video playback via libVLC.  In the future, users should be able to
optionally download VLC libraries via the installer as well if they
don't want to necessarily install VLC to get the plugin working.

This plugin performs runtime linking instead of compile-time linking;
compiling VLC is not required, only its headers are required.  To
compile, clone the VLC repository and set the VLCPath cmake variable to
point to the VLC repository directory.
2016-06-06 23:53:59 -07:00
jp9000 6014d4dc6d cmake: Also copy libvpx library for MSVC if available 2016-04-26 15:02:40 -07:00
yogpstop 4b4ddbb33e obs-outputs: Add USE_SSL option (disabled by default)
Closes jp9000/obs-studio#487
2016-02-07 15:47:18 -08:00
jp9000 b9d6c649f5 cmake: Copy ogg and vorbis libs with avcodec 2015-09-20 16:58:14 -07:00
jp9000 88ab25870e cmake: Add helper to find dbus package
The DBus library is a message bus system used to make applications
communicate with each other.  The primary reason for adding it is to
access certain service features to prevent computer sleep/hibernate/etc.

This will also create a HAVE_DBUS variable (set to 1 or 0 if found or
not found)
2015-09-12 19:15:32 -07:00
Palana 5dd030882d cmake: Add zlib support 2015-08-12 15:30:30 +02:00
jp9000 81649eab0d cmake: Add FFmpeg/x264 include header path suffix
This allows people to use the base directory of cross-compiled
dependencies (typically our dependencies.zip file), rather than always
having to specify the actual include directory.
2015-08-12 04:21:26 -07:00
jp9000 4ed1e2f03c cmake: Allow external plugins to share libobs deps
This addition allows external cmake modules to include the same modules
that are commonly distributed with the main obs-studio repo: things like
FFmpeg, curl, etc.
2015-07-18 16:41:03 -07:00
jp9000 c87d3b1f12 cmake: Rename FindFFMpeg to FindFFmpeg
This was sort of driving me crazy: The 'm' in FFmpeg isn't supposed to
be capitalized.
2015-07-18 16:32:26 -07:00
jp9000 fbf771620a cmake: Fix external plugin cmake module comments 2015-07-18 01:29:11 -07:00
jp9000 f9b9bfa9b6 cmake: Change search for "Libobs" instead of "obs" 2015-07-16 17:20:10 -07:00
jp9000 7226fc7b53 cmake: Rename FindObs.cmake to FindLibobs.cmake
Mostly done to prevent confusion between UI and libobs.
2015-07-16 17:11:52 -07:00