| 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 "media/filters/source_buffer_stream.h" | 5 #include "media/filters/source_buffer_stream.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 void CheckAudioConfig(const AudioDecoderConfig& config) { | 416 void CheckAudioConfig(const AudioDecoderConfig& config) { |
| 417 const AudioDecoderConfig& actual = stream_->GetCurrentAudioDecoderConfig(); | 417 const AudioDecoderConfig& actual = stream_->GetCurrentAudioDecoderConfig(); |
| 418 EXPECT_TRUE(actual.Matches(config)) | 418 EXPECT_TRUE(actual.Matches(config)) |
| 419 << "Expected: " << config.AsHumanReadableString() | 419 << "Expected: " << config.AsHumanReadableString() |
| 420 << "\nActual: " << actual.AsHumanReadableString(); | 420 << "\nActual: " << actual.AsHumanReadableString(); |
| 421 } | 421 } |
| 422 | 422 |
| 423 base::TimeDelta frame_duration() const { return frame_duration_; } | 423 base::TimeDelta frame_duration() const { return frame_duration_; } |
| 424 | 424 |
| 425 scoped_ptr<SourceBufferStream> stream_; | 425 std::unique_ptr<SourceBufferStream> stream_; |
| 426 VideoDecoderConfig video_config_; | 426 VideoDecoderConfig video_config_; |
| 427 AudioDecoderConfig audio_config_; | 427 AudioDecoderConfig audio_config_; |
| 428 scoped_refptr<StrictMock<MockMediaLog>> media_log_; | 428 scoped_refptr<StrictMock<MockMediaLog>> media_log_; |
| 429 | 429 |
| 430 private: | 430 private: |
| 431 base::TimeDelta ConvertToFrameDuration(int frames_per_second) { | 431 base::TimeDelta ConvertToFrameDuration(int frames_per_second) { |
| 432 return base::TimeDelta::FromMicroseconds( | 432 return base::TimeDelta::FromMicroseconds( |
| 433 base::Time::kMicrosecondsPerSecond / frames_per_second); | 433 base::Time::kMicrosecondsPerSecond / frames_per_second); |
| 434 } | 434 } |
| 435 | 435 |
| (...skipping 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4795 CheckNoNextBuffer(); | 4795 CheckNoNextBuffer(); |
| 4796 } | 4796 } |
| 4797 | 4797 |
| 4798 // TODO(vrk): Add unit tests where keyframes are unaligned between streams. | 4798 // TODO(vrk): Add unit tests where keyframes are unaligned between streams. |
| 4799 // (crbug.com/133557) | 4799 // (crbug.com/133557) |
| 4800 | 4800 |
| 4801 // TODO(vrk): Add unit tests with end of stream being called at interesting | 4801 // TODO(vrk): Add unit tests with end of stream being called at interesting |
| 4802 // times. | 4802 // times. |
| 4803 | 4803 |
| 4804 } // namespace media | 4804 } // namespace media |
| OLD | NEW |