| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |