Commit graph

161 commits

Author SHA1 Message Date
Translation Updater 10b02e11d0 Update translations from Crowdin 2024-03-12 18:11:06 +00:00
PatTheMav 12d25f9a91 mac-avcapture: Fix possible crash if camera uses BGRA format
BGRA or other formats that do not use color primaries will not yield
a valid color primary value. Initializing the CFComparisonResult to a
default value and replacing it only if a non-NULL color primary value
was retrieved avoids a possible crash.
2024-03-08 17:38:40 -05:00
Vainock 7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
PatTheMav 745f87f21f mac-avcapture: Fix frame rate collection for camera device formats
Some devices will report different framerate ranges for formats that
are identical apart from color primaries. Without taking these into
account, only framerates for one color primary variant would be used
to populate the framerate dropdown in the property view of the camera
source.

Checking for a difference in color primaries when iterating over all
available formats for a device thus requires checking for this
variation and adding the additional frame rate range as well.
2024-02-24 17:38:18 -06:00
PatTheMav 03c42e5b93 mac-avcapture: Fix crash issues on Intel-based Macs and older macOS
Fixes several possible crash issues that might occur on Intel-based Macs
and older macOS versions:

On modern macOS versions (13+) allocated memory is zero-allocated by
default which makes NULL pointer checks work correctly after allocation.

On older macOS versions this is not the case, so the OBSAVCaptureInfo
struct needs to be zero-allocated to ensure the guards in the tick and
render functions bail out correctly.

On Intel-based Macs and/or older macOS versions passing a reference to
the OBSAVCapture instance inside the OBSAVCapture struct can lead to a
crash because of a possible circular reference that cannot be resolved
at runtime.

Passing only a reference of the OBSAVCapture to libobs and incrementing
the retain count at source creation (decrementing in when the source is
destroyed) avoids this issue entirely.
2024-02-20 17:57:09 -05:00
PatTheMav ee28503726 mac-avcapture: Add color format selection for capture card source
Some devices do not support all color formats at all resolutions, but
the capture card source automatically uses an available color format
and compares it against the available format for a specific resolution.

Without being able to change this format, some resolutions do not
work as CMIO will not be able to find a compatible format. Thus the
color format needs to be manually selected for capture card sources
as well.
2024-02-17 19:28:28 -05:00
Translation Updater ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
PatTheMav e284a79b48 mac-avcapture: Update plugin to ObjC and modern APIs
Marks old AVFoundation capture source as deprecated.
2024-01-19 16:56:10 -05:00
PatTheMav 7dbde70de1 cmake: Remove support for generators besides Xcode on macOS 2023-12-19 17:59:44 -05:00
PatTheMav eae5cc1e38 plugins: Update CMake formatting with manual format choices 2023-12-19 17:59:44 -05:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
gxalpha ba4467199c plugins: Remove old macOS version ifdefs
8dd20dfd33 introduced an explicit check
for the available macOS SDK, meaning that we can be sure that the macOS
13.1 SDK is available. As such, we do not require ifdef guards for the
availability of functions that are older than 13.1.
2023-10-27 16:00:42 -04:00
gxalpha 856059b37c mac-avcapture: Replace kCMIOObjectPropertyElementMaster with Main 2023-10-17 16:45:36 -04:00
Translation Updater 0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
gxalpha 321829d932 mac-avcapture: Log if portrait or studio light effects are active
These effects can remain enabled between devices (so enabling it on one
device can mean it's later also enabled on another device), leading to
cases of capture cards getting blurred.
Logging that the effects are enabled should make it easier to spot this
in support.
2023-08-30 15:24:31 -04:00
Norihiro Kamae f7b37b0832 mac-avcapture: Remove an unused static function 2023-08-26 16:52:35 -07:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
PatTheMav 7628265099 Update .clang-format rules for ObjC files for version 16 2023-08-10 17:12:30 -04:00
Ryan Foster 64139a6bbd CI: Update to clang-format 16
This commit also modifies UI, libobs, and plugins.
2023-08-10 16:07:25 -04:00
PatTheMav 59904a66a3 cmake: Update Framework link definition for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav 9805b706d1 cmake: Remove legacy files for macOS builds 2023-06-17 12:23:33 -04:00
PatTheMav 50a4e83251 cmake: Remove Info.plist template files for macOS builds
Creation of Info.plist files through Xcode is more canonical and
future-proof, as it will automatically pick up changes/updates
introduced by Apple. Non-standard keys can still be added via a
template file, which will then be extended by Xcode with the default
keys.
2023-06-17 12:23:33 -04:00
PatTheMav f8e00d6071 clang-format: Update formatting of all ObjC and ObjC++ files 2023-06-11 14:56:45 +02:00
Norihiro Kamae 21144b7200 mac-avcapture: Add missing translation 2023-05-20 16:35:05 -07:00
Lain 106c7aa61f Update copyrights/names 2023-05-20 01:31:18 -07:00
Translation Updater a0fbdc3c34 Update translations from Crowdin 2023-05-01 23:11:13 +00:00
PatTheMav 8b186bac9b mac-avcapture: Fix questionable use of comma 2023-04-08 16:26:34 -07:00
Translation Updater 7c5560bf1b Update translations from Crowdin 2023-03-27 13:39:03 +00: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
PatTheMav c5bb6218b6 mac-avcapture: Fix compiler warnings
CMake build framework 3.0 introduces more strict typing checks, which
require additional code fixes to silence.

* Fixes warnings about multi-character assignments
* Fixes warnings about implicit casts
2023-02-18 15:22:33 -08:00
Translation Updater 783bd52197 Update translations from Crowdin 2023-01-08 04:10:37 +00:00
Developer-Ecosystem-Engineering faea7fb8b2 mac-avcapture: Add DeskCam support 2022-11-08 22:41:52 +01:00
Translation Updater f065f20ce1 Update translations from Crowdin 2022-10-25 22:32:14 +00:00
PatTheMav 8388cc22d2 mac-avcapture: Allow fetching source properties without source
Per OBS API documentation, `get_properties` can be used to get the
properties of a source, but also of a source type. The latter would
pass a NULL pointer for a given source.

This adds the necessary change to avoid crashing OBS by passing such
a null pointer.
2022-09-21 14:28:59 -04:00
Translation Updater cc2d0791ca Update translations from Crowdin 2022-08-30 09:00:44 +00:00
Norihiro Kamae f393adb7e6 plugins: Rename Partial to Limited in localization files
The commit 9409ce1ea7 rephrased Limited instead of Partial. Other
plugins should follow the updated phrase.
2022-08-29 10:03:12 -07:00
Translation Updater 4aaa07f93d Update translations from Crowdin 2022-08-17 04:22:50 +00:00
Translation Updater 81734be37c Update translations from Crowdin 2022-07-31 23:40:53 +00:00
PatTheMav 290509f41d mac-capture: Remove guard for Mac OS X 10.10 2022-07-31 12:21:35 +02:00
PatTheMav 5b7879d9aa mac-capture: Remove codepath for discovering devices pre Mac OS X 10.15 2022-07-31 12:21:35 +02:00
PatTheMav 7acf785322 mac-capture: Remove presets for Mac OS X pre 10.15 2022-07-31 12:21:35 +02:00
tytan652 a81a9ea113 mac-avcapture: Fix null-conversion warning 2022-07-19 12:46:42 +02:00
PatTheMav c61d523d58 mac-avcapture: Fix deprecation warning for AVCaptureDevice list
Direct access to `[AVCaptureDevice devices]` is deprecated since macOS
10.15. An `AVCaptureDeviceDiscoverySession` is to be used instead, which
this PR implements.

When running on older macOS versions or compiling against older platform
SDKs, the deprecated method is used.

PS: The formatting is not proper ObjC style, but that's clang-format's
doing with our current settings.
2022-07-10 10:09:58 +10:00
Vainock e053f9dd26 UI,mac-avcapture: Use consistent variables in locales 2022-07-02 14:02:40 +10:00
gxalpha 72830ea553 mac-avcapture: Make "High" preset default 2022-06-25 16:10:28 -07:00
gxalpha cedc397b9f mac-avcapture: Capture audio if supported
Some webcams, or other AVCaptureDevices like connected iOS devices which
are supported since 162450c, have an audio output which so far got
ignored.
Now, if supported, the audio will be captured alongside the video. For
existing sources, the properties have a button enabling this; while new
sources have it enabled by default.
2022-05-23 08:59:24 -04:00
jpark37 848e128435 libobs,plugins: Replace video matrix function
video_format_get_parameters_for_format provides a more accurate matrix
than video_format_get_parameters.
2022-04-07 19:28:51 -07:00
PatTheMav 49e9d49943
plugins: Update CMakeLists.txt for included plugins 2022-03-16 23:11:08 +01:00
Translation Updater ac8dbf67be Update translations from Crowdin 2022-02-06 02:24:08 +00:00
Translation Updater 261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00