diff --git a/test/test-input/test-desktop.h b/test/test-input/test-desktop.h index 41c59202f..1fa9861f1 100644 --- a/test/test-input/test-desktop.h +++ b/test/test-input/test-desktop.h @@ -17,17 +17,19 @@ struct desktop_tex { uint32_t width, height; }; -EXPORT const char *desktop_getname(const char *locale); +EXPORT const char *osx_desktop_test_getname(const char *locale); -EXPORT struct desktop_tex *desktop_create(const char *settings, obs_source_t source); -EXPORT void desktop_destroy(struct desktop_tex *rt); -EXPORT uint32_t desktop_get_output_flags(struct desktop_tex *rt); -EXPORT void desktop_video_tick(struct desktop_tex *rt, float dt); +EXPORT struct desktop_tex *osx_desktop_test_create(const char *settings, + obs_source_t source); +EXPORT void osx_desktop_test_destroy(struct desktop_tex *rt); +EXPORT uint32_t osx_desktop_test_get_output_flags(struct desktop_tex *rt); +EXPORT void osx_desktop_test_video_tick(struct desktop_tex *rt, float dt); -EXPORT void desktop_video_render(struct desktop_tex *rt, obs_source_t filter_target); +EXPORT void osx_desktop_test_video_render(struct desktop_tex *rt, + obs_source_t filter_target); -EXPORT uint32_t desktop_getwidth(struct desktop_tex *rt); -EXPORT uint32_t desktop_getheight(struct desktop_tex *rt); +EXPORT uint32_t osx_desktop_test_getwidth(struct desktop_tex *rt); +EXPORT uint32_t osx_desktop_test_getheight(struct desktop_tex *rt); #ifdef __cplusplus } diff --git a/test/test-input/test-desktop.m b/test/test-input/test-desktop.m index c570292cc..4f768277a 100644 --- a/test/test-input/test-desktop.m +++ b/test/test-input/test-desktop.m @@ -10,7 +10,7 @@ #include -const char *desktop_getname(const char *locale) +const char *osx_desktop_test_getname(const char *locale) { return "OSX Monitor Capture"; } @@ -20,7 +20,7 @@ static IOSurfaceRef current = NULL, static texture_t tex = NULL; static pthread_mutex_t c_mutex; -struct desktop_tex *desktop_create(const char *settings, obs_source_t source) +struct desktop_tex *osx_desktop_test_create(const char *settings, obs_source_t source) { struct desktop_tex *rt = bmalloc(sizeof(struct desktop_tex)); char *effect_file; @@ -43,12 +43,12 @@ struct desktop_tex *desktop_create(const char *settings, obs_source_t source) bfree(effect_file); if (!rt->whatever) { - desktop_destroy(rt); + osx_desktop_test_destroy(rt); return NULL; } if ([[NSScreen screens] count] < 1) { - desktop_destroy(rt); + osx_desktop_test_destroy(rt); return NULL; } @@ -98,14 +98,14 @@ struct desktop_tex *desktop_create(const char *settings, obs_source_t source) gs_leavecontext(); if (CGDisplayStreamStart(rt->disp)) { - desktop_destroy(rt); + osx_desktop_test_destroy(rt); return NULL; } return rt; } -void desktop_destroy(struct desktop_tex *rt) +void osx_desktop_test_destroy(struct desktop_tex *rt) { if (rt) { pthread_mutex_lock(&c_mutex); @@ -128,12 +128,13 @@ void desktop_destroy(struct desktop_tex *rt) } } -uint32_t desktop_get_output_flags(struct desktop_tex *rt) +uint32_t osx_desktop_test_get_output_flags(struct desktop_tex *rt) { return SOURCE_VIDEO; } -void desktop_video_render(struct desktop_tex *rt, obs_source_t filter_target) +void osx_desktop_test_video_render(struct desktop_tex *rt, + obs_source_t filter_target) { pthread_mutex_lock(&c_mutex); @@ -163,12 +164,12 @@ fail: pthread_mutex_unlock(&c_mutex); } -uint32_t desktop_getwidth(struct desktop_tex *rt) +uint32_t osx_desktop_test_getwidth(struct desktop_tex *rt) { return rt->width; } -uint32_t desktop_getheight(struct desktop_tex *rt) +uint32_t osx_desktop_test_getheight(struct desktop_tex *rt) { return rt->height; } diff --git a/test/test-input/test-input.c b/test/test-input/test-input.c index 3b4e5d337..30920c2ac 100644 --- a/test/test-input/test-input.c +++ b/test/test-input/test-input.c @@ -3,7 +3,7 @@ const char *inputs[] = { #ifdef __APPLE__ - "osx-desktop-test", + "osx_desktop_test", #endif "random", "sinewave"