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

Unified Diff: media/filters/chunk_demuxer_unittest.cc

Issue 1171263004: Allow setting memory limits on media::DemuxerStream (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace cleanup 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 side-by-side diff with in-line comments
Download patch
Index: media/filters/chunk_demuxer_unittest.cc
diff --git a/media/filters/chunk_demuxer_unittest.cc b/media/filters/chunk_demuxer_unittest.cc
index c99568500fcd0faed4c4d0fdc98d371ae46ac95b..3a7ded0750d5400964b4a2195b1ca8518da47bfb 100644
--- a/media/filters/chunk_demuxer_unittest.cc
+++ b/media/filters/chunk_demuxer_unittest.cc
@@ -3333,8 +3333,10 @@ TEST_F(ChunkDemuxerTest, SetMemoryLimitType) {
ASSERT_TRUE(InitDemuxer(HAS_AUDIO | HAS_VIDEO));
// Set different memory limits for audio and video.
- demuxer_->SetMemoryLimits(DemuxerStream::AUDIO, 10 * kBlockSize);
- demuxer_->SetMemoryLimits(DemuxerStream::VIDEO, 5 * kBlockSize);
+ DemuxerStream* audio_stream = demuxer_->GetStream(DemuxerStream::AUDIO);
+ audio_stream->SetMemoryLimit(10 * kBlockSize);
+ DemuxerStream* video_stream = demuxer_->GetStream(DemuxerStream::VIDEO);
+ video_stream->SetMemoryLimit(5 * kBlockSize);
base::TimeDelta seek_time = base::TimeDelta::FromMilliseconds(1000);
@@ -3362,7 +3364,8 @@ TEST_F(ChunkDemuxerTest, SetMemoryLimitType) {
TEST_F(ChunkDemuxerTest, GCDuringSeek) {
ASSERT_TRUE(InitDemuxer(HAS_AUDIO));
- demuxer_->SetMemoryLimits(DemuxerStream::AUDIO, 5 * kBlockSize);
+ DemuxerStream* audio_stream = demuxer_->GetStream(DemuxerStream::AUDIO);
+ audio_stream->SetMemoryLimit(5 * kBlockSize);
base::TimeDelta seek_time1 = base::TimeDelta::FromMilliseconds(1000);
base::TimeDelta seek_time2 = base::TimeDelta::FromMilliseconds(500);

Powered by Google App Engine
This is Rietveld 408576698