| 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/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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 463     // This object can be deleted after calling FinalizeAddTrack. See comment | 463     // This object can be deleted after calling FinalizeAddTrack. See comment | 
| 464     // in the header file. | 464     // in the header file. | 
| 465     FinalizeAddTrack(); | 465     FinalizeAddTrack(); | 
| 466     return; | 466     return; | 
| 467   } | 467   } | 
| 468 | 468 | 
| 469   state_ = STARTING; | 469   state_ = STARTING; | 
| 470   DVLOG(3) << "Starting the capturer with" | 470   DVLOG(3) << "Starting the capturer with" | 
| 471            << " width = " << current_format_.frame_size.width() | 471            << " width = " << current_format_.frame_size.width() | 
| 472            << " height = " << current_format_.frame_size.height() | 472            << " height = " << current_format_.frame_size.height() | 
| 473            << " frame rate = " << current_format_.frame_rate; | 473            << " frame rate = " << current_format_.frame_rate | 
|  | 474            << " pixel format = " | 
|  | 475            << media::VideoCaptureFormat::PixelFormatToString( | 
|  | 476                current_format_.pixel_format); | 
| 474 | 477 | 
| 475   media::VideoCaptureParams params; | 478   media::VideoCaptureParams params; | 
| 476   params.requested_format = current_format_; | 479   params.requested_format = current_format_; | 
| 477   StartSourceImpl( | 480   StartSourceImpl( | 
| 478       params, | 481       params, | 
| 479       base::Bind(&VideoTrackAdapter::DeliverFrameOnIO, track_adapter_)); | 482       base::Bind(&VideoTrackAdapter::DeliverFrameOnIO, track_adapter_)); | 
| 480 } | 483 } | 
| 481 | 484 | 
| 482 bool MediaStreamVideoSource::FindBestFormatWithConstraints( | 485 bool MediaStreamVideoSource::FindBestFormatWithConstraints( | 
| 483     const media::VideoCaptureFormats& formats, | 486     const media::VideoCaptureFormats& formats, | 
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 607     : track(track), | 610     : track(track), | 
| 608       frame_callback(frame_callback), | 611       frame_callback(frame_callback), | 
| 609       constraints(constraints), | 612       constraints(constraints), | 
| 610       callback(callback) { | 613       callback(callback) { | 
| 611 } | 614 } | 
| 612 | 615 | 
| 613 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() { | 616 MediaStreamVideoSource::RequestedConstraints::~RequestedConstraints() { | 
| 614 } | 617 } | 
| 615 | 618 | 
| 616 }  // namespace content | 619 }  // namespace content | 
| OLD | NEW | 
|---|