41 Commits

Author SHA1 Message Date
gxalpha
a1f9170180
mac-virtualcam: Free virtualcam data when destroying
Fixes a memory leak introduced in db733032e
2022-06-16 18:45:24 +02:00
Fabian Mastenbroek
37c76abf0d
mac-virtualcam: Fix CMIO errors due to unsettable properties
This change fixes an issue with the CMIO DAL plugin where the CMIO
subsystem would log multiple errors when starting the virtual camera,
due to certain properties that could not be set (frame rate and format).

For now, we just ignore the assignment, but mark the property as
settable to suppress the error messages that are reported by the CMIO
subsystem.
2022-06-10 14:29:55 +02:00
Fabian Mastenbroek
40cb92a7a5
mac-virtualcam: Fix port leakage in Mach server
This change fixes an issue in the Mach server exposed by the macOS
virtual camera for OBS, where it would not invalidate ports that were
disconnected by the remote application, causing sporadic crashes.

These crashes can be reproduced in the previous builds by opening the
virtual camera in a remote application and closing the application
(without stopping the virtual camera).
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
db733032e0
mac-virtualcam: Do not rely on global state
This change updates the implementation of the mac-virtualcam plugin to
not use any global state and instead rely on the state object that is
passed by the OBS module system.

This approach is similar to the virtual camera implementations for Linux
and Windows.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
5edabfe7c1
mac-virtualcam: Remove unused CMSampleBuffer utility functions
This change removes the unused CMSampleBuffer utility functions that
were still left from the previous implementation. Since we construct the
CMSampleBuffer directly from an IOSurface, we do not need any custom
construction logic anymore, since that is now performed by the OBS
plugin.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
202eb8f513
mac-virtualcam: Prevent output conversion if possible
This change updates the mac-virtualcam implementation to conditionally
enable conversion of the output video format. Previously, the output
video was always converted into UYVY. However, this conversion exhibits
high CPU usage, as reported in:
https://github.com/johnboiles/obs-mac-virtualcam/issues/102

Therefore, we disable conversion when the selected output format (e.g.,
NV12) is natively supported by CoreVideo's pixel buffers.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
8683eb10e1
mac-virtualcam: Support multiple AV planes
This change updates the plugin to support video formats that contain
multiple planes (such as NV12). Such functionality is necessary to
prevent transcoding the raw video data, which is often delivered in a
planar format.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
29ca91852b
mac-virtualcam: Pool pixel buffers
This change updates the mac-virtualcam implementation to pool the
CVPixelBuffers used to share the output frames. This allows the plugin
to recycle the pixel buffers used by the plugin.
2022-06-10 13:37:03 +02:00
Fabian Mastenbroek
aa3781fde9
mac-virtualcam: Use IOSurface to share output with virtual cameras
This change updates the virtual camera implementation on macOS to
utilize IOSurface to share the output feed with the virtual cameras.

By using IOSurface, we remove the need for copying the frames across
multiple buffers, since they can be shared across Mach connections using
zero-copy.
2022-06-10 13:36:54 +02:00
Fabian Mastenbroek
9e29be5c79
mac-virtualcam: Build DAL plugin for ARM64e target as well
This change fixes an issue where the DAL plugin would not load due to
not supporting the architecture arm64e. We update the build
configuration to build a universal binary that includes arm64e as well.

See https://github.com/obsproject/obs-studio/issues/6285 for more
information regarding this issue.
2022-06-10 13:34:17 +02:00
PatTheMav
5e13460fae mac-virtualcam: Fix compiler warnings 2022-05-04 12:09:04 -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
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
062de2c998 Update translations from Crowdin 2021-12-17 08:01:29 +00:00
Translation Updater
261345f9ef Update translations from Crowdin 2021-12-12 02:38:59 +00:00
gxalpha
4a50e62120 mac-virtualcam: Remove unnecessary plugin version number 2021-10-24 00:22:53 -07:00
gxalpha
fab23d523b mac-virtualcam: Remove unneeded includes 2021-10-16 15:27:51 -07:00
Vainock
11a690b038 Update translations from Crowdin 2021-09-24 09:42:08 -07:00
gxalpha
0d755c3691 mac-virtualcam: Move DAL plugin to plugin data directory
Moves the DAL plugin to the data directory of the mac-virtualcam. Until
now, it was just lying in the top-level data directory
2021-08-17 08:21:32 -07:00
jp9000
33130d7d15 Revert "mac-virtualcam: Move DAL plugin to plugin data directory"
This reverts commit 4d1764036fdc05c4534468f22894baf299d24b2f.
2021-08-16 07:36:54 -07:00
gxalpha
4d1764036f mac-virtualcam: Move DAL plugin to plugin data directory
Moves the DAL plugin to the data directory of the mac-virtualcam. Until
now, it was just lying in the top-level data directory
2021-08-16 06:52:50 -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
gxalpha
5708e64d11 mac-virtualcam: Hide logging behind debug flag
Hides the DLog and DLogFunc macros behind the -DDEBUG flag, causing the
logs to only appear in testing environments.

On production build, calls to these macros will result in nothing
happening.
2021-04-13 06:02:15 -07:00
gxalpha
b4f940533c mac-virtualcam: Fix memory leaks
Fixes some memory leaks Xcode has detected
2021-04-13 05:22:27 -07:00
pedanticdan
bc3decc8d1 mac-virtualcam: DAL PlugIn check for custom png file 2021-03-01 07:40:13 -08:00
PatTheMav
516ed4458d mac-virtualcam: Handle missing DAL plugin destination directory 2021-02-26 13:29:49 -08:00
PatTheMav
200a050937 mac-virtualcam: Fix codesign error after updating OBS 2021-02-22 02:37:58 -08:00
Matt Gajownik
f233222412 mac-virtualcam: Make DAL plugin filename case consistent
This caused issues on case sensitive filesystems
2021-01-18 08:57:26 +11:00
gxalpha
ac8eaad483 mac-virtualcam: Remove unnecessary logging
Removes logging from the DAL plugin that is not really necessary but spams Console.app
2020-12-29 05:48:10 -08:00
gxalpha
20c41dba8a mac-virtualcam: Mark parameters as unused
Marks function parameters as unused, removing compiler warnings
2020-12-29 05:45:54 -08:00
SCG82
c7b89fa36b mac-virtualcam: Fix file mode 2020-12-18 00:11:00 -08:00
Gol-D-Ace
7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
John Boiles
55da44d7ee mac-virtualcam: Build a universal x86_64+arm64 binary for M1 Macs 2020-12-03 19:13:44 -08:00
gxalpha
fd34f0b2ab mac-virtualcam: Fix remaining global namespaces
Gives the MachServer a unique name which was forgotten in a previous commit
2020-12-03 14:28:01 -08:00
Gol-D-Ace
7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
PatTheMav
3fd9509c9e mac-virtualcam: Fix global namespace issues in DAL plugin 2020-11-24 14:10:59 -08:00
gxalpha
33dc4108fe mac-virtualcam: Remove old test card
Removes the animated test card that was generated from code but is no longer in use
2020-11-18 03:57:23 -08:00
gxalpha
5f07f815f5 mac-virtualcam: Update locales
The plugin only uses one of the locales defined, the other ones can be removed.
This also makes the plugin actually use the one remaining string
2020-11-14 12:22:09 -08:00
John Boiles
2700db9ff9 Add virtualcam plugin to OBS codebase
Co-authored-by: lvsti <lvsti@users.noreply.github.com>
Co-authored-by: Sebastian Beckmann <beckmann.sebastian@outlook.de>
Co-authored-by: Stefan Huber <sh@signalwerk.ch>
Co-authored-by: Ryohei Ikegami <iofg2100@gmail.com>
Co-authored-by: Colin Dean <colin.dean@target.com>
Co-authored-by: Wolfgang Ladermann <extern.ladermann_wolfgang@allianz.de>
Co-authored-by: Simon Eves <simon.eves@omnisci.com>
Co-authored-by: Colin Nelson <colnnelson@google.com>
Co-authored-by: Yoshimasa Niwa <niw@niw.at>
Co-authored-by: Michael Karliner <mike@modern-industry.com>
Co-authored-by: Jason Grout <jgrout6@bloomberg.net>
Co-authored-by: Alfredo Inostroza <jadenguy@gmail.com>
Co-authored-by: Daniel Kennett <daniel@cascable.se>
Co-authored-by: Gary Ewan Park <gep13@gep13.co.uk>
Co-authored-by: José Carlos Cieni Júnior <cienijr@outlook.com>
2020-10-30 23:36:57 -07:00