| Index: media/filters/chunk_demuxer.cc
|
| diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
|
| index 2a63c8d80e1aa6cf36b302be4a832b2f441530f5..9f1bfc292eea4198591831c1d5608e061b7976c6 100644
|
| --- a/media/filters/chunk_demuxer.cc
|
| +++ b/media/filters/chunk_demuxer.cc
|
| @@ -163,10 +163,6 @@ class SourceState {
|
| void MarkEndOfStream();
|
| void UnmarkEndOfStream();
|
| void Shutdown();
|
| - // Sets the memory limit on each stream of a specific type.
|
| - // |memory_limit| is the maximum number of bytes each stream of type |type|
|
| - // is allowed to hold in its buffer.
|
| - void SetMemoryLimits(DemuxerStream::Type type, int memory_limit);
|
| bool IsSeekWaitingForData() const;
|
|
|
| private:
|
| @@ -514,29 +510,6 @@ void SourceState::Shutdown() {
|
| }
|
| }
|
|
|
| -void SourceState::SetMemoryLimits(DemuxerStream::Type type, int memory_limit) {
|
| - switch (type) {
|
| - case DemuxerStream::AUDIO:
|
| - if (audio_)
|
| - audio_->set_memory_limit(memory_limit);
|
| - break;
|
| - case DemuxerStream::VIDEO:
|
| - if (video_)
|
| - video_->set_memory_limit(memory_limit);
|
| - break;
|
| - case DemuxerStream::TEXT:
|
| - for (TextStreamMap::iterator itr = text_stream_map_.begin();
|
| - itr != text_stream_map_.end(); ++itr) {
|
| - itr->second->set_memory_limit(memory_limit);
|
| - }
|
| - break;
|
| - case DemuxerStream::UNKNOWN:
|
| - case DemuxerStream::NUM_TYPES:
|
| - NOTREACHED();
|
| - break;
|
| - }
|
| -}
|
| -
|
| bool SourceState::IsSeekWaitingForData() const {
|
| if (audio_ && audio_->IsSeekWaitingForData())
|
| return true;
|
| @@ -1020,6 +993,14 @@ VideoRotation ChunkDemuxerStream::video_rotation() {
|
| return VIDEO_ROTATION_0;
|
| }
|
|
|
| +size_t ChunkDemuxerStream::GetMemoryLimit() const {
|
| + return stream_->GetMemoryLimit();
|
| +}
|
| +
|
| +void ChunkDemuxerStream::SetMemoryLimit(size_t memory_limit) {
|
| + stream_->SetMemoryLimit(memory_limit);
|
| +}
|
| +
|
| TextTrackConfig ChunkDemuxerStream::text_track_config() {
|
| CHECK_EQ(type_, TEXT);
|
| base::AutoLock auto_lock(lock_);
|
| @@ -1588,13 +1569,6 @@ void ChunkDemuxer::Shutdown() {
|
| base::ResetAndReturn(&seek_cb_).Run(PIPELINE_ERROR_ABORT);
|
| }
|
|
|
| -void ChunkDemuxer::SetMemoryLimits(DemuxerStream::Type type, int memory_limit) {
|
| - for (SourceStateMap::iterator itr = source_state_map_.begin();
|
| - itr != source_state_map_.end(); ++itr) {
|
| - itr->second->SetMemoryLimits(type, memory_limit);
|
| - }
|
| -}
|
| -
|
| void ChunkDemuxer::ChangeState_Locked(State new_state) {
|
| lock_.AssertAcquired();
|
| DVLOG(1) << "ChunkDemuxer::ChangeState_Locked() : "
|
|
|