summaryrefslogtreecommitdiffstats
path: root/media/formats/mp2t/ts_section_pmt.h
blob: 6c82d78ff655c5ab226c5766247f6768f9a749b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_
#define MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_

#include "base/callback.h"
#include "base/compiler_specific.h"
#include "media/formats/mp2t/ts_section_psi.h"

namespace media {
namespace mp2t {

class TsSectionPmt : public TsSectionPsi {
 public:
  // RegisterPesCb::Run(int pes_pid, int stream_type);
  // Stream type is defined in
  // "Table 2-34 – Stream type assignments" in H.222
  // TODO(damienv): add the program number.
  typedef base::Callback<void(int, int)> RegisterPesCb;

  explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
  ~TsSectionPmt() override;

  // Mpeg2TsPsiParser implementation.
  bool ParsePsiSection(BitReader* bit_reader) override;
  void ResetPsiSection() override;

 private:
  RegisterPesCb register_pes_cb_;

  DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
};

}  // namespace mp2t
}  // namespace media

#endif