| 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_MP2T_ES_PARSER_TEST_BASE_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ |
| 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Timestamp of the packet. | 38 // Timestamp of the packet. |
| 39 base::TimeDelta pts; | 39 base::TimeDelta pts; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 EsParserTestBase(); | 42 EsParserTestBase(); |
| 43 virtual ~EsParserTestBase(); | 43 virtual ~EsParserTestBase(); |
| 44 | 44 |
| 45 protected: | 45 protected: |
| 46 void LoadStream(const char* filename); | 46 void LoadStream(const char* filename); |
| 47 std::vector<Packet> LoadPacketsFromFiles(const char* file_temp, size_t num); |
| 47 | 48 |
| 48 // ES parser callbacks. | 49 // ES parser callbacks. |
| 49 void NewAudioConfig(const AudioDecoderConfig& config); | 50 void NewAudioConfig(const AudioDecoderConfig& config); |
| 50 void NewVideoConfig(const VideoDecoderConfig& config); | 51 void NewVideoConfig(const VideoDecoderConfig& config); |
| 51 void EmitBuffer(scoped_refptr<StreamParserBuffer> buffer); | 52 void EmitBuffer(scoped_refptr<StreamParserBuffer> buffer); |
| 52 | 53 |
| 53 // Process the PES packets using the given ES parser. | 54 // Process the PES packets using the given ES parser. |
| 54 // When |force_timing| is true, even the invalid negative timestamps will be | 55 // When |force_timing| is true, even the invalid negative timestamps will be |
| 55 // given to the ES parser. | 56 // given to the ES parser. |
| 56 // Return true if successful, false otherwise. | 57 // Return true if successful, false otherwise. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 82 // Timestamps of buffers generated while parsing the ES stream. | 83 // Timestamps of buffers generated while parsing the ES stream. |
| 83 std::stringstream buffer_timestamps_stream_; | 84 std::stringstream buffer_timestamps_stream_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase); | 86 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace mp2t | 89 } // namespace mp2t |
| 89 } // namespace media | 90 } // namespace media |
| 90 | 91 |
| 91 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ | 92 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ |
| OLD | NEW |