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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // The last AudioDecoderConfig handed to OnNewConfig(). | 46 // The last AudioDecoderConfig handed to OnNewConfig(). |
47 const AudioDecoderConfig& last_audio_config() const { | 47 const AudioDecoderConfig& last_audio_config() const { |
48 return last_audio_config_; | 48 return last_audio_config_; |
49 } | 49 } |
50 | 50 |
51 private: | 51 private: |
52 bool AppendDataInPieces(const uint8* data, size_t length, size_t piece_size); | 52 bool AppendDataInPieces(const uint8* data, size_t length, size_t piece_size); |
53 void OnInitDone(bool success, | 53 void OnInitDone(bool success, |
54 base::TimeDelta duration, | 54 base::TimeDelta duration, |
55 base::Time wallclock_timeline_offset, | 55 base::Time wallclock_timeline_offset, |
56 bool auto_update_timestamp_offset); | 56 bool auto_update_timestamp_offset, |
| 57 bool live_mode); |
57 bool OnNewConfig(const AudioDecoderConfig& audio_config, | 58 bool OnNewConfig(const AudioDecoderConfig& audio_config, |
58 const VideoDecoderConfig& video_config, | 59 const VideoDecoderConfig& video_config, |
59 const StreamParser::TextTrackConfigMap& text_config); | 60 const StreamParser::TextTrackConfigMap& text_config); |
60 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, | 61 bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, |
61 const StreamParser::BufferQueue& video_buffers, | 62 const StreamParser::BufferQueue& video_buffers, |
62 const StreamParser::TextBufferQueueMap& text_map); | 63 const StreamParser::TextBufferQueueMap& text_map); |
63 void OnKeyNeeded(const std::string& type, | 64 void OnKeyNeeded(const std::string& type, |
64 const std::vector<uint8>& init_data); | 65 const std::vector<uint8>& init_data); |
65 void OnNewSegment(); | 66 void OnNewSegment(); |
66 void OnEndOfSegment(); | 67 void OnEndOfSegment(); |
67 | 68 |
68 scoped_ptr<StreamParser> parser_; | 69 scoped_ptr<StreamParser> parser_; |
69 std::stringstream results_stream_; | 70 std::stringstream results_stream_; |
70 AudioDecoderConfig last_audio_config_; | 71 AudioDecoderConfig last_audio_config_; |
71 | 72 |
72 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); | 73 DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); |
73 }; | 74 }; |
74 | 75 |
75 } // namespace media | 76 } // namespace media |
76 | 77 |
77 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 78 #endif // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ |
OLD | NEW |