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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, | 735 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, |
736 base::WaitableEvent* waiter) { | 736 base::WaitableEvent* waiter) { |
737 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); | 737 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); |
738 | 738 |
739 if (!IsProfileSupported(profile)) { | 739 if (!IsProfileSupported(profile)) { |
740 DVLOG(1) << "Unsupported profile " << profile; | 740 DVLOG(1) << "Unsupported profile " << profile; |
741 } else { | 741 } else { |
742 vda_ = factories_->CreateVideoDecodeAccelerator(); | 742 vda_ = factories_->CreateVideoDecodeAccelerator(); |
743 | 743 |
744 media::VideoDecodeAccelerator::Config config(profile); | 744 media::VideoDecodeAccelerator::Config config(profile); |
| 745 config.supported_output_formats.assign({media::PIXEL_FORMAT_XRGB, |
| 746 media::PIXEL_FORMAT_ARGB, |
| 747 media::PIXEL_FORMAT_NV12}); |
745 if (vda_ && !vda_->Initialize(config, this)) | 748 if (vda_ && !vda_->Initialize(config, this)) |
746 vda_.release()->Destroy(); | 749 vda_.release()->Destroy(); |
747 vda_codec_profile_ = profile; | 750 vda_codec_profile_ = profile; |
748 } | 751 } |
749 | 752 |
750 if (waiter) | 753 if (waiter) |
751 waiter->Signal(); | 754 waiter->Signal(); |
752 } | 755 } |
753 | 756 |
754 void RTCVideoDecoder::DestroyTextures() { | 757 void RTCVideoDecoder::DestroyTextures() { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
891 | 894 |
892 void RTCVideoDecoder::TryResetVDAErrorCounter_Locked() { | 895 void RTCVideoDecoder::TryResetVDAErrorCounter_Locked() { |
893 lock_.AssertAcquired(); | 896 lock_.AssertAcquired(); |
894 | 897 |
895 if (vda_error_counter_ == 0) | 898 if (vda_error_counter_ == 0) |
896 return; | 899 return; |
897 vda_error_counter_ = 0; | 900 vda_error_counter_ = 0; |
898 } | 901 } |
899 | 902 |
900 } // namespace content | 903 } // namespace content |
OLD | NEW |