| 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 "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 GpuVideoDecoder::BufferData::BufferData( | 45 GpuVideoDecoder::BufferData::BufferData( |
| 46 int32 bbid, base::TimeDelta ts, const gfx::Rect& vr, const gfx::Size& ns) | 46 int32 bbid, base::TimeDelta ts, const gfx::Rect& vr, const gfx::Size& ns) |
| 47 : bitstream_buffer_id(bbid), timestamp(ts), visible_rect(vr), | 47 : bitstream_buffer_id(bbid), timestamp(ts), visible_rect(vr), |
| 48 natural_size(ns) { | 48 natural_size(ns) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 GpuVideoDecoder::BufferData::~BufferData() {} | 51 GpuVideoDecoder::BufferData::~BufferData() {} |
| 52 | 52 |
| 53 GpuVideoDecoder::GpuVideoDecoder( | 53 GpuVideoDecoder::GpuVideoDecoder( |
| 54 const scoped_refptr<base::MessageLoopProxy>& gvd_loop_proxy, | 54 const scoped_refptr<base::MessageLoopProxy>& message_loop, |
| 55 const scoped_refptr<base::MessageLoopProxy>& vda_loop_proxy, | |
| 56 const scoped_refptr<Factories>& factories) | 55 const scoped_refptr<Factories>& factories) |
| 57 : gvd_loop_proxy_(gvd_loop_proxy), | 56 : gvd_loop_proxy_(message_loop), |
| 58 vda_loop_proxy_(vda_loop_proxy), | 57 vda_loop_proxy_(factories->GetMessageLoop()), |
| 59 factories_(factories), | 58 factories_(factories), |
| 60 state_(kNormal), | 59 state_(kNormal), |
| 61 demuxer_read_in_progress_(false), | 60 demuxer_read_in_progress_(false), |
| 62 decoder_texture_target_(0), | 61 decoder_texture_target_(0), |
| 63 next_picture_buffer_id_(0), | 62 next_picture_buffer_id_(0), |
| 64 next_bitstream_buffer_id_(0), | 63 next_bitstream_buffer_id_(0), |
| 65 error_occured_(false) { | 64 error_occured_(false) { |
| 66 DCHECK(factories_); | 65 DCHECK(factories_); |
| 67 } | 66 } |
| 68 | 67 |
| (...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 | 581 |
| 583 error_occured_ = true; | 582 error_occured_ = true; |
| 584 | 583 |
| 585 if (!pending_read_cb_.is_null()) { | 584 if (!pending_read_cb_.is_null()) { |
| 586 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); | 585 base::ResetAndReturn(&pending_read_cb_).Run(kDecodeError, NULL); |
| 587 return; | 586 return; |
| 588 } | 587 } |
| 589 } | 588 } |
| 590 | 589 |
| 591 } // namespace media | 590 } // namespace media |
| OLD | NEW |