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_PSI_H_
6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PSI_H_
8 #include "base/compiler_specific.h"
9 #include "media/base/byte_queue.h"
10 #include "media/formats/mp2t/ts_section.h"
18 class TsSectionPsi
: public TsSection
{
21 virtual ~TsSectionPsi();
23 // TsSection implementation.
24 virtual bool Parse(bool payload_unit_start_indicator
,
25 const uint8
* buf
, int size
) OVERRIDE
;
26 virtual void Flush() OVERRIDE
;
27 virtual void Reset() OVERRIDE
;
29 // Parse the content of the PSI section.
30 virtual bool ParsePsiSection(BitReader
* bit_reader
) = 0;
32 // Reset the state of the PSI section.
33 virtual void ResetPsiSection() = 0;
38 // Bytes of the current PSI.
39 ByteQueue psi_byte_queue_
;
41 // Do not start parsing before getting a unit start indicator.
44 // Number of leading bytes to discard (pointer field).
45 int leading_bytes_to_discard_
;
47 DISALLOW_COPY_AND_ASSIGN(TsSectionPsi
);