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