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 <sstream> | 8 #include <sstream> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 // Assume the offsets are known, compute the size of each packet. | 58 // Assume the offsets are known, compute the size of each packet. |
59 // The last packet is assumed to cover the end of the stream. | 59 // The last packet is assumed to cover the end of the stream. |
60 // Packets are assumed to be in stream order. | 60 // Packets are assumed to be in stream order. |
61 void ComputePacketSize(std::vector<Packet>* packets); | 61 void ComputePacketSize(std::vector<Packet>* packets); |
62 | 62 |
63 // Generate some fixed size PES packets of |stream_|. | 63 // Generate some fixed size PES packets of |stream_|. |
64 std::vector<Packet> GenerateFixedSizePesPacket(size_t pes_size); | 64 std::vector<Packet> GenerateFixedSizePesPacket(size_t pes_size); |
65 | 65 |
66 // ES stream. | 66 // ES stream. |
67 std::vector<uint8> stream_; | 67 std::vector<uint8_t> stream_; |
68 | 68 |
69 // Number of decoder configs received from the ES parser. | 69 // Number of decoder configs received from the ES parser. |
70 size_t config_count_; | 70 size_t config_count_; |
71 | 71 |
72 // Number of buffers generated while parsing the ES stream. | 72 // Number of buffers generated while parsing the ES stream. |
73 size_t buffer_count_; | 73 size_t buffer_count_; |
74 | 74 |
75 // Timestamps of buffers generated while parsing the ES stream. | 75 // Timestamps of buffers generated while parsing the ES stream. |
76 std::string buffer_timestamps_; | 76 std::string buffer_timestamps_; |
77 | 77 |
78 private: | 78 private: |
79 // Timestamps of buffers generated while parsing the ES stream. | 79 // Timestamps of buffers generated while parsing the ES stream. |
80 std::stringstream buffer_timestamps_stream_; | 80 std::stringstream buffer_timestamps_stream_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase); | 82 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase); |
83 }; | 83 }; |
84 | 84 |
85 } // namespace mp2t | 85 } // namespace mp2t |
86 } // namespace media | 86 } // namespace media |
87 | 87 |
88 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ | 88 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ |
OLD | NEW |