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/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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 if (!vda_) { | 81 if (!vda_) { |
82 callback.Run(); | 82 callback.Run(); |
83 return; | 83 return; |
84 } | 84 } |
85 vda_loop_proxy_->PostTask(FROM_HERE, base::Bind( | 85 vda_loop_proxy_->PostTask(FROM_HERE, base::Bind( |
86 &VideoDecodeAccelerator::Destroy, vda_)); | 86 &VideoDecodeAccelerator::Destroy, vda_)); |
87 vda_ = NULL; | 87 vda_ = NULL; |
88 callback.Run(); | 88 callback.Run(); |
89 } | 89 } |
90 | 90 |
91 void GpuVideoDecoder::Seek(base::TimeDelta time, const FilterStatusCB& cb) { | 91 void GpuVideoDecoder::Seek(base::TimeDelta time, const PipelineStatusCB& cb) { |
92 if (!gvd_loop_proxy_->BelongsToCurrentThread()) { | 92 if (!gvd_loop_proxy_->BelongsToCurrentThread()) { |
93 gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind( | 93 gvd_loop_proxy_->PostTask(FROM_HERE, base::Bind( |
94 &GpuVideoDecoder::Seek, this, time, cb)); | 94 &GpuVideoDecoder::Seek, this, time, cb)); |
95 return; | 95 return; |
96 } | 96 } |
97 cb.Run(PIPELINE_OK); | 97 cb.Run(PIPELINE_OK); |
98 } | 98 } |
99 | 99 |
100 void GpuVideoDecoder::Pause(const base::Closure& callback) { | 100 void GpuVideoDecoder::Pause(const base::Closure& callback) { |
101 if (!gvd_loop_proxy_->BelongsToCurrentThread()) { | 101 if (!gvd_loop_proxy_->BelongsToCurrentThread()) { |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 } | 533 } |
534 if (!vda_) | 534 if (!vda_) |
535 return; | 535 return; |
536 vda_ = NULL; | 536 vda_ = NULL; |
537 DLOG(ERROR) << "VDA Error: " << error; | 537 DLOG(ERROR) << "VDA Error: " << error; |
538 if (host()) | 538 if (host()) |
539 host()->SetError(PIPELINE_ERROR_DECODE); | 539 host()->SetError(PIPELINE_ERROR_DECODE); |
540 } | 540 } |
541 | 541 |
542 } // namespace media | 542 } // namespace media |
OLD | NEW |