| Index: media/filters/fake_video_decoder.cc
|
| diff --git a/media/filters/fake_video_decoder.cc b/media/filters/fake_video_decoder.cc
|
| index 407fdedf3ce42cee1e72dbc3aa18714defbd2b93..013cecaddbf4d3984ff1f421d66f8844eaf1377e 100644
|
| --- a/media/filters/fake_video_decoder.cc
|
| +++ b/media/filters/fake_video_decoder.cc
|
| @@ -21,10 +21,12 @@ FakeVideoDecoder::FakeVideoDecoder(int decoding_delay,
|
| total_bytes_decoded_(0),
|
| fail_to_initialize_(false),
|
| weak_factory_(this) {
|
| + DVLOG(1) << __func__;
|
| DCHECK_GE(decoding_delay, 0);
|
| }
|
|
|
| FakeVideoDecoder::~FakeVideoDecoder() {
|
| + DVLOG(1) << __func__;
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
|
|
| if (state_ == STATE_UNINITIALIZED)
|
| @@ -40,15 +42,20 @@ FakeVideoDecoder::~FakeVideoDecoder() {
|
| decoded_frames_.clear();
|
| }
|
|
|
| +void FakeVideoDecoder::EnableEncryptedConfigSupport() {
|
| + supports_encrypted_config_ = true;
|
| +}
|
| +
|
| std::string FakeVideoDecoder::GetDisplayName() const {
|
| return "FakeVideoDecoder";
|
| }
|
|
|
| void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config,
|
| bool low_delay,
|
| - CdmContext* /* cdm_context */,
|
| + CdmContext* cdm_context,
|
| const InitCB& init_cb,
|
| const OutputCB& output_cb) {
|
| + DVLOG(1) << __func__;
|
| DCHECK(thread_checker_.CalledOnValidThread());
|
| DCHECK(config.IsValidConfig());
|
| DCHECK(held_decode_callbacks_.empty())
|
| @@ -67,6 +74,11 @@ void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config,
|
| decoded_frames_.clear();
|
| }
|
|
|
| + if (config.is_encrypted() && (!supports_encrypted_config_ || !cdm_context)) {
|
| + DVLOG(1) << "Encrypted config not supported.";
|
| + fail_to_initialize_ = true;
|
| + }
|
| +
|
| if (fail_to_initialize_) {
|
| state_ = STATE_ERROR;
|
| init_cb_.RunOrHold(false);
|
|
|