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

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

Issue 2668293002: VPX HW encode using MediaFoundation
Patch Set: adding all Created 3 years, 10 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
« no previous file with comments | « no previous file | content/renderer/media/gpu/rtc_video_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/gpu/rtc_video_decoder.h" 5 #include "content/renderer/media/gpu/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 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 } 738 }
739 739
740 return false; 740 return false;
741 } 741 }
742 742
743 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, 743 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile,
744 base::WaitableEvent* waiter) { 744 base::WaitableEvent* waiter) {
745 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 745 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
746 746
747 if (!IsProfileSupported(profile)) { 747 if (!IsProfileSupported(profile)) {
748 DVLOG(1) << "Unsupported profile " << GetProfileName(profile); 748 LOG(ERROR) << "Unsupported profile " << GetProfileName(profile);
749 } else { 749 } else {
750 vda_ = factories_->CreateVideoDecodeAccelerator(); 750 vda_ = factories_->CreateVideoDecodeAccelerator();
751 751
752 media::VideoDecodeAccelerator::Config config(profile); 752 media::VideoDecodeAccelerator::Config config(profile);
753 if (vda_ && !vda_->Initialize(config, this)) 753 if (vda_ && !vda_->Initialize(config, this))
754 vda_.release()->Destroy(); 754 vda_.release()->Destroy();
755 vda_codec_profile_ = profile; 755 vda_codec_profile_ = profile;
756 LOG(ERROR) << "Unsupported profile " << GetProfileName(profile);
756 } 757 }
757 758
758 if (waiter) 759 if (waiter)
759 waiter->Signal(); 760 waiter->Signal();
760 } 761 }
761 762
762 void RTCVideoDecoder::DestroyTextures() { 763 void RTCVideoDecoder::DestroyTextures() {
763 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 764 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
764 765
765 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since 766 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 } 894 }
894 895
895 void RTCVideoDecoder::ClearPendingBuffers() { 896 void RTCVideoDecoder::ClearPendingBuffers() {
896 // Delete WebRTC input buffers. 897 // Delete WebRTC input buffers.
897 for (const auto& pending_buffer : pending_buffers_) 898 for (const auto& pending_buffer : pending_buffers_)
898 delete[] pending_buffer.first._buffer; 899 delete[] pending_buffer.first._buffer;
899 pending_buffers_.clear(); 900 pending_buffers_.clear();
900 } 901 }
901 902
902 } // namespace content 903 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/gpu/rtc_video_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698