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/decrypting_demuxer_stream.h" | 5 #include "media/filters/decrypting_demuxer_stream.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/logging.h" | 10 #include "base/logging.h" |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
154 | 154 |
155 DemuxerStream::Type DecryptingDemuxerStream::type() { | 155 DemuxerStream::Type DecryptingDemuxerStream::type() { |
156 DCHECK(state_ != kUninitialized && state_ != kDecryptorRequested) << state_; | 156 DCHECK(state_ != kUninitialized && state_ != kDecryptorRequested) << state_; |
157 return demuxer_stream_->type(); | 157 return demuxer_stream_->type(); |
158 } | 158 } |
159 | 159 |
160 void DecryptingDemuxerStream::EnableBitstreamConverter() { | 160 void DecryptingDemuxerStream::EnableBitstreamConverter() { |
161 demuxer_stream_->EnableBitstreamConverter(); | 161 demuxer_stream_->EnableBitstreamConverter(); |
162 } | 162 } |
163 | 163 |
164 bool DecryptingDemuxerStream::SupportsConfigChanges() { | |
165 DCHECK(demuxer_stream_); | |
scherkus (not reviewing)
2014/03/25 23:17:58
we tend to avoid these DCHECK()s as null pointer d
| |
166 return demuxer_stream_->SupportsConfigChanges(); | |
167 } | |
168 | |
164 DecryptingDemuxerStream::~DecryptingDemuxerStream() { | 169 DecryptingDemuxerStream::~DecryptingDemuxerStream() { |
165 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_; | 170 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_; |
166 } | 171 } |
167 | 172 |
168 void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) { | 173 void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) { |
169 DVLOG(2) << __FUNCTION__; | 174 DVLOG(2) << __FUNCTION__; |
170 DCHECK(task_runner_->BelongsToCurrentThread()); | 175 DCHECK(task_runner_->BelongsToCurrentThread()); |
171 DCHECK_EQ(state_, kDecryptorRequested) << state_; | 176 DCHECK_EQ(state_, kDecryptorRequested) << state_; |
172 DCHECK(!init_cb_.is_null()); | 177 DCHECK(!init_cb_.is_null()); |
173 DCHECK(!set_decryptor_ready_cb_.is_null()); | 178 DCHECK(!set_decryptor_ready_cb_.is_null()); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
386 break; | 391 break; |
387 } | 392 } |
388 | 393 |
389 default: | 394 default: |
390 NOTREACHED(); | 395 NOTREACHED(); |
391 return; | 396 return; |
392 } | 397 } |
393 } | 398 } |
394 | 399 |
395 } // namespace media | 400 } // namespace media |
OLD | NEW |