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 #ifndef MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 5 #ifndef MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ |
6 #define MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 6 #define MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "media/base/audio_decoder_config.h" | 9 #include "media/base/audio_decoder_config.h" |
10 #include "media/base/stream_parser.h" | 10 #include "media/base/stream_parser.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // "NewSegment{ 0K }{ 23K }EndOfSegmentNewSegment{ 46K }EndOfSegment" | 38 // "NewSegment{ 0K }{ 23K }EndOfSegmentNewSegment{ 46K }EndOfSegment" |
39 // | 39 // |
40 std::string ParseFile(const std::string& filename, int append_bytes); | 40 std::string ParseFile(const std::string& filename, int append_bytes); |
41 | 41 |
42 private: | 42 private: |
43 void InitializeParser(); | 43 void InitializeParser(); |
44 bool AppendDataInPieces(const uint8* data, size_t length, size_t piece_size); | 44 bool AppendDataInPieces(const uint8* data, size_t length, size_t piece_size); |
45 | 45 |
46 void OnInitDone(bool success, | 46 void OnInitDone(bool success, |
47 base::TimeDelta duration, | 47 base::TimeDelta duration, |
| 48 base::Time wallclock_timeline_offset, |
48 bool auto_update_timestamp_offset); | 49 bool auto_update_timestamp_offset); |
49 bool OnNewConfig(const AudioDecoderConfig& audio_config, | 50 bool OnNewConfig(const AudioDecoderConfig& audio_config, |
50 const VideoDecoderConfig& video_config, | 51 const VideoDecoderConfig& video_config, |
51 const StreamParser::TextTrackConfigMap& text_config); | 52 const StreamParser::TextTrackConfigMap& text_config); |
52 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, | 53 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, |
53 const StreamParser::BufferQueue& video_buffers, | 54 const StreamParser::BufferQueue& video_buffers, |
54 const StreamParser::TextBufferQueueMap& text_map); | 55 const StreamParser::TextBufferQueueMap& text_map); |
55 void OnKeyNeeded(const std::string& type, | 56 void OnKeyNeeded(const std::string& type, |
56 const std::vector<uint8>& init_data); | 57 const std::vector<uint8>& init_data); |
57 void OnNewSegment(); | 58 void OnNewSegment(); |
58 void OnEndOfSegment(); | 59 void OnEndOfSegment(); |
59 | 60 |
60 scoped_ptr<StreamParser> parser_; | 61 scoped_ptr<StreamParser> parser_; |
61 std::stringstream results_stream_; | 62 std::stringstream results_stream_; |
62 | 63 |
63 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); | 64 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); |
64 }; | 65 }; |
65 | 66 |
66 } // namespace media | 67 } // namespace media |
67 | 68 |
68 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 69 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ |
OLD | NEW |