Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/rtc_video_decoder.h" | 5 #include "content/renderer/media/rtc_video_decoder.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 654 // DestroyVDA() might already have been called. | 654 // DestroyVDA() might already have been called. |
| 655 if (vda_) | 655 if (vda_) |
| 656 vda_->ReusePictureBuffer(picture_buffer_id); | 656 vda_->ReusePictureBuffer(picture_buffer_id); |
| 657 } | 657 } |
| 658 | 658 |
| 659 bool RTCVideoDecoder::IsProfileSupported(media::VideoCodecProfile profile) { | 659 bool RTCVideoDecoder::IsProfileSupported(media::VideoCodecProfile profile) { |
| 660 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 660 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
| 661 media::VideoDecodeAccelerator::SupportedProfiles supported_profiles = | 661 media::VideoDecodeAccelerator::SupportedProfiles supported_profiles = |
| 662 factories_->GetVideoDecodeAcceleratorSupportedProfiles(); | 662 factories_->GetVideoDecodeAcceleratorSupportedProfiles(); |
| 663 | 663 |
| 664 // The AndroidVDA support for VP9 and H264 is experimental, so disable it for | |
|
Pawel Osciak
2015/08/08 21:00:58
Would it be possible to just have VP8 only in supp
| |
| 665 // now. See http://crbug.com/507834 for updates. | |
| 666 #if defined(OS_ANDROID) | |
| 667 if (profile != media::VP8PROFILE_ANY) | |
| 668 return false; | |
| 669 #endif | |
| 670 | |
| 664 for (const auto& supported_profile : supported_profiles) { | 671 for (const auto& supported_profile : supported_profiles) { |
| 665 if (profile == supported_profile.profile) { | 672 if (profile == supported_profile.profile) { |
| 666 min_resolution_ = supported_profile.min_resolution; | 673 min_resolution_ = supported_profile.min_resolution; |
| 667 max_resolution_ = supported_profile.max_resolution; | 674 max_resolution_ = supported_profile.max_resolution; |
| 668 return true; | 675 return true; |
| 669 } | 676 } |
| 670 } | 677 } |
| 671 | 678 |
| 672 return false; | 679 return false; |
| 673 } | 680 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 820 for (std::deque<std::pair<webrtc::EncodedImage, BufferData>>::iterator it = | 827 for (std::deque<std::pair<webrtc::EncodedImage, BufferData>>::iterator it = |
| 821 pending_buffers_.begin(); | 828 pending_buffers_.begin(); |
| 822 it != pending_buffers_.end(); ++it) { | 829 it != pending_buffers_.end(); ++it) { |
| 823 delete[] it->first._buffer; | 830 delete[] it->first._buffer; |
| 824 } | 831 } |
| 825 | 832 |
| 826 pending_buffers_.clear(); | 833 pending_buffers_.clear(); |
| 827 } | 834 } |
| 828 | 835 |
| 829 } // namespace content | 836 } // namespace content |
| OLD | NEW |