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.
5 #ifndef MEDIA_FORMATS_MP2T_TS_SECTION_H_
6 #define MEDIA_FORMATS_MP2T_TS_SECTION_H_
13 // From ISO/IEC 13818-1 or ITU H.222 spec: Table 2-3 - PID table.
18 kPidNullPacket
= 0x1fff,
22 virtual ~TsSection() {}
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;
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;
33 // Reset the state of the parser to its initial state.
34 virtual void Reset() = 0;