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

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

Issue 2491043003: MediaResource refactoring to support multiple streams (Closed)
Patch Set: rebase Created 3 years, 10 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 bool DecryptingDemuxerStream::enabled() const { 156 bool DecryptingDemuxerStream::enabled() const {
157 return demuxer_stream_->enabled(); 157 return demuxer_stream_->enabled();
158 } 158 }
159 159
160 void DecryptingDemuxerStream::set_enabled(bool enabled, 160 void DecryptingDemuxerStream::set_enabled(bool enabled,
161 base::TimeDelta timestamp) { 161 base::TimeDelta timestamp) {
162 demuxer_stream_->set_enabled(enabled, timestamp); 162 demuxer_stream_->set_enabled(enabled, timestamp);
163 } 163 }
164 164
165 void DecryptingDemuxerStream::SetStreamStatusChangeCB(
166 const StreamStatusChangeCB& cb) {
167 demuxer_stream_->SetStreamStatusChangeCB(cb);
168 }
169
170 DecryptingDemuxerStream::~DecryptingDemuxerStream() { 165 DecryptingDemuxerStream::~DecryptingDemuxerStream() {
171 DVLOG(2) << __func__ << " : state_ = " << state_; 166 DVLOG(2) << __func__ << " : state_ = " << state_;
172 DCHECK(task_runner_->BelongsToCurrentThread()); 167 DCHECK(task_runner_->BelongsToCurrentThread());
173 168
174 if (state_ == kUninitialized) 169 if (state_ == kUninitialized)
175 return; 170 return;
176 171
177 if (decryptor_) { 172 if (decryptor_) {
178 decryptor_->CancelDecrypt(GetDecryptorStreamType()); 173 decryptor_->CancelDecrypt(GetDecryptorStreamType());
179 decryptor_ = NULL; 174 decryptor_ = NULL;
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 break; 386 break;
392 } 387 }
393 388
394 default: 389 default:
395 NOTREACHED(); 390 NOTREACHED();
396 return; 391 return;
397 } 392 }
398 } 393 }
399 394
400 } // namespace media 395 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698