Index: webrtc/media/devices/videorendererfactory.h |
diff --git a/webrtc/media/devices/videorendererfactory.h b/webrtc/media/devices/videorendererfactory.h |
index bdc56861e84f1dfe377821b1dee921afb5388dbf..0bacdbd09aa53cede86857123ddde10de36de2a8 100644 |
--- a/webrtc/media/devices/videorendererfactory.h |
+++ b/webrtc/media/devices/videorendererfactory.h |
@@ -17,6 +17,8 @@ |
#include "webrtc/media/base/videosinkinterface.h" |
#if defined(WEBRTC_LINUX) && defined(HAVE_GTK) |
#include "webrtc/media/devices/gtkvideorenderer.h" |
+#elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && !defined(CARBON_DEPRECATED) |
+#include "webrtc/media/devices/carbonvideorenderer.h" |
#elif defined(WIN32) |
#include "webrtc/media/devices/gdivideorenderer.h" |
#endif |
@@ -30,6 +32,16 @@ |
int y) { |
#if defined(WEBRTC_LINUX) && defined(HAVE_GTK) |
return new GtkVideoRenderer(x, y); |
+ #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && \ |
+ !defined(CARBON_DEPRECATED) |
+ CarbonVideoRenderer* renderer = new CarbonVideoRenderer(x, y); |
+ // Needs to be initialized on the main thread. |
+ if (renderer->Initialize()) { |
+ return renderer; |
+ } else { |
+ delete renderer; |
+ return NULL; |
+ } |
#elif defined(WIN32) |
return new GdiVideoRenderer(x, y); |
#else |