2014-02-26 22:43:31 -08:00
|
|
|
#include <obs-module.h>
|
|
|
|
|
|
|
|
OBS_DECLARE_MODULE()
|
2014-07-09 22:12:57 -07:00
|
|
|
OBS_MODULE_USE_DEFAULT_LOCALE("mac-capture", "en-US")
|
2018-09-11 01:51:38 -07:00
|
|
|
MODULE_EXPORT const char *obs_module_description(void)
|
|
|
|
{
|
|
|
|
return "macOS audio input/output and window/display capture";
|
|
|
|
}
|
2014-02-26 22:43:31 -08:00
|
|
|
|
2014-03-03 02:56:54 -07:00
|
|
|
extern struct obs_source_info coreaudio_input_capture_info;
|
|
|
|
extern struct obs_source_info coreaudio_output_capture_info;
|
2014-07-10 21:43:21 -07:00
|
|
|
extern struct obs_source_info display_capture_info;
|
2014-08-20 00:39:41 +02:00
|
|
|
extern struct obs_source_info window_capture_info;
|
2014-02-26 22:43:31 -08:00
|
|
|
|
2022-06-04 20:35:15 -07:00
|
|
|
extern bool is_screen_capture_available() WEAK_IMPORT_ATTRIBUTE;
|
|
|
|
|
2014-07-27 12:42:43 -07:00
|
|
|
bool obs_module_load(void)
|
2014-02-26 22:43:31 -08:00
|
|
|
{
|
2014-03-03 02:56:54 -07:00
|
|
|
obs_register_source(&coreaudio_input_capture_info);
|
|
|
|
obs_register_source(&coreaudio_output_capture_info);
|
2022-07-24 19:43:20 +02:00
|
|
|
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 120300 // __MAC_12_3
|
2022-06-04 20:35:15 -07:00
|
|
|
if (is_screen_capture_available()) {
|
|
|
|
extern struct obs_source_info screen_capture_info;
|
|
|
|
obs_register_source(&screen_capture_info);
|
2022-07-15 02:55:03 +02:00
|
|
|
display_capture_info.output_flags |= OBS_SOURCE_DEPRECATED;
|
|
|
|
window_capture_info.output_flags |= OBS_SOURCE_DEPRECATED;
|
2022-06-04 20:35:15 -07:00
|
|
|
}
|
|
|
|
#endif
|
2022-07-15 02:55:03 +02:00
|
|
|
obs_register_source(&display_capture_info);
|
|
|
|
obs_register_source(&window_capture_info);
|
2014-02-26 22:43:31 -08:00
|
|
|
return true;
|
|
|
|
}
|