| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 size_t append_size = std::min(piece_size, static_cast<size_t>(end - start)); | 65 size_t append_size = std::min(piece_size, static_cast<size_t>(end - start)); |
| 66 if (!parser_->Parse(start, append_size)) | 66 if (!parser_->Parse(start, append_size)) |
| 67 return false; | 67 return false; |
| 68 start += append_size; | 68 start += append_size; |
| 69 } | 69 } |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 void StreamParserTestBase::OnInitDone(bool success, | 73 void StreamParserTestBase::OnInitDone(bool success, |
| 74 base::TimeDelta duration, | 74 base::TimeDelta duration, |
| 75 base::Time wallclock_timeline_offset, |
| 75 bool auto_update_timestamp_offset) { | 76 bool auto_update_timestamp_offset) { |
| 76 EXPECT_TRUE(auto_update_timestamp_offset); | 77 EXPECT_TRUE(auto_update_timestamp_offset); |
| 77 DVLOG(1) << __FUNCTION__ << "(" << success << ", " | 78 DVLOG(1) << __FUNCTION__ << "(" << success << ", " |
| 78 << duration.InMilliseconds() << ", " << auto_update_timestamp_offset | 79 << duration.InMilliseconds() << ", " << auto_update_timestamp_offset |
| 79 << ")"; | 80 << ")"; |
| 80 } | 81 } |
| 81 | 82 |
| 82 bool StreamParserTestBase::OnNewConfig( | 83 bool StreamParserTestBase::OnNewConfig( |
| 83 const AudioDecoderConfig& audio_config, | 84 const AudioDecoderConfig& audio_config, |
| 84 const VideoDecoderConfig& video_config, | 85 const VideoDecoderConfig& video_config, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 DVLOG(1) << __FUNCTION__; | 117 DVLOG(1) << __FUNCTION__; |
| 117 results_stream_ << "NewSegment"; | 118 results_stream_ << "NewSegment"; |
| 118 } | 119 } |
| 119 | 120 |
| 120 void StreamParserTestBase::OnEndOfSegment() { | 121 void StreamParserTestBase::OnEndOfSegment() { |
| 121 DVLOG(1) << __FUNCTION__; | 122 DVLOG(1) << __FUNCTION__; |
| 122 results_stream_ << "EndOfSegment"; | 123 results_stream_ << "EndOfSegment"; |
| 123 } | 124 } |
| 124 | 125 |
| 125 } // namespace media | 126 } // namespace media |
| OLD | NEW |