|
@@ -4,8 +4,11 @@
|
|
#include <libavutil/log.h>
|
|
#include <libavutil/log.h>
|
|
#include <libavcodec/avcodec.h>
|
|
#include <libavcodec/avcodec.h>
|
|
#include <pthread.h>
|
|
#include <pthread.h>
|
|
|
|
+
|
|
|
|
+#ifndef __APPLE__
|
|
#include "dynlink_cuda.h"
|
|
#include "dynlink_cuda.h"
|
|
#include "nvEncodeAPI.h"
|
|
#include "nvEncodeAPI.h"
|
|
|
|
+#endif
|
|
|
|
|
|
#define NVENC_CAP 0x30
|
|
#define NVENC_CAP 0x30
|
|
|
|
|
|
@@ -120,6 +123,8 @@ cleanup:
|
|
destroy_log_context(log_context);
|
|
destroy_log_context(log_context);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifndef __APPLE__
|
|
|
|
+
|
|
static const char *nvenc_check_name = "nvenc_check";
|
|
static const char *nvenc_check_name = "nvenc_check";
|
|
|
|
|
|
static inline bool push_context_(tcuCtxPushCurrent_v2 *cuCtxPushCurrent,
|
|
static inline bool push_context_(tcuCtxPushCurrent_v2 *cuCtxPushCurrent,
|
|
@@ -299,6 +304,8 @@ cleanup:
|
|
return success;
|
|
return success;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#endif
|
|
|
|
+
|
|
bool obs_module_load(void)
|
|
bool obs_module_load(void)
|
|
{
|
|
{
|
|
da_init(active_log_contexts);
|
|
da_init(active_log_contexts);
|
|
@@ -312,10 +319,12 @@ bool obs_module_load(void)
|
|
obs_register_output(&replay_buffer);
|
|
obs_register_output(&replay_buffer);
|
|
obs_register_encoder(&aac_encoder_info);
|
|
obs_register_encoder(&aac_encoder_info);
|
|
obs_register_encoder(&opus_encoder_info);
|
|
obs_register_encoder(&opus_encoder_info);
|
|
|
|
+#ifndef __APPLE__
|
|
if (nvenc_supported()) {
|
|
if (nvenc_supported()) {
|
|
blog(LOG_INFO, "NVENC supported");
|
|
blog(LOG_INFO, "NVENC supported");
|
|
obs_register_encoder(&nvenc_encoder_info);
|
|
obs_register_encoder(&nvenc_encoder_info);
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|