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

Side by Side Diff: webrtc/examples/peerconnection/client/main_wnd.h

Issue 1817473002: Delete VideoRendererInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix JavaVideoRendererWrapper. 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
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2012 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
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 virtual void StartLocalRenderer(webrtc::VideoTrackInterface* local_video); 96 virtual void StartLocalRenderer(webrtc::VideoTrackInterface* local_video);
97 virtual void StopLocalRenderer(); 97 virtual void StopLocalRenderer();
98 virtual void StartRemoteRenderer(webrtc::VideoTrackInterface* remote_video); 98 virtual void StartRemoteRenderer(webrtc::VideoTrackInterface* remote_video);
99 virtual void StopRemoteRenderer(); 99 virtual void StopRemoteRenderer();
100 100
101 virtual void QueueUIThreadCallback(int msg_id, void* data); 101 virtual void QueueUIThreadCallback(int msg_id, void* data);
102 102
103 HWND handle() const { return wnd_; } 103 HWND handle() const { return wnd_; }
104 104
105 class VideoRenderer : public webrtc::VideoRendererInterface { 105 class VideoRenderer : public rtc::VideoSinkInterface<cricket::VideoFrame> {
106 public: 106 public:
107 VideoRenderer(HWND wnd, int width, int height, 107 VideoRenderer(HWND wnd, int width, int height,
108 webrtc::VideoTrackInterface* track_to_render); 108 webrtc::VideoTrackInterface* track_to_render);
109 virtual ~VideoRenderer(); 109 virtual ~VideoRenderer();
110 110
111 void Lock() { 111 void Lock() {
112 ::EnterCriticalSection(&buffer_lock_); 112 ::EnterCriticalSection(&buffer_lock_);
113 } 113 }
114 114
115 void Unlock() { 115 void Unlock() {
116 ::LeaveCriticalSection(&buffer_lock_); 116 ::LeaveCriticalSection(&buffer_lock_);
117 } 117 }
118 118
119 // VideoRendererInterface implementation 119 // VideoSinkInterface implementation
120 virtual void SetSize(int width, int height); 120 void OnFrame(const cricket::VideoFrame& frame) override;
121 virtual void RenderFrame(const cricket::VideoFrame* frame);
122 121
122 void SetSize(int width, int height);
123 const BITMAPINFO& bmi() const { return bmi_; } 123 const BITMAPINFO& bmi() const { return bmi_; }
124 const uint8_t* image() const { return image_.get(); } 124 const uint8_t* image() const { return image_.get(); }
125 125
126 protected: 126 protected:
127 enum { 127 enum {
128 SET_SIZE, 128 SET_SIZE,
129 RENDER_FRAME, 129 RENDER_FRAME,
130 }; 130 };
131 131
132 HWND wnd_; 132 HWND wnd_;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 MainWndCallback* callback_; 192 MainWndCallback* callback_;
193 static ATOM wnd_class_; 193 static ATOM wnd_class_;
194 std::string server_; 194 std::string server_;
195 std::string port_; 195 std::string port_;
196 bool auto_connect_; 196 bool auto_connect_;
197 bool auto_call_; 197 bool auto_call_;
198 }; 198 };
199 #endif // WIN32 199 #endif // WIN32
200 200
201 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_MAIN_WND_H_ 201 #endif // WEBRTC_EXAMPLES_PEERCONNECTION_CLIENT_MAIN_WND_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698