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