DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs
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 MEDIA_FORMATS_MP2T_TS_SECTION_PAT_H_
6 #define 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 edash_packager {
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  virtual ~TsSectionPat();
23 
24  // TsSectionPsi implementation.
25  virtual bool ParsePsiSection(BitReader* bit_reader) OVERRIDE;
26  virtual 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 edash_packager
40 
41 #endif
42 
A class to read bit streams.
Definition: bit_reader.h:17