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

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

Issue 1171263004: Allow setting memory limits on media::DemuxerStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include logging.h for NOTIMPLEMENTED definition Created 5 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 bool DecryptingDemuxerStream::SupportsConfigChanges() { 137 bool DecryptingDemuxerStream::SupportsConfigChanges() {
138 return demuxer_stream_->SupportsConfigChanges(); 138 return demuxer_stream_->SupportsConfigChanges();
139 } 139 }
140 140
141 VideoRotation DecryptingDemuxerStream::video_rotation() { 141 VideoRotation DecryptingDemuxerStream::video_rotation() {
142 return demuxer_stream_->video_rotation(); 142 return demuxer_stream_->video_rotation();
143 } 143 }
144 144
145 int DecryptingDemuxerStream::GetMemoryLimit() const {
146 return demuxer_stream_->GetMemoryLimit();
147 }
148
149 void DecryptingDemuxerStream::SetMemoryLimit(int memory_limit) {
150 demuxer_stream_->SetMemoryLimit(memory_limit);
151 }
152
145 DecryptingDemuxerStream::~DecryptingDemuxerStream() { 153 DecryptingDemuxerStream::~DecryptingDemuxerStream() {
146 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_; 154 DVLOG(2) << __FUNCTION__ << " : state_ = " << state_;
147 DCHECK(task_runner_->BelongsToCurrentThread()); 155 DCHECK(task_runner_->BelongsToCurrentThread());
148 156
149 if (state_ == kUninitialized) 157 if (state_ == kUninitialized)
150 return; 158 return;
151 159
152 if (decryptor_) { 160 if (decryptor_) {
153 decryptor_->CancelDecrypt(GetDecryptorStreamType()); 161 decryptor_->CancelDecrypt(GetDecryptorStreamType());
154 decryptor_ = NULL; 162 decryptor_ = NULL;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 break; 408 break;
401 } 409 }
402 410
403 default: 411 default:
404 NOTREACHED(); 412 NOTREACHED();
405 return; 413 return;
406 } 414 }
407 } 415 }
408 416
409 } // namespace media 417 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698