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

Side by Side Diff: media/filters/gpu_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, 5 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/filters/gpu_video_decoder.h" 5 #include "media/filters/gpu_video_decoder.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 158
159 if (previously_initialized) { 159 if (previously_initialized) {
160 // Reinitialization with a different config (but same codec and profile). 160 // Reinitialization with a different config (but same codec and profile).
161 // VDA should handle it by detecting this in-stream by itself, 161 // VDA should handle it by detecting this in-stream by itself,
162 // no need to notify it. 162 // no need to notify it.
163 bound_init_cb.Run(true); 163 bound_init_cb.Run(true);
164 return; 164 return;
165 } 165 }
166 166
167 vda_ = factories_->CreateVideoDecodeAccelerator().Pass(); 167 vda_ = factories_->CreateVideoDecodeAccelerator().Pass();
168 if (!vda_ || !vda_->Initialize(config.profile(), this)) { 168 if (!vda_ || !vda_->Initialize(config.profile(), 0, this)) {
169 bound_init_cb.Run(false); 169 bound_init_cb.Run(false);
170 return; 170 return;
171 } 171 }
172 172
173 DVLOG(3) << "GpuVideoDecoder::Initialize() succeeded."; 173 DVLOG(3) << "GpuVideoDecoder::Initialize() succeeded.";
174 bound_init_cb.Run(true); 174 bound_init_cb.Run(true);
175 } 175 }
176 176
177 void GpuVideoDecoder::DestroyPictureBuffers(PictureBufferMap* buffers) { 177 void GpuVideoDecoder::DestroyPictureBuffers(PictureBufferMap* buffers) {
178 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent(); 178 DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent();
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 } 587 }
588 return false; 588 return false;
589 } 589 }
590 590
591 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 591 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
592 const { 592 const {
593 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 593 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
594 } 594 }
595 595
596 } // namespace media 596 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698