| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
| 10 #include "media/base/demuxer_stream.h" | 10 #include "media/base/demuxer_stream.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 GpuVideoDecoder::SHMBuffer::~SHMBuffer() {} | 27 GpuVideoDecoder::SHMBuffer::~SHMBuffer() {} |
| 28 | 28 |
| 29 GpuVideoDecoder::BufferPair::BufferPair( | 29 GpuVideoDecoder::BufferPair::BufferPair( |
| 30 SHMBuffer* s, const scoped_refptr<Buffer>& b) : shm_buffer(s), buffer(b) { | 30 SHMBuffer* s, const scoped_refptr<Buffer>& b) : shm_buffer(s), buffer(b) { |
| 31 } | 31 } |
| 32 | 32 |
| 33 GpuVideoDecoder::BufferPair::~BufferPair() {} | 33 GpuVideoDecoder::BufferPair::~BufferPair() {} |
| 34 | 34 |
| 35 GpuVideoDecoder::GpuVideoDecoder( | 35 GpuVideoDecoder::GpuVideoDecoder( |
| 36 MessageLoop* message_loop, | 36 MessageLoop* message_loop, |
| 37 Factories* factories) | 37 scoped_ptr<Factories> factories) |
| 38 : message_loop_(message_loop), | 38 : message_loop_(message_loop), |
| 39 factories_(factories), | 39 factories_(factories.Pass()), |
| 40 flush_in_progress_(false), | 40 flush_in_progress_(false), |
| 41 demuxer_read_in_progress_(false), | 41 demuxer_read_in_progress_(false), |
| 42 next_picture_buffer_id_(0), | 42 next_picture_buffer_id_(0), |
| 43 next_bitstream_buffer_id_(0) { | 43 next_bitstream_buffer_id_(0) { |
| 44 DCHECK(message_loop_ && factories_.get()); | 44 DCHECK(message_loop_ && factories_.get()); |
| 45 } | 45 } |
| 46 | 46 |
| 47 GpuVideoDecoder::~GpuVideoDecoder() { | 47 GpuVideoDecoder::~GpuVideoDecoder() { |
| 48 DCHECK(!vda_); // Stop should have been already called. | 48 DCHECK(!vda_); // Stop should have been already called. |
| 49 STLDeleteElements(&available_shm_segments_); | 49 STLDeleteElements(&available_shm_segments_); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 &GpuVideoDecoder::NotifyError, this, error)); | 438 &GpuVideoDecoder::NotifyError, this, error)); |
| 439 return; | 439 return; |
| 440 } | 440 } |
| 441 vda_ = NULL; | 441 vda_ = NULL; |
| 442 DLOG(ERROR) << "VDA Error: " << error; | 442 DLOG(ERROR) << "VDA Error: " << error; |
| 443 if (host()) | 443 if (host()) |
| 444 host()->SetError(PIPELINE_ERROR_DECODE); | 444 host()->SetError(PIPELINE_ERROR_DECODE); |
| 445 } | 445 } |
| 446 | 446 |
| 447 } // namespace media | 447 } // namespace media |
| OLD | NEW |