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

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

Issue 1207043002: Introduce a client minimum picture pool size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 "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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 685
686 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile, 686 void RTCVideoDecoder::CreateVDA(media::VideoCodecProfile profile,
687 base::WaitableEvent* waiter) { 687 base::WaitableEvent* waiter) {
688 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 688 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
689 689
690 if (!IsProfileSupported(profile)) { 690 if (!IsProfileSupported(profile)) {
691 DVLOG(1) << "Unsupported profile " << profile; 691 DVLOG(1) << "Unsupported profile " << profile;
692 } else { 692 } else {
693 vda_ = factories_->CreateVideoDecodeAccelerator(); 693 vda_ = factories_->CreateVideoDecodeAccelerator();
694 if (vda_ && !vda_->Initialize(profile, this)) 694 if (vda_ && !vda_->Initialize(profile, 0, this))
695 vda_.release()->Destroy(); 695 vda_.release()->Destroy();
696 } 696 }
697 697
698 waiter->Signal(); 698 waiter->Signal();
699 } 699 }
700 700
701 void RTCVideoDecoder::DestroyTextures() { 701 void RTCVideoDecoder::DestroyTextures() {
702 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 702 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
703 703
704 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since 704 // Not destroying PictureBuffers in |picture_buffers_at_display_| yet, since
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample); 812 UMA_HISTOGRAM_BOOLEAN("Media.RTCVideoDecoderInitDecodeSuccess", sample);
813 return status; 813 return status;
814 } 814 }
815 815
816 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 816 void RTCVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
817 const { 817 const {
818 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 818 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
819 } 819 }
820 820
821 } // namespace content 821 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698