| Index: media/filters/chunk_demuxer.cc
|
| diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
|
| index 72c7ef43e5c772dab9759c09a5bee78601370f0e..13532c0f73e3a0aa98c19f3df30dfe6b15471bfb 100644
|
| --- a/media/filters/chunk_demuxer.cc
|
| +++ b/media/filters/chunk_demuxer.cc
|
| @@ -165,7 +165,7 @@ class SourceState {
|
| // 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);
|
| + void SetMemoryLimits(DemuxerStream::Type type, size_t memory_limit);
|
| bool IsSeekWaitingForData() const;
|
|
|
| private:
|
| @@ -513,20 +513,21 @@ void SourceState::Shutdown() {
|
| }
|
| }
|
|
|
| -void SourceState::SetMemoryLimits(DemuxerStream::Type type, int memory_limit) {
|
| +void SourceState::SetMemoryLimits(DemuxerStream::Type type,
|
| + size_t memory_limit) {
|
| switch (type) {
|
| case DemuxerStream::AUDIO:
|
| if (audio_)
|
| - audio_->set_memory_limit(memory_limit);
|
| + audio_->SetMemoryLimit(memory_limit);
|
| break;
|
| case DemuxerStream::VIDEO:
|
| if (video_)
|
| - video_->set_memory_limit(memory_limit);
|
| + video_->SetMemoryLimit(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);
|
| + itr->second->SetMemoryLimit(memory_limit);
|
| }
|
| break;
|
| case DemuxerStream::UNKNOWN:
|
| @@ -1025,6 +1026,10 @@ TextTrackConfig ChunkDemuxerStream::text_track_config() {
|
| return stream_->GetCurrentTextTrackConfig();
|
| }
|
|
|
| +void ChunkDemuxerStream::SetMemoryLimit(size_t memory_limit) {
|
| + stream_->SetMemoryLimit(memory_limit);
|
| +}
|
| +
|
| void ChunkDemuxerStream::SetLiveness(Liveness liveness) {
|
| base::AutoLock auto_lock(lock_);
|
| liveness_ = liveness;
|
| @@ -1587,7 +1592,8 @@ void ChunkDemuxer::Shutdown() {
|
| base::ResetAndReturn(&seek_cb_).Run(PIPELINE_ERROR_ABORT);
|
| }
|
|
|
| -void ChunkDemuxer::SetMemoryLimits(DemuxerStream::Type type, int memory_limit) {
|
| +void ChunkDemuxer::SetMemoryLimits(DemuxerStream::Type type,
|
| + size_t memory_limit) {
|
| for (SourceStateMap::iterator itr = source_state_map_.begin();
|
| itr != source_state_map_.end(); ++itr) {
|
| itr->second->SetMemoryLimits(type, memory_limit);
|
|
|