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

Unified Diff: media/filters/pipeline_integration_test.cc

Issue 10164017: Implement sourceAddId() & sourceRemoveId() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments Created 8 years, 8 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
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/pipeline_integration_test.cc
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index cfcbf87bd619dc29c1d143923511630e4eee73d4..8be0aff53134274171328380536167147c959568 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -14,6 +14,9 @@ namespace media {
static const unsigned char kKeyId[] =
"\x11\xa5\x18\x37\xc4\x73\x84\x03\xe5\xe6\x57\xed\x8e\x06\xd9\x7c";
+static const char* kSourceId = "SourceId";
+static const char* kDefaultSourceType = "video/webm; codecs=\"vp8, vorbis\"";
+
// Helper class that emulates calls made on the ChunkDemuxer by the
// Media Source API.
class MockMediaSource : public ChunkDemuxerClient {
@@ -46,7 +49,9 @@ class MockMediaSource : public ChunkDemuxerClient {
DCHECK(chunk_demuxer_.get());
DCHECK_LT(current_position_, file_data_size_);
DCHECK_LE(current_position_ + size, file_data_size_);
- chunk_demuxer_->AppendData(file_data_.get() + current_position_, size);
+ CHECK(chunk_demuxer_->AppendData(kSourceId,
+ file_data_.get() + current_position_,
+ size));
current_position_ += size;
}
@@ -63,6 +68,7 @@ class MockMediaSource : public ChunkDemuxerClient {
// ChunkDemuxerClient methods.
virtual void DemuxerOpened(ChunkDemuxer* demuxer) {
chunk_demuxer_ = demuxer;
+ chunk_demuxer_->AddId(kSourceId, kDefaultSourceType);
AppendData(initial_append_size_);
}
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | webkit/media/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698