Shaka Packager SDK
Loading...
Searching...
No Matches
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 <cstddef>
9#include <cstdint>
10#include <functional>
11#include <string>
12
13#include <packager/macros/classes.h>
14#include <packager/media/formats/mp2t/ts_audio_type.h>
15#include <packager/media/formats/mp2t/ts_section_psi.h>
16#include <packager/media/formats/mp2t/ts_stream_type.h>
17
18namespace shaka {
19namespace media {
20namespace mp2t {
21
22class TsSectionPmt : public TsSectionPsi {
23 public:
24 // RegisterPesCb::Run(int pes_pid, int stream_type, uint32_t max_bitrate,
25 // const string& lang, TsAudioType audio_type, uint8_t* descriptor,
26 // size_t desriptor_size);
27 // Stream type is defined in
28 // "Table 2-34 – Stream type assignments" in H.222
29 // Audio type is defined in
30 // "Table 2-60 - Audio type values" in H.222
31 typedef std::function<void(int,
32 TsStreamType,
33 uint32_t,
34 const std::string&,
35 TsAudioType,
36 const uint8_t*,
37 size_t)>
38 RegisterPesCb;
39
40 explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
41 ~TsSectionPmt() override;
42
43 // Mpeg2TsPsiParser implementation.
44 bool ParsePsiSection(BitReader* bit_reader) override;
45 void ResetPsiSection() override;
46
47 private:
48 RegisterPesCb register_pes_cb_;
49
50 DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
51};
52
53} // namespace mp2t
54} // namespace media
55} // namespace shaka
56
57#endif
A class to read bit streams.
Definition bit_reader.h:19
All the methods that are virtual are virtual for mocking.