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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ¤t_format_; | 432 return ¤t_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 Loading... |
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 |
OLD | NEW |