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

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

Issue 1485043002: Passed is_encrypted parameter to the VDA initialization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years 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 "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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 } 667 }
668 668
669 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, 669 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile,
670 base::WaitableEvent* waiter) { 670 base::WaitableEvent* waiter) {
671 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 671 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
672 672
673 if (!IsProfileSupported(profile)) { 673 if (!IsProfileSupported(profile)) {
674 DVLOG(1) << "Unsupported profile " << profile; 674 DVLOG(1) << "Unsupported profile " << profile;
675 } else { 675 } else {
676 vda_ = factories_->CreateVideoDecodeAccelerator(); 676 vda_ = factories_->CreateVideoDecodeAccelerator();
677 if (vda_ && !vda_->Initialize(profile, this)) 677
678 media::VideoDecodeAccelerator::Config config(profile);
679 if (vda_ && !vda_->Initialize(config, this))
678 vda_.release()->Destroy(); 680 vda_.release()->Destroy();
679 } 681 }
680 682
681 waiter->Signal(); 683 waiter->Signal();
682 } 684 }
683 685
684 void RTCVideoDecoder::DestroyTextures() { 686 void RTCVideoDecoder::DestroyTextures() {
685 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 687 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
686 688
687 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since 689 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 } 805 }
804 806
805 void RTCVideoDecoder::ClearPendingBuffers() { 807 void RTCVideoDecoder::ClearPendingBuffers() {
806 // Delete WebRTC input buffers. 808 // Delete WebRTC input buffers.
807 for (const auto& pending_buffer : pending_buffers_) 809 for (const auto& pending_buffer : pending_buffers_)
808 delete[] pending_buffer.first._buffer; 810 delete[] pending_buffer.first._buffer;
809 pending_buffers_.clear(); 811 pending_buffers_.clear();
810 } 812 }
811 813
812 } // namespace content 814 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/vt_video_decode_accelerator_mac.cc ('k') | content/renderer/pepper/video_decoder_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698