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

Side by Side Diff: media/filters/gpu_video_decoder.cc

Issue 1816203003: Add an additional VDA::Flush() mode to return all allocated buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 NOTREACHED(); 312 NOTREACHED();
313 return; 313 return;
314 } 314 }
315 315
316 DCHECK_EQ(state_, kNormal); 316 DCHECK_EQ(state_, kNormal);
317 317
318 if (buffer->end_of_stream()) { 318 if (buffer->end_of_stream()) {
319 DVLOG(3) << __FUNCTION__ << " Initiating Flush for EOS."; 319 DVLOG(3) << __FUNCTION__ << " Initiating Flush for EOS.";
320 state_ = kDrainingDecoder; 320 state_ = kDrainingDecoder;
321 eos_decode_cb_ = bound_decode_cb; 321 eos_decode_cb_ = bound_decode_cb;
322 vda_->Flush(); 322 vda_->Flush(false);
323 return; 323 return;
324 } 324 }
325 325
326 size_t size = buffer->data_size(); 326 size_t size = buffer->data_size();
327 scoped_ptr<SHMBuffer> shm_buffer = GetSHM(size); 327 scoped_ptr<SHMBuffer> shm_buffer = GetSHM(size);
328 if (!shm_buffer) { 328 if (!shm_buffer) {
329 bound_decode_cb.Run(kDecodeError); 329 bound_decode_cb.Run(kDecodeError);
330 return; 330 return;
331 } 331 }
332 332
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 719 }
720 return false; 720 return false;
721 } 721 }
722 722
723 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() 723 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent()
724 const { 724 const {
725 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); 725 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread());
726 } 726 }
727 727
728 } // namespace media 728 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698