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

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

Issue 2609863004: Pass camera facing to WebKit (Closed)
Patch Set: fix trybot errors Created 3 years, 11 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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 } 426 }
427 427
428 const media::VideoCaptureFormat* 428 const media::VideoCaptureFormat*
429 MediaStreamVideoSource::GetCurrentFormat() const { 429 MediaStreamVideoSource::GetCurrentFormat() const {
430 DCHECK(CalledOnValidThread()); 430 DCHECK(CalledOnValidThread());
431 if (state_ == STARTING || state_ == STARTED) 431 if (state_ == STARTING || state_ == STARTED)
432 return &current_format_; 432 return &current_format_;
433 return nullptr; 433 return nullptr;
434 } 434 }
435 435
436 media::mojom::VideoFacingMode MediaStreamVideoSource::GetVideoFacing() {
437 return media::mojom::VideoFacingMode::NONE;
438 }
439
436 void MediaStreamVideoSource::DoStopSource() { 440 void MediaStreamVideoSource::DoStopSource() {
437 DCHECK(CalledOnValidThread()); 441 DCHECK(CalledOnValidThread());
438 DVLOG(3) << "DoStopSource()"; 442 DVLOG(3) << "DoStopSource()";
439 if (state_ == ENDED) 443 if (state_ == ENDED)
440 return; 444 return;
441 track_adapter_->StopFrameMonitoring(); 445 track_adapter_->StopFrameMonitoring();
442 StopSourceImpl(); 446 StopSourceImpl();
443 state_ = ENDED; 447 state_ = ENDED;
444 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded); 448 SetReadyState(blink::WebMediaStreamSource::ReadyStateEnded);
445 } 449 }
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 callback(callback) { 619 callback(callback) {
616 } 620 }
617 621
618 MediaStreamVideoSource::TrackDescriptor::TrackDescriptor( 622 MediaStreamVideoSource::TrackDescriptor::TrackDescriptor(
619 const TrackDescriptor& other) = default; 623 const TrackDescriptor& other) = default;
620 624
621 MediaStreamVideoSource::TrackDescriptor::~TrackDescriptor() { 625 MediaStreamVideoSource::TrackDescriptor::~TrackDescriptor() {
622 } 626 }
623 627
624 } // namespace content 628 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698