Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(578)

Side by Side Diff: media/formats/mp2t/es_parser_test_base.h

Issue 506943003: Support MPEG1 audio in the MPEG2-TS stream parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address CR comments from patch set #5. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 // Return true if successful, false otherwise. 53 // Return true if successful, false otherwise.
54 bool ProcessPesPackets(EsParser* es_parser, 54 bool ProcessPesPackets(EsParser* es_parser,
55 const std::vector<Packet>& pes_packets, 55 const std::vector<Packet>& pes_packets,
56 bool force_timing); 56 bool force_timing);
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_|.
64 std::vector<Packet> GenerateFixedSizePesPacket(size_t pes_size);
65
63 // ES stream. 66 // ES stream.
64 std::vector<uint8> stream_; 67 std::vector<uint8> stream_;
65 68
66 // Number of decoder configs received from the ES parser. 69 // Number of decoder configs received from the ES parser.
67 size_t config_count_; 70 size_t config_count_;
68 71
69 // Number of buffers generated while parsing the ES stream. 72 // Number of buffers generated while parsing the ES stream.
70 size_t buffer_count_; 73 size_t buffer_count_;
71 74
72 // Timestamps of buffers generated while parsing the ES stream. 75 // Timestamps of buffers generated while parsing the ES stream.
73 std::string buffer_timestamps_; 76 std::string buffer_timestamps_;
74 77
75 private: 78 private:
76 // Timestamps of buffers generated while parsing the ES stream. 79 // Timestamps of buffers generated while parsing the ES stream.
77 std::stringstream buffer_timestamps_stream_; 80 std::stringstream buffer_timestamps_stream_;
78 81
79 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase); 82 DISALLOW_COPY_AND_ASSIGN(EsParserTestBase);
80 }; 83 };
81 84
82 } // namespace mp2t 85 } // namespace mp2t
83 } // namespace media 86 } // namespace media
84 87
85 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_ 88 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_BASE_H_
OLDNEW
« no previous file with comments | « media/formats/mp2t/es_parser_mpeg1audio_unittest.cc ('k') | media/formats/mp2t/es_parser_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698