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

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

Issue 178153004: Enable round-tripping and updating of WebSourceBufferImpl timestamp offset (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address PS3 comments Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 if (expected_status == PIPELINE_OK) 484 if (expected_status == PIPELINE_OK)
485 expected_duration = kDefaultDuration(); 485 expected_duration = kDefaultDuration();
486 486
487 EXPECT_CALL(*this, DemuxerOpened()); 487 EXPECT_CALL(*this, DemuxerOpened());
488 demuxer_->Initialize( 488 demuxer_->Initialize(
489 &host_, CreateInitDoneCB(expected_duration, expected_status), true); 489 &host_, CreateInitDoneCB(expected_duration, expected_status), true);
490 490
491 if (AddId(kSourceId, stream_flags) != ChunkDemuxer::kOk) 491 if (AddId(kSourceId, stream_flags) != ChunkDemuxer::kOk)
492 return false; 492 return false;
493 493
494 EXPECT_EQ(kNoTimestamp(), demuxer_->GetUpdatedTimestampOffset(kSourceId));
495
494 AppendInitSegmentWithEncryptedInfo( 496 AppendInitSegmentWithEncryptedInfo(
495 kSourceId, stream_flags, 497 kSourceId, stream_flags,
496 is_audio_encrypted, is_video_encrypted); 498 is_audio_encrypted, is_video_encrypted);
497 return true; 499 return true;
498 } 500 }
499 501
500 bool InitDemuxerAudioAndVideoSourcesText(const std::string& audio_id, 502 bool InitDemuxerAudioAndVideoSourcesText(const std::string& audio_id,
501 const std::string& video_id, 503 const std::string& video_id,
502 bool has_text) { 504 bool has_text) {
503 EXPECT_CALL(*this, DemuxerOpened()); 505 EXPECT_CALL(*this, DemuxerOpened());
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 // NOTE: we start at 175 here because the buffer at 125 was returned 3144 // NOTE: we start at 175 here because the buffer at 125 was returned
3143 // to the pending read initiated above. 3145 // to the pending read initiated above.
3144 CheckExpectedBuffers(text_stream, "175 225"); 3146 CheckExpectedBuffers(text_stream, "175 225");
3145 3147
3146 // Verify that audio & video streams contiue to return expected values. 3148 // Verify that audio & video streams contiue to return expected values.
3147 CheckExpectedBuffers(audio_stream, "160 180"); 3149 CheckExpectedBuffers(audio_stream, "160 180");
3148 CheckExpectedBuffers(video_stream, "180 210"); 3150 CheckExpectedBuffers(video_stream, "180 210");
3149 } 3151 }
3150 3152
3151 } // namespace media 3153 } // namespace media
OLDNEW
« media/filters/chunk_demuxer.cc ('K') | « media/filters/chunk_demuxer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698