150 Commits

Author SHA1 Message Date
Translation Updater
81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
PatTheMav
43bdc627ea mac-capture: Remove display name code path for Mac OS X before 10.15 2022-07-31 12:21:35 +02:00
gxalpha
728d919bde mac-capture: Make background transparent in SCK App Capture on macOS 13+ 2022-07-31 11:22:48 +10:00
gxalpha
5f40084d25 mac-capture: Don't exclude desktop windows in SCK display capture
This fixes the desktop wallpaper missing on Display Capture on macOS 12
2022-07-30 15:24:35 +02:00
gxalpha
0207531910 mac-capture: Inline content_changed function 2022-07-30 15:24:35 +02:00
PatTheMav
93adc0a88c mac-capture: Fix creation of invalid window stream on source creation
When the ScreenCaptureKit-based source is generated, the window ID
read from the settings will be empty and interpreted as window ID "0".

This window ID doesn't represent a valid window, but the capture stream
is nevertheless successfully initialized with that value, but will not
generate any output.

Worse, the activated stream should be destroyed when a new stream is
created, but creation will throw an error.

This commit ensures that a valid window ID is used if no good default
value is available, ensuring a working (and destroyable) stream.

Also removes any remaining usage of the old window-utils.
2022-07-26 21:29:48 +02:00
PatTheMav
2bea178fb7 mac-capture: Fix issue with desktop capture introduced by macOS 12.5
Initializing a display stream with a content filter which excludes an
empty list of windows leads to a broken stream. Initializing with a list
of all available windows as a workaround re-enables functionality.
2022-07-26 21:29:48 +02:00
PatTheMav
2d2a5cad59 mac-capture: Cleanup code to improve efficiency
Reduces the amount of calls to the update callback (also reduces amount
of calls to check for available capture content).

Also moves some code to only update data for currently selected capture
type.
2022-07-26 21:29:48 +02:00
PatTheMav
790c5b66f6 mac-capture: Fix availability on macOS 12.5
Whereas the `availability` checks will correctly detect macOS 12.5,
the `__MAC_OS_X_VERSION_MAX_ALLOWED` macro is dependent on the platform
SDK. The most current platform SDK is 12.3, hence why this version
needs to be checked for.
2022-07-26 21:29:48 +02:00
gxalpha
17a4d9166a mac-capture: Improve SCK locale strings 2022-07-26 15:30:47 +02:00
gxalpha
b72f15dcef mac-capture: Don't show apps with empty name in SCK
SCK's application list has one entry with empty name and bundle ID which
belongs to WindowServer. This is not worth exposing since an empty entry
would confuse users and nothing would get captured if selected.
2022-07-24 13:59:09 +02:00
gxalpha
22baff138b mac-capture: Add deprecated flag to traditional captures if SCK exists
Marking a source as deprecated will make it harder for users to find
when creating a new source. We don't currently plan on removing
traditional display and window capture, however ScreenCaptureKit will be
the preferred capture method going forward.
2022-07-24 13:59:09 +02:00
gxalpha
33a48a6e9c mac-capture: Add label about missing audio on macOS 12 to SCK 2022-07-24 13:59:09 +02:00
PatTheMav
94cf50a8ce mac-capture: Add more verbose log warning for missing permissions 2022-07-24 13:59:09 +02:00
PatTheMav
1d11c2d933 mac-capture: Fix compiler warnings for unused variables and data loss 2022-07-24 13:59:09 +02:00
PatTheMav
0df6c74f7d mac-capture: Make properties window reactive to selected capture type 2022-07-24 13:59:09 +02:00
PatTheMav
ca1a37586f mac-capture: Increase required macOS version for ScreenCaptureKit 2022-07-24 13:59:09 +02:00
Developer-Ecosystem-Engineering
81b631a855 Add support in "macOS ScreenCapture" for capturing audio through ScreenCaptureKit in macOS 13. By default, OBS will capture the audio for the frame content its capturing and exclude OBS own audio. For additional information
on the capabilities of audio capture refer to the documentation https://developer.apple.com/documentation/screencapturekit/ or watch the session "Meet ScreenCaptureKit".

Currently audio capture typically happens via virtual devices set up with 3rd party products. This requires additional installation and configuration by users.
Including the audio with the existing CMBuffers will make it easier to manage audio sync with video frames. Additionally, you can capture distinct audio tracks from multiple apps at once,
like a call with friends +  screen content.

macOS 13 on a 2019 16" MacBook Pro
macOS 13 on a 2022 M1 Pro Macbook Pro

Tested with multiple games + Discord, FaceTime, Apple Music and Safari tabs playing audio content.

* Bug fix (non-breaking change which fixes an issue)
* Performance enhancement (non-breaking change which improves efficiency)

* Additional control over what audio content to capture
* Logic to manage audio & frame sync
2022-07-24 13:59:09 +02:00
Developer-Ecosystem-Engineering
9ed5062e59 mac-capture: Add support for improved window capture in macOS 12.3
Add a new capture plugin called General Capture that allows for capture
of an entire desktop, a single window, or all windows of an application
2022-07-24 13:59:09 +02:00
Norihiro Kamae
7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
Dossy Shiobara
4405072e29 mac-capture: Improve window capture performance
Replaces the current implementation of Window Capture, which uses Core
Graphics to render a bitmap raster, with one that accesses the window's
CGImage bitmap directly, blits it, and hands that off as a frame to OBS
instead.

Co-Authored-By: Sebastian Beckmann <beckmann.sebastian@outlook.de>
2022-05-07 16:21:25 -07:00
PatTheMav
b52b292fa2 mac-capture: Fix compiler warnings 2022-05-04 12:09:04 -04:00
PatTheMav
49e9d49943
plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
eightball567
6df5a98534 mac-capture: Add vbcable to whitelist for loopback devices 2022-03-12 15:41:06 -08:00
Translation Updater
ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
jp9000
51050b3075 Revert "mac-capture: Improve window capture performance"
This reverts commit 257715d31f300aa4838784954a8caf567a04855d.

Was merged prematurely by mistake (clicked the merge button on the wrong
tab).
2021-12-20 14:02:58 -08:00
Dossy Shiobara
257715d31f mac-capture: Improve window capture performance 2021-12-20 09:05:36 -08:00
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
Developer-Ecosystem-Engineering
0fd153f9e1 mac-capture: Update display names
Display names for captured displays should render human readable
2021-06-30 01:52:04 -07:00
Translation
ef2b1eb1c6 Update translations from Crowdin 2021-06-11 07:18:15 -07:00
Gol-D-Ace
90df8d44df Update translations from Crowdin 2021-05-30 20:33:35 +02:00
jpark37
99eb509fe9 mac-capture: Add OBS_SOURCE_SRGB flag 2021-05-03 01:19:56 -07:00
GingerAudio
ec0bf68e4a mac-capture: Add another virtual output loopback device
Adds "GroundControl" fake output device for audio loopback on macOS.
2021-04-13 05:57:41 -07:00
Doug Kelly
5d711ebbda mac-capture: Adjust mHostTime to milliseconds
The timestamp returned by mHostTime in the AudioTimeStamp structure
is the current timestamp equivalent to mach_absolute_time(), which
is relative to the machine's time base. In order to convert this
to milliseconds, it's necessary to get the host's timebase with
mach_timebase_info() and scale the timestamp accordingly, since
the rest of the timestamp synchronization code expects the timestamp
to be in milliseconds.

This is effectively equivalent to the code which was previously in
libobs/util/platform-coca.m, but must be applied here instead.
2021-02-28 19:00:43 -08:00
jpark37
ebc22dea78 mac-capture: Support linear SRGB 2021-01-21 07:42:57 -08:00
Gol-D-Ace
7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Gol-D-Ace
7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
PatTheMav
fb27900e94 CI: Remove explicit LANGUAGE flags for cmake 3.19+ 2020-11-21 12:00:52 -08:00
Jim
149550392b
Revert "mac-capture: show actual windows in Window Capture sources" 2020-10-03 14:23:54 -07:00
Gol-D-Ace
c66ebde080 Update translations from Crowdin 2020-09-27 23:07:27 +02:00
Tim Vaca
f694f94b14 mac-capture: Filter non-trivial windows
Filter the window list provided by the OS to prevent listing icons and
system windows as possible window capture targets.

Fixes #3146.
2020-09-02 11:13:33 -04:00
pkviet
77fa8aef0e mac-capture: Add several virtual audio drivers to Desktop audio
This allows the following virtual audio devices to be listed as Desktop Audio devices:
- loopback;
- iShowU;
- BlackHole.
2020-06-26 08:46:19 +02:00
jp9000
7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
jpark37
3d6bec6d2d mac-capture: Use resize instead of reserve
Better practice for the tracked size to be nonzero.

This does NOT speed up window capture significantly.
2020-05-09 09:12:48 -07:00
David Bieber
46979536a1 mac-capture: update owner_pid in update_window 2020-04-07 13:30:53 -04:00
David Bieber
4718e5ecf5 mac-capture: Use int in place of NSNumber for owner_pid 2020-04-07 13:26:46 -04:00
David Bieber
ebbe856d83 mac-capture: Only find window by window id when owner name and pid match 2020-04-05 22:10:36 -04:00
David Bieber
239cad00e4 mac-capture: Use window id to identify windows on MacOS
Use a window's window id in init_window in the mac window capture plugin.
2020-04-05 22:09:49 -04:00
jp9000
f7cf707ea5 mac-capture: Fix redundant call 2020-01-30 06:46:33 -08:00