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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 double max_requested_frame_rate, | 141 double max_requested_frame_rate, |
142 const VideoCaptureDeviceFormatsCB& callback) { | 142 const VideoCaptureDeviceFormatsCB& callback) { |
143 DCHECK(thread_checker_.CalledOnValidThread()); | 143 DCHECK(thread_checker_.CalledOnValidThread()); |
144 media::VideoCaptureFormats formats; | 144 media::VideoCaptureFormats formats; |
145 // Since the remote end is free to change the resolution at any point in time | 145 // Since the remote end is free to change the resolution at any point in time |
146 // the supported formats are unknown. | 146 // the supported formats are unknown. |
147 callback.Run(formats); | 147 callback.Run(formats); |
148 } | 148 } |
149 | 149 |
150 void MediaStreamRemoteVideoSource::StartSourceImpl( | 150 void MediaStreamRemoteVideoSource::StartSourceImpl( |
151 const media::VideoCaptureParams& params, | 151 const media::VideoCaptureFormat& format, |
152 const VideoCaptureDeliverFrameCB& frame_callback) { | 152 const VideoCaptureDeliverFrameCB& frame_callback) { |
153 DCHECK(thread_checker_.CalledOnValidThread()); | 153 DCHECK(thread_checker_.CalledOnValidThread()); |
154 DCHECK(!delegate_.get()); | 154 DCHECK(!delegate_.get()); |
155 delegate_ = new RemoteVideoSourceDelegate(io_message_loop(), frame_callback); | 155 delegate_ = new RemoteVideoSourceDelegate(io_message_loop(), frame_callback); |
156 remote_track_->AddRenderer(delegate_.get()); | 156 remote_track_->AddRenderer(delegate_.get()); |
157 OnStartDone(MEDIA_DEVICE_OK); | 157 OnStartDone(MEDIA_DEVICE_OK); |
158 } | 158 } |
159 | 159 |
160 void MediaStreamRemoteVideoSource::StopSourceImpl() { | 160 void MediaStreamRemoteVideoSource::StopSourceImpl() { |
161 DCHECK(thread_checker_.CalledOnValidThread()); | 161 DCHECK(thread_checker_.CalledOnValidThread()); |
(...skipping 23 matching lines...) Expand all 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 |