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

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

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Updated comments + dchecks in ffmpeg demux stream Created 4 years, 6 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 145 }
146 146
147 bool DecryptingDemuxerStream::SupportsConfigChanges() { 147 bool DecryptingDemuxerStream::SupportsConfigChanges() {
148 return demuxer_stream_->SupportsConfigChanges(); 148 return demuxer_stream_->SupportsConfigChanges();
149 } 149 }
150 150
151 VideoRotation DecryptingDemuxerStream::video_rotation() { 151 VideoRotation DecryptingDemuxerStream::video_rotation() {
152 return demuxer_stream_->video_rotation(); 152 return demuxer_stream_->video_rotation();
153 } 153 }
154 154
155 bool DecryptingDemuxerStream::enabled() const {
156 return demuxer_stream_->enabled();
157 }
158
159 void DecryptingDemuxerStream::set_enabled(bool enabled,
160 base::TimeDelta timestamp) {
161 demuxer_stream_->set_enabled(enabled, timestamp);
162 }
163
155 DecryptingDemuxerStream::~DecryptingDemuxerStream() { 164 DecryptingDemuxerStream::~DecryptingDemuxerStream() {
156 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_; 165 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_;
157 DCHECK(task_runner_->BelongsToCurrentThread()); 166 DCHECK(task_runner_->BelongsToCurrentThread());
158 167
159 if (state_ == kUninitialized) 168 if (state_ == kUninitialized)
160 return; 169 return;
161 170
162 if (decryptor_) { 171 if (decryptor_) {
163 decryptor_->CancelDecrypt(GetDecryptorStreamType()); 172 decryptor_->CancelDecrypt(GetDecryptorStreamType());
164 decryptor_ = NULL; 173 decryptor_ = NULL;
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 break; 378 break;
370 } 379 }
371 380
372 default: 381 default:
373 NOTREACHED(); 382 NOTREACHED();
374 return; 383 return;
375 } 384 }
376 } 385 }
377 386
378 } // namespace media 387 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698