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

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

Issue 399433003: Mpeg2 TS - Fail when no valid timestamp in the ADTS parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update ComputePacketSize prototype. Created 6 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_TEST_HELPER_H_
6 #define MEDIA_FORMATS_MP2T_ES_PARSER_TEST_HELPER_H_
7
8 #include <vector>
9
10 #include "base/time/time.h"
11
12 namespace media {
13 namespace mp2t {
14 class EsParser;
15
16 struct Packet {
17 Packet();
18
19 // Offset in the stream.
20 size_t offset;
21
22 // Size of the packet.
23 size_t size;
24
25 // Timestamp of the packet.
26 base::TimeDelta pts;
27 };
28
29 // Compute the size of each packet assuming packets are given in stream order
30 // and the last packet covers the end of the stream.
31 void ComputePacketSize(std::vector<Packet>* packets, size_t stream_size);
wolenetz 2014/07/16 00:21:04 Hmm. I'm not absolutely sure of convention here, b
wolenetz 2014/07/16 00:32:28 nit: s/* packets/* const packets/ ?
damienv1 2014/07/16 02:34:34 I reversed the 2 arguments.
wolenetz 2014/07/16 20:35:30 I don't see this reversal of arguments in PS10.
wolenetz 2014/07/16 20:35:30 never mind. I don't see * const for vectors anywhe
32
33 // Process the PES packets.
34 // When |force_timing| is true, even the invalid negative timestamps will be
35 // given to the ES parser.
36 // Return true if successful, false otherwise.
37 bool ProcessPesPackets(
38 EsParser* es_parser,
39 const std::vector<uint8>& stream,
40 const std::vector<Packet>& pes_packets,
41 bool force_timing);
42
43 } // namespace mp2t
44 } // namespace media
45
46 #endif // MEDIA_FORMATS_MP2T_ES_PARSER_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698