OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" | 5 #include "content/renderer/media/webrtc/media_stream_remote_video_source.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 const scoped_refptr<base::MessageLoopProxy>& io_message_loop, | 27 const scoped_refptr<base::MessageLoopProxy>& io_message_loop, |
28 const VideoCaptureDeliverFrameCB& new_frame_callback); | 28 const VideoCaptureDeliverFrameCB& new_frame_callback); |
29 | 29 |
30 protected: | 30 protected: |
31 friend class base::RefCountedThreadSafe<RemoteVideoSourceDelegate>; | 31 friend class base::RefCountedThreadSafe<RemoteVideoSourceDelegate>; |
32 virtual ~RemoteVideoSourceDelegate(); | 32 virtual ~RemoteVideoSourceDelegate(); |
33 | 33 |
34 // Implements webrtc::VideoRendererInterface used for receiving video frames | 34 // Implements webrtc::VideoRendererInterface used for receiving video frames |
35 // from the PeerConnection video track. May be called on a libjingle internal | 35 // from the PeerConnection video track. May be called on a libjingle internal |
36 // thread. | 36 // thread. |
37 virtual void SetSize(int width, int height) OVERRIDE; | 37 virtual void SetSize(int width, int height) override; |
38 virtual void RenderFrame(const cricket::VideoFrame* frame) OVERRIDE; | 38 virtual void RenderFrame(const cricket::VideoFrame* frame) override; |
39 | 39 |
40 void DoRenderFrameOnIOThread(scoped_refptr<media::VideoFrame> video_frame, | 40 void DoRenderFrameOnIOThread(scoped_refptr<media::VideoFrame> video_frame, |
41 const media::VideoCaptureFormat& format); | 41 const media::VideoCaptureFormat& format); |
42 private: | 42 private: |
43 // Bound to the render thread. | 43 // Bound to the render thread. |
44 base::ThreadChecker thread_checker_; | 44 base::ThreadChecker thread_checker_; |
45 | 45 |
46 scoped_refptr<base::MessageLoopProxy> io_message_loop_; | 46 scoped_refptr<base::MessageLoopProxy> io_message_loop_; |
47 // |frame_pool_| is only accessed on whatever | 47 // |frame_pool_| is only accessed on whatever |
48 // thread webrtc::VideoRendererInterface::RenderFrame is called on. | 48 // thread webrtc::VideoRendererInterface::RenderFrame is called on. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); | 185 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); |
186 break; | 186 break; |
187 default: | 187 default: |
188 NOTREACHED(); | 188 NOTREACHED(); |
189 break; | 189 break; |
190 } | 190 } |
191 } | 191 } |
192 } | 192 } |
193 | 193 |
194 } // namespace content | 194 } // namespace content |
OLD | NEW |