| OLD | NEW |
| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 chunk_demuxer_->AppendData(kSourceId, pData, size, append_window_start, | 533 chunk_demuxer_->AppendData(kSourceId, pData, size, append_window_start, |
| 534 append_window_end, ×tamp_offset)); | 534 append_window_end, ×tamp_offset)); |
| 535 last_timestamp_offset_ = timestamp_offset; | 535 last_timestamp_offset_ = timestamp_offset; |
| 536 } | 536 } |
| 537 | 537 |
| 538 void SetMemoryLimits(size_t limit_bytes) { | 538 void SetMemoryLimits(size_t limit_bytes) { |
| 539 chunk_demuxer_->SetMemoryLimitsForTest(DemuxerStream::AUDIO, limit_bytes); | 539 chunk_demuxer_->SetMemoryLimitsForTest(DemuxerStream::AUDIO, limit_bytes); |
| 540 chunk_demuxer_->SetMemoryLimitsForTest(DemuxerStream::VIDEO, limit_bytes); | 540 chunk_demuxer_->SetMemoryLimitsForTest(DemuxerStream::VIDEO, limit_bytes); |
| 541 } | 541 } |
| 542 | 542 |
| 543 void EvictCodedFrames(base::TimeDelta currentMediaTime, size_t newDataSize) { | 543 void EvictCodedFrames(base::TimeDelta currentMediaTime, size_t evict_size) { |
| 544 chunk_demuxer_->EvictCodedFrames(kSourceId, currentMediaTime, newDataSize); | 544 chunk_demuxer_->EvictCodedFrames(kSourceId, currentMediaTime, evict_size); |
| 545 } | 545 } |
| 546 | 546 |
| 547 void RemoveRange(base::TimeDelta start, base::TimeDelta end) { | 547 void RemoveRange(base::TimeDelta start, base::TimeDelta end) { |
| 548 chunk_demuxer_->Remove(kSourceId, start, end); | 548 chunk_demuxer_->Remove(kSourceId, start, end); |
| 549 } | 549 } |
| 550 | 550 |
| 551 void EndOfStream() { chunk_demuxer_->MarkEndOfStream(PIPELINE_OK); } | 551 void EndOfStream() { chunk_demuxer_->MarkEndOfStream(PIPELINE_OK); } |
| 552 | 552 |
| 553 void Shutdown() { | 553 void Shutdown() { |
| 554 if (!chunk_demuxer_) | 554 if (!chunk_demuxer_) |
| (...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2552 | 2552 |
| 2553 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { | 2553 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { |
| 2554 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); | 2554 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); |
| 2555 Play(); | 2555 Play(); |
| 2556 ASSERT_TRUE(WaitUntilOnEnded()); | 2556 ASSERT_TRUE(WaitUntilOnEnded()); |
| 2557 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), | 2557 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), |
| 2558 demuxer_->GetStartTime()); | 2558 demuxer_->GetStartTime()); |
| 2559 } | 2559 } |
| 2560 | 2560 |
| 2561 } // namespace media | 2561 } // namespace media |
| OLD | NEW |