Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(436)

Side by Side Diff: media/filters/decrypting_demuxer_stream.cc

Issue 208263018: Add SupportsConfigChanges() to DemuxerStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@audioconverterchunk
Patch Set: Make comment not specific to video_decoder_config(). Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // If we don't have |demuxer_stream_| yet (we haven't been Initialize()-ed),
166 // be conservative and assume we could have config changes.
167 return demuxer_stream_ ? demuxer_stream_->SupportsConfigChanges() : true;
scherkus (not reviewing) 2014/03/25 22:16:47 line 161 doesn't make this assumption nor do other
rileya (GONE FROM CHROMIUM) 2014/03/25 22:43:19 Good point, removed that behavior. Looks like the
168 }
169
164 DecryptingDemuxerStream::~DecryptingDemuxerStream() { 170 DecryptingDemuxerStream::~DecryptingDemuxerStream() {
165 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_; 171 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_;
166 } 172 }
167 173
168 void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) { 174 void DecryptingDemuxerStream::SetDecryptor(Decryptor* decryptor) {
169 DVLOG(2) << __FUNCTION__; 175 DVLOG(2) << __FUNCTION__;
170 DCHECK(task_runner_->BelongsToCurrentThread()); 176 DCHECK(task_runner_->BelongsToCurrentThread());
171 DCHECK_EQ(state_, kDecryptorRequested) << state_; 177 DCHECK_EQ(state_, kDecryptorRequested) << state_;
172 DCHECK(!init_cb_.is_null()); 178 DCHECK(!init_cb_.is_null());
173 DCHECK(!set_decryptor_ready_cb_.is_null()); 179 DCHECK(!set_decryptor_ready_cb_.is_null());
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 break; 392 break;
387 } 393 }
388 394
389 default: 395 default:
390 NOTREACHED(); 396 NOTREACHED();
391 return; 397 return;
392 } 398 }
393 } 399 }
394 400
395 } // namespace media 401 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698