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

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

Issue 528783002: Change MediaStreamVideoSource::StartSourceImpl to use VideoCaptureFormat instead of VideoCapturePar… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 6 years, 3 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_source.h" 5 #include "content/renderer/media/media_stream_video_source.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); 475 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
476 // This object can be deleted after calling FinalizeAddTrack. See comment 476 // This object can be deleted after calling FinalizeAddTrack. See comment
477 // in the header file. 477 // in the header file.
478 FinalizeAddTrack(); 478 FinalizeAddTrack();
479 return; 479 return;
480 } 480 }
481 481
482 state_ = STARTING; 482 state_ = STARTING;
483 DVLOG(3) << "Starting the capturer with " << current_format_.ToString(); 483 DVLOG(3) << "Starting the capturer with " << current_format_.ToString();
484 484
485 media::VideoCaptureParams params;
486 params.requested_format = current_format_;
487 StartSourceImpl( 485 StartSourceImpl(
488 params, 486 current_format_,
489 base::Bind(&VideoTrackAdapter::DeliverFrameOnIO, track_adapter_)); 487 base::Bind(&VideoTrackAdapter::DeliverFrameOnIO, track_adapter_));
490 } 488 }
491 489
492 bool MediaStreamVideoSource::FindBestFormatWithConstraints( 490 bool MediaStreamVideoSource::FindBestFormatWithConstraints(
493 const media::VideoCaptureFormats& formats, 491 const media::VideoCaptureFormats& formats,
494 media::VideoCaptureFormat* best_format) { 492 media::VideoCaptureFormat* best_format) {
495 DCHECK(CalledOnValidThread()); 493 DCHECK(CalledOnValidThread());
496 // Find the first constraints that we can fulfill. 494 // Find the first constraints that we can fulfill.
497 for (std::vector<RequestedConstraints>::iterator request_it = 495 for (std::vector<RequestedConstraints>::iterator request_it =
498 requested_constraints_.begin(); 496 requested_constraints_.begin();
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 : track(track), 618 : track(track),
621 frame_callback(frame_callback), 619 frame_callback(frame_callback),
622 constraints(constraints), 620 constraints(constraints),
623 callback(callback) { 621 callback(callback) {
624 } 622 }
625 623
626 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() { 624 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() {
627 } 625 }
628 626
629 } // namespace content 627 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source.h ('k') | content/renderer/media/media_stream_video_source_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698