| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/formats/common/stream_parser_test_base.h" | 5 #include "media/formats/common/stream_parser_test_base.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "media/base/test_data_util.h" | 8 #include "media/base/test_data_util.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (!parser_->Parse(start, append_size)) | 68 if (!parser_->Parse(start, append_size)) |
| 69 return false; | 69 return false; |
| 70 start += append_size; | 70 start += append_size; |
| 71 } | 71 } |
| 72 return true; | 72 return true; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void StreamParserTestBase::OnInitDone(bool success, | 75 void StreamParserTestBase::OnInitDone(bool success, |
| 76 base::TimeDelta duration, | 76 base::TimeDelta duration, |
| 77 base::Time wallclock_timeline_offset, | 77 base::Time wallclock_timeline_offset, |
| 78 bool auto_update_timestamp_offset) { | 78 bool auto_update_timestamp_offset, |
| 79 bool live_mode) { |
| 79 EXPECT_TRUE(auto_update_timestamp_offset); | 80 EXPECT_TRUE(auto_update_timestamp_offset); |
| 80 DVLOG(1) << __FUNCTION__ << "(" << success << ", " | 81 DVLOG(1) << __FUNCTION__ << "(" << success << ", " |
| 81 << duration.InMilliseconds() << ", " << auto_update_timestamp_offset | 82 << duration.InMilliseconds() << ", " << auto_update_timestamp_offset |
| 82 << ")"; | 83 << ", " << live_mode << ")"; |
| 83 } | 84 } |
| 84 | 85 |
| 85 bool StreamParserTestBase::OnNewConfig( | 86 bool StreamParserTestBase::OnNewConfig( |
| 86 const AudioDecoderConfig& audio_config, | 87 const AudioDecoderConfig& audio_config, |
| 87 const VideoDecoderConfig& video_config, | 88 const VideoDecoderConfig& video_config, |
| 88 const StreamParser::TextTrackConfigMap& text_config) { | 89 const StreamParser::TextTrackConfigMap& text_config) { |
| 89 DVLOG(1) << __FUNCTION__ << "(" << audio_config.IsValidConfig() << ", " | 90 DVLOG(1) << __FUNCTION__ << "(" << audio_config.IsValidConfig() << ", " |
| 90 << video_config.IsValidConfig() << ")"; | 91 << video_config.IsValidConfig() << ")"; |
| 91 EXPECT_TRUE(audio_config.IsValidConfig()); | 92 EXPECT_TRUE(audio_config.IsValidConfig()); |
| 92 EXPECT_FALSE(video_config.IsValidConfig()); | 93 EXPECT_FALSE(video_config.IsValidConfig()); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 120 DVLOG(1) << __FUNCTION__; | 121 DVLOG(1) << __FUNCTION__; |
| 121 results_stream_ << "NewSegment"; | 122 results_stream_ << "NewSegment"; |
| 122 } | 123 } |
| 123 | 124 |
| 124 void StreamParserTestBase::OnEndOfSegment() { | 125 void StreamParserTestBase::OnEndOfSegment() { |
| 125 DVLOG(1) << __FUNCTION__; | 126 DVLOG(1) << __FUNCTION__; |
| 126 results_stream_ << "EndOfSegment"; | 127 results_stream_ << "EndOfSegment"; |
| 127 } | 128 } |
| 128 | 129 |
| 129 } // namespace media | 130 } // namespace media |
| OLD | NEW |