Shaka Packager SDK
ts_section_pat.h
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 PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PAT_H_
6 #define PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PAT_H_
7 
8 #include "packager/base/callback.h"
9 #include "packager/base/compiler_specific.h"
10 #include "packager/media/formats/mp2t/ts_section_psi.h"
11 
12 namespace shaka {
13 namespace media {
14 namespace mp2t {
15 
16 class TsSectionPat : public TsSectionPsi {
17  public:
18  // RegisterPmtCb::Run(int program_number, int pmt_pid);
19  typedef base::Callback<void(int, int)> RegisterPmtCb;
20 
21  explicit TsSectionPat(const RegisterPmtCb& register_pmt_cb);
22  ~TsSectionPat() override;
23 
24  // TsSectionPsi implementation.
25  bool ParsePsiSection(BitReader* bit_reader) override;
26  void ResetPsiSection() override;
27 
28  private:
29  RegisterPmtCb register_pmt_cb_;
30 
31  // Parameters from the PAT.
32  int version_number_;
33 
34  DISALLOW_COPY_AND_ASSIGN(TsSectionPat);
35 };
36 
37 } // namespace mp2t
38 } // namespace media
39 } // namespace shaka
40 
41 #endif
42 
shaka::media::mp2t::TsSectionPat
Definition: ts_section_pat.h:16
shaka::media::mp2t::TsSectionPsi
Definition: ts_section_psi.h:19
shaka
All the methods that are virtual are virtual for mocking.
Definition: gflags_hex_bytes.cc:11
shaka::media::BitReader
A class to read bit streams.
Definition: bit_reader.h:17