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

Side by Side Diff: media/mp2t/ts_section.h

Issue 23566013: Mpeg2 TS stream parser for media source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup - address comments from patch set #8 Created 7 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
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_MP2T_TS_SECTION_H_
6 #define MEDIA_MP2T_TS_SECTION_H_
7
8 namespace media {
9 namespace mp2t {
10
11 class TsSection {
12 public:
13 // From ISO/IEC 13818-1 or ITU H.222 spec: Table 2-3 - PID table.
14 enum SpecialPid {
15 kPidPat = 0x0,
16 kPidCat = 0x1,
17 kPidTsdt = 0x2,
18 kPidNullPacket = 0x1fff,
19 kPidMax = 0x1fff,
20 };
21
22 virtual ~TsSection() {}
23
24 // Parse the data bytes of the TS packet.
25 // Return true if parsing is successful.
26 virtual bool Parse(bool payload_unit_start_indicator,
27 const uint8* buf, int size) = 0;
28
29 // Process bytes that have not been processed yet (pending buffers in the
30 // pipe). Flush might thus results in frame emission, as an example.
31 virtual void Flush() = 0;
32
33 // Reset the state of the parser to its initial state.
34 virtual void Reset() = 0;
35 };
36
37 } // namespace mp2t
38 } // namespace media
39
40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698