OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/fake_video_decoder.h" | 5 #include "media/filters/fake_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/location.h" | 9 #include "base/location.h" |
10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 if (!init_cb_.IsNull()) | 33 if (!init_cb_.IsNull()) |
34 SatisfyInit(); | 34 SatisfyInit(); |
35 if (!held_decode_callbacks_.empty()) | 35 if (!held_decode_callbacks_.empty()) |
36 SatisfyDecode(); | 36 SatisfyDecode(); |
37 if (!reset_cb_.IsNull()) | 37 if (!reset_cb_.IsNull()) |
38 SatisfyReset(); | 38 SatisfyReset(); |
39 | 39 |
40 decoded_frames_.clear(); | 40 decoded_frames_.clear(); |
41 } | 41 } |
42 | 42 |
| 43 std::string FakeVideoDecoder::GetDisplayName() const { |
| 44 return "FakeVideoDecoder"; |
| 45 } |
| 46 |
43 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config, | 47 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config, |
44 bool low_delay, | 48 bool low_delay, |
45 const PipelineStatusCB& status_cb, | 49 const PipelineStatusCB& status_cb, |
46 const OutputCB& output_cb) { | 50 const OutputCB& output_cb) { |
47 DCHECK(thread_checker_.CalledOnValidThread()); | 51 DCHECK(thread_checker_.CalledOnValidThread()); |
48 DCHECK(config.IsValidConfig()); | 52 DCHECK(config.IsValidConfig()); |
49 DCHECK(held_decode_callbacks_.empty()) | 53 DCHECK(held_decode_callbacks_.empty()) |
50 << "No reinitialization during pending decode."; | 54 << "No reinitialization during pending decode."; |
51 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; | 55 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; |
52 | 56 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 240 |
237 void FakeVideoDecoder::DoReset() { | 241 void FakeVideoDecoder::DoReset() { |
238 DCHECK(thread_checker_.CalledOnValidThread()); | 242 DCHECK(thread_checker_.CalledOnValidThread()); |
239 DCHECK(held_decode_callbacks_.empty()); | 243 DCHECK(held_decode_callbacks_.empty()); |
240 DCHECK(!reset_cb_.IsNull()); | 244 DCHECK(!reset_cb_.IsNull()); |
241 | 245 |
242 reset_cb_.RunOrHold(); | 246 reset_cb_.RunOrHold(); |
243 } | 247 } |
244 | 248 |
245 } // namespace media | 249 } // namespace media |
OLD | NEW |