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, | 49 CdmContext* /* cdm_context */, |
50 const InitCB& init_cb, | 50 const InitCB& init_cb, |
51 const OutputCB& output_cb) { | 51 const OutputCB& output_cb) { |
52 DCHECK(thread_checker_.CalledOnValidThread()); | 52 DCHECK(thread_checker_.CalledOnValidThread()); |
53 DCHECK(config.IsValidConfig()); | 53 DCHECK(config.IsValidConfig()); |
54 DCHECK(held_decode_callbacks_.empty()) | 54 DCHECK(held_decode_callbacks_.empty()) |
55 << "No reinitialization during pending decode."; | 55 << "No reinitialization during pending decode."; |
56 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; | 56 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; |
57 | 57 |
58 current_config_ = config; | 58 current_config_ = config; |
59 init_cb_.SetCallback(BindToCurrentLoop(init_cb)); | 59 init_cb_.SetCallback(BindToCurrentLoop(init_cb)); |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 void FakeVideoDecoder::DoReset() { | 253 void FakeVideoDecoder::DoReset() { |
254 DCHECK(thread_checker_.CalledOnValidThread()); | 254 DCHECK(thread_checker_.CalledOnValidThread()); |
255 DCHECK(held_decode_callbacks_.empty()); | 255 DCHECK(held_decode_callbacks_.empty()); |
256 DCHECK(!reset_cb_.IsNull()); | 256 DCHECK(!reset_cb_.IsNull()); |
257 | 257 |
258 reset_cb_.RunOrHold(); | 258 reset_cb_.RunOrHold(); |
259 } | 259 } |
260 | 260 |
261 } // namespace media | 261 } // namespace media |
OLD | NEW |