Shaka Packager SDK
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 PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_
6 #define PACKAGER_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 #include "packager/media/formats/mp2t/ts_stream_type.h"
12 
13 namespace shaka {
14 namespace media {
15 namespace mp2t {
16 
17 class TsSectionPmt : public TsSectionPsi {
18  public:
19  // RegisterPesCb::Run(int pes_pid, int stream_type);
20  // Stream type is defined in
21  // "Table 2-34 – Stream type assignments" in H.222
22  typedef base::Callback<void(int, TsStreamType, const uint8_t*, size_t)>
23  RegisterPesCb;
24 
25  explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
26  ~TsSectionPmt() override;
27 
28  // Mpeg2TsPsiParser implementation.
29  bool ParsePsiSection(BitReader* bit_reader) override;
30  void ResetPsiSection() override;
31 
32  private:
33  RegisterPesCb register_pes_cb_;
34 
35  DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
36 };
37 
38 } // namespace mp2t
39 } // namespace media
40 } // namespace shaka
41 
42 #endif
A class to read bit streams.
Definition: bit_reader.h:17
All the methods that are virtual are virtual for mocking.