| 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/pepper/pepper_media_stream_video_track_host.h" | 5 #include "content/renderer/pepper/pepper_media_stream_video_track_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 void StopSourceImpl() final { | 440 void StopSourceImpl() final { |
| 441 if (host_) | 441 if (host_) |
| 442 host_->frame_deliverer_ = nullptr; | 442 host_->frame_deliverer_ = nullptr; |
| 443 } | 443 } |
| 444 | 444 |
| 445 private: | 445 private: |
| 446 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() | 446 base::Optional<media::VideoCaptureFormat> GetCurrentFormatImpl() |
| 447 const override { | 447 const override { |
| 448 DCHECK(!IsOldVideoConstraints()); | 448 DCHECK(!IsOldVideoConstraints()); |
| 449 if (host_) { | 449 if (host_) { |
| 450 return media::VideoCaptureFormat( | 450 return base::Optional<media::VideoCaptureFormat>( |
| 451 host_->plugin_frame_size_, kDefaultOutputFrameRate, | 451 media::VideoCaptureFormat( |
| 452 ToPixelFormat(host_->plugin_frame_format_)); | 452 host_->plugin_frame_size_, kDefaultOutputFrameRate, |
| 453 ToPixelFormat(host_->plugin_frame_format_))); |
| 453 } | 454 } |
| 454 return base::Optional<media::VideoCaptureFormat>(); | 455 return base::Optional<media::VideoCaptureFormat>(); |
| 455 } | 456 } |
| 456 | 457 |
| 457 const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_; | 458 const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_; |
| 458 | 459 |
| 459 DISALLOW_COPY_AND_ASSIGN(VideoSource); | 460 DISALLOW_COPY_AND_ASSIGN(VideoSource); |
| 460 }; | 461 }; |
| 461 | 462 |
| 462 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() { | 463 void PepperMediaStreamVideoTrackHost::DidConnectPendingHostToResource() { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 } | 544 } |
| 544 | 545 |
| 545 void PepperMediaStreamVideoTrackHost::OnTrackStarted( | 546 void PepperMediaStreamVideoTrackHost::OnTrackStarted( |
| 546 MediaStreamSource* source, | 547 MediaStreamSource* source, |
| 547 MediaStreamRequestResult result, | 548 MediaStreamRequestResult result, |
| 548 const blink::WebString& result_name) { | 549 const blink::WebString& result_name) { |
| 549 DVLOG(3) << "OnTrackStarted result: " << result; | 550 DVLOG(3) << "OnTrackStarted result: " << result; |
| 550 } | 551 } |
| 551 | 552 |
| 552 } // namespace content | 553 } // namespace content |
| OLD | NEW |