Shaka Packager SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
ts_section_pmt.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 MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_
6 #define MEDIA_FORMATS_MP2T_TS_SECTION_PMT_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 TsSectionPmt : public TsSectionPsi {
17  public:
18  // RegisterPesCb::Run(int pes_pid, int stream_type);
19  // Stream type is defined in
20  // "Table 2-34 – Stream type assignments" in H.222
21  typedef base::Callback<void(int, int)> RegisterPesCb;
22 
23  explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
24  ~TsSectionPmt() override;
25 
26  // Mpeg2TsPsiParser implementation.
27  bool ParsePsiSection(BitReader* bit_reader) override;
28  void ResetPsiSection() override;
29 
30  private:
31  RegisterPesCb register_pes_cb_;
32 
33  DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
34 };
35 
36 } // namespace mp2t
37 } // namespace media
38 } // namespace shaka
39 
40 #endif
A class to read bit streams.
Definition: bit_reader.h:17