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

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

Issue 11471006: Log MediaSource parsing errors to the MediaLog so they can appear in chrome:media-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "media/base/audio_decoder_config.h" 7 #include "media/base/audio_decoder_config.h"
8 #include "media/base/decoder_buffer.h" 8 #include "media/base/decoder_buffer.h"
9 #include "media/base/mock_demuxer_host.h" 9 #include "media/base/mock_demuxer_host.h"
10 #include "media/base/test_data_util.h" 10 #include "media/base/test_data_util.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 ChunkDemuxerTest() { 158 ChunkDemuxerTest() {
159 CreateNewDemuxer(); 159 CreateNewDemuxer();
160 } 160 }
161 161
162 void CreateNewDemuxer() { 162 void CreateNewDemuxer() {
163 base::Closure open_cb = 163 base::Closure open_cb =
164 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this)); 164 base::Bind(&ChunkDemuxerTest::DemuxerOpened, base::Unretained(this));
165 ChunkDemuxer::NeedKeyCB need_key_cb = 165 ChunkDemuxer::NeedKeyCB need_key_cb =
166 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this)); 166 base::Bind(&ChunkDemuxerTest::DemuxerNeedKey, base::Unretained(this));
167 demuxer_ = new ChunkDemuxer(open_cb, need_key_cb); 167 demuxer_ = new ChunkDemuxer(open_cb, need_key_cb, LogCB());
168 } 168 }
169 169
170 virtual ~ChunkDemuxerTest() { 170 virtual ~ChunkDemuxerTest() {
171 ShutdownDemuxer(); 171 ShutdownDemuxer();
172 } 172 }
173 173
174 void CreateInitSegment(bool has_audio, bool has_video, 174 void CreateInitSegment(bool has_audio, bool has_video,
175 bool is_audio_encrypted, bool is_video_encrypted, 175 bool is_audio_encrypted, bool is_video_encrypted,
176 scoped_array<uint8>* buffer, 176 scoped_array<uint8>* buffer,
177 int* size) { 177 int* size) {
(...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after
2428 2428
2429 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster()); 2429 scoped_ptr<Cluster> cluster_a(kDefaultFirstCluster());
2430 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size())); 2430 ASSERT_TRUE(AppendData(cluster_a->data(), cluster_a->size()));
2431 2431
2432 EXPECT_CALL(host_, SetDuration( 2432 EXPECT_CALL(host_, SetDuration(
2433 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp))); 2433 base::TimeDelta::FromMilliseconds(kDefaultFirstClusterEndTimestamp)));
2434 demuxer_->EndOfStream(PIPELINE_OK); 2434 demuxer_->EndOfStream(PIPELINE_OK);
2435 } 2435 }
2436 2436
2437 } // namespace media 2437 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/chunk_demuxer.cc ('k') | media/filters/pipeline_integration_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698