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

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

Issue 2045273005: Have VDA clients inform decoder of supported picture buffer formats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698