| 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/location.h" | 7 #include "base/location.h" |
| 8 #include "media/base/bind_to_current_loop.h" | 8 #include "media/base/bind_to_current_loop.h" |
| 9 #include "media/base/test_helpers.h" | 9 #include "media/base/test_helpers.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 decoded_frames_.clear(); | 40 decoded_frames_.clear(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 std::string FakeVideoDecoder::GetDisplayName() const { | 43 std::string FakeVideoDecoder::GetDisplayName() const { |
| 44 return "FakeVideoDecoder"; | 44 return "FakeVideoDecoder"; |
| 45 } | 45 } |
| 46 | 46 |
| 47 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config, | 47 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| 48 bool low_delay, | 48 bool low_delay, |
| 49 const SetCdmReadyCB& set_cdm_ready_cb, | |
| 50 const InitCB& init_cb, | 49 const InitCB& init_cb, |
| 51 const OutputCB& output_cb) { | 50 const OutputCB& output_cb) { |
| 52 DCHECK(thread_checker_.CalledOnValidThread()); | 51 DCHECK(thread_checker_.CalledOnValidThread()); |
| 53 DCHECK(config.IsValidConfig()); | 52 DCHECK(config.IsValidConfig()); |
| 54 DCHECK(held_decode_callbacks_.empty()) | 53 DCHECK(held_decode_callbacks_.empty()) |
| 55 << "No reinitialization during pending decode."; | 54 << "No reinitialization during pending decode."; |
| 56 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; | 55 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; |
| 57 | 56 |
| 58 current_config_ = config; | 57 current_config_ = config; |
| 59 init_cb_.SetCallback(BindToCurrentLoop(init_cb)); | 58 init_cb_.SetCallback(BindToCurrentLoop(init_cb)); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 251 |
| 253 void FakeVideoDecoder::DoReset() { | 252 void FakeVideoDecoder::DoReset() { |
| 254 DCHECK(thread_checker_.CalledOnValidThread()); | 253 DCHECK(thread_checker_.CalledOnValidThread()); |
| 255 DCHECK(held_decode_callbacks_.empty()); | 254 DCHECK(held_decode_callbacks_.empty()); |
| 256 DCHECK(!reset_cb_.IsNull()); | 255 DCHECK(!reset_cb_.IsNull()); |
| 257 | 256 |
| 258 reset_cb_.RunOrHold(); | 257 reset_cb_.RunOrHold(); |
| 259 } | 258 } |
| 260 | 259 |
| 261 } // namespace media | 260 } // namespace media |
| OLD | NEW |