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

31 lines
960 B
C

#include <obs-module.h>
OBS_DECLARE_MODULE()
OBS_MODULE_USE_DEFAULT_LOCALE("mac-capture", "en-US")
MODULE_EXPORT const char *obs_module_description(void)
{
return "macOS audio input/output and window/display capture";
}
extern struct obs_source_info coreaudio_input_capture_info;
extern struct obs_source_info coreaudio_output_capture_info;
extern struct obs_source_info display_capture_info;
extern struct obs_source_info window_capture_info;
extern bool is_screen_capture_available() WEAK_IMPORT_ATTRIBUTE;
bool obs_module_load(void)
{
obs_register_source(&coreaudio_input_capture_info);
obs_register_source(&coreaudio_output_capture_info);
obs_register_source(&display_capture_info);
obs_register_source(&window_capture_info);
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120300 // __MAC_12_3
if (is_screen_capture_available()) {
extern struct obs_source_info screen_capture_info;
obs_register_source(&screen_capture_info);
}
#endif
return true;
}