| 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 25 matching lines...) Expand all  Loading... | 
| 36   //     "NewSegment{ 0K 23K 46K }EndOfSegment" | 36   //     "NewSegment{ 0K 23K 46K }EndOfSegment" | 
| 37   //     "NewSegment{ 0K }{ 23K }{ 46K }EndOfSegment" | 37   //     "NewSegment{ 0K }{ 23K }{ 46K }EndOfSegment" | 
| 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, base::TimeDelta duration); | 46   void OnInitDone(bool success, | 
|  | 47                   base::TimeDelta duration, | 
|  | 48                   bool auto_update_timestamp_offset); | 
| 47   bool OnNewConfig(const AudioDecoderConfig& audio_config, | 49   bool OnNewConfig(const AudioDecoderConfig& audio_config, | 
| 48                    const VideoDecoderConfig& video_config, | 50                    const VideoDecoderConfig& video_config, | 
| 49                    const StreamParser::TextTrackConfigMap& text_config); | 51                    const StreamParser::TextTrackConfigMap& text_config); | 
| 50   bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, | 52   bool OnNewBuffers(const StreamParser::BufferQueue& audio_buffers, | 
| 51                     const StreamParser::BufferQueue& video_buffers, | 53                     const StreamParser::BufferQueue& video_buffers, | 
| 52                     const StreamParser::TextBufferQueueMap& text_map); | 54                     const StreamParser::TextBufferQueueMap& text_map); | 
| 53   void OnKeyNeeded(const std::string& type, | 55   void OnKeyNeeded(const std::string& type, | 
| 54                    const std::vector<uint8>& init_data); | 56                    const std::vector<uint8>& init_data); | 
| 55   void OnNewSegment(); | 57   void OnNewSegment(); | 
| 56   void OnEndOfSegment(); | 58   void OnEndOfSegment(); | 
| 57 | 59 | 
| 58   scoped_ptr<StreamParser> parser_; | 60   scoped_ptr<StreamParser> parser_; | 
| 59   std::stringstream results_stream_; | 61   std::stringstream results_stream_; | 
| 60 | 62 | 
| 61   DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); | 63   DISALLOW_COPY_AND_ASSIGN(StreamParserTestBase); | 
| 62 }; | 64 }; | 
| 63 | 65 | 
| 64 }  // namespace media | 66 }  // namespace media | 
| 65 | 67 | 
| 66 #endif  // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 68 #endif  // MEDIA_FORMATS_COMMON_STREAM_PARSER_TEST_BASE_H_ | 
| OLD | NEW | 
|---|