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

Side by Side Diff: content/renderer/media/media_stream_video_capturer_source.cc

Issue 2970823003: Rename MediaStreamVideoSource:GetCurrentFormatImpl() to GetCurrentFormat() (Closed)
Patch Set: add DCHECK Created 3 years, 5 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 // 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/media_stream_video_capturer_source.h" 5 #include "content/renderer/media/media_stream_video_capturer_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 capture_params_, frame_callback, 204 capture_params_, frame_callback,
205 base::Bind(&MediaStreamVideoCapturerSource::OnRunStateChanged, 205 base::Bind(&MediaStreamVideoCapturerSource::OnRunStateChanged,
206 base::Unretained(this))); 206 base::Unretained(this)));
207 } 207 }
208 208
209 void MediaStreamVideoCapturerSource::StopSourceImpl() { 209 void MediaStreamVideoCapturerSource::StopSourceImpl() {
210 source_->StopCapture(); 210 source_->StopCapture();
211 } 211 }
212 212
213 base::Optional<media::VideoCaptureFormat> 213 base::Optional<media::VideoCaptureFormat>
214 MediaStreamVideoCapturerSource::GetCurrentFormatImpl() const { 214 MediaStreamVideoCapturerSource::GetCurrentFormat() const {
215 return base::Optional<media::VideoCaptureFormat>( 215 return base::Optional<media::VideoCaptureFormat>(
216 capture_params_.requested_format); 216 capture_params_.requested_format);
217 } 217 }
218 218
219 void MediaStreamVideoCapturerSource::OnRunStateChanged(bool is_running) { 219 void MediaStreamVideoCapturerSource::OnRunStateChanged(bool is_running) {
220 if (is_capture_starting_) { 220 if (is_capture_starting_) {
221 OnStartDone(is_running ? MEDIA_DEVICE_OK 221 OnStartDone(is_running ? MEDIA_DEVICE_OK
222 : MEDIA_DEVICE_TRACK_START_FAILURE); 222 : MEDIA_DEVICE_TRACK_START_FAILURE);
223 is_capture_starting_ = false; 223 is_capture_starting_ = false;
224 } else if (!is_running) { 224 } else if (!is_running) {
225 StopSource(); 225 StopSource();
226 } 226 }
227 } 227 }
228 228
229 } // namespace content 229 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_capturer_source.h ('k') | content/renderer/media/media_stream_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698