Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(432)

Side by Side Diff: webrtc/media/devices/videorendererfactory.h

Issue 1819103003: Delete cricket::VideoRenderer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/media/devices/gtkvideorenderer.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 // 11 //
12 // A factory to create a GUI video renderer. 12 // A factory to create a GUI video renderer.
13 13
14 #ifndef WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_ 14 #ifndef WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_
15 #define WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_ 15 #define WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_
16 16
17 #include "webrtc/media/base/videorenderer.h" 17 #include "webrtc/media/base/videosinkinterface.h"
18 #if defined(WEBRTC_LINUX) && defined(HAVE_GTK) 18 #if defined(WEBRTC_LINUX) && defined(HAVE_GTK)
19 #include "webrtc/media/devices/gtkvideorenderer.h" 19 #include "webrtc/media/devices/gtkvideorenderer.h"
20 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && !defined(CARBON_DEPRECATED) 20 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && !defined(CARBON_DEPRECATED)
21 #include "webrtc/media/devices/carbonvideorenderer.h" 21 #include "webrtc/media/devices/carbonvideorenderer.h"
22 #elif defined(WIN32) 22 #elif defined(WIN32)
23 #include "webrtc/media/devices/gdivideorenderer.h" 23 #include "webrtc/media/devices/gdivideorenderer.h"
24 #endif 24 #endif
25 25
26 namespace cricket { 26 namespace cricket {
27 27
28 class VideoRendererFactory { 28 class VideoRendererFactory {
29 public: 29 public:
30 static VideoRenderer* CreateGuiVideoRenderer(int x, int y) { 30 static rtc::VideoSinkInterface<cricket::VideoFrame>* CreateGuiVideoRenderer(
31 int x,
32 int y) {
31 #if defined(WEBRTC_LINUX) && defined(HAVE_GTK) 33 #if defined(WEBRTC_LINUX) && defined(HAVE_GTK)
32 return new GtkVideoRenderer(x, y); 34 return new GtkVideoRenderer(x, y);
33 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && \ 35 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) && \
34 !defined(CARBON_DEPRECATED) 36 !defined(CARBON_DEPRECATED)
35 CarbonVideoRenderer* renderer = new CarbonVideoRenderer(x, y); 37 CarbonVideoRenderer* renderer = new CarbonVideoRenderer(x, y);
36 // Needs to be initialized on the main thread. 38 // Needs to be initialized on the main thread.
37 if (renderer->Initialize()) { 39 if (renderer->Initialize()) {
38 return renderer; 40 return renderer;
39 } else { 41 } else {
40 delete renderer; 42 delete renderer;
41 return NULL; 43 return NULL;
42 } 44 }
43 #elif defined(WIN32) 45 #elif defined(WIN32)
44 return new GdiVideoRenderer(x, y); 46 return new GdiVideoRenderer(x, y);
45 #else 47 #else
46 return NULL; 48 return NULL;
47 #endif 49 #endif
48 } 50 }
49 }; 51 };
50 52
51 } // namespace cricket 53 } // namespace cricket
52 54
53 #endif // WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_ 55 #endif // WEBRTC_MEDIA_DEVICES_VIDEORENDERERFACTORY_H_
OLDNEW
« no previous file with comments | « webrtc/media/devices/gtkvideorenderer.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698