2014-04-01 01:34:59 +00:00
|
|
|
|
// 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.
|
|
|
|
|
|
2017-12-20 00:56:36 +00:00
|
|
|
|
#ifndef PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_
|
|
|
|
|
#define PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PMT_H_
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
|
#include <functional>
|
2024-02-08 19:58:26 +00:00
|
|
|
|
#include <string>
|
2023-12-01 17:32:19 +00:00
|
|
|
|
|
|
|
|
|
#include <packager/macros/classes.h>
|
2024-02-08 19:58:26 +00:00
|
|
|
|
#include <packager/media/formats/mp2t/ts_audio_type.h>
|
2023-12-01 17:32:19 +00:00
|
|
|
|
#include <packager/media/formats/mp2t/ts_section_psi.h>
|
|
|
|
|
#include <packager/media/formats/mp2t/ts_stream_type.h>
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
|
namespace shaka {
|
2014-04-01 01:34:59 +00:00
|
|
|
|
namespace media {
|
|
|
|
|
namespace mp2t {
|
|
|
|
|
|
|
|
|
|
class TsSectionPmt : public TsSectionPsi {
|
|
|
|
|
public:
|
2024-02-08 19:58:26 +00:00
|
|
|
|
// RegisterPesCb::Run(int pes_pid, int stream_type, uint32_t max_bitrate,
|
|
|
|
|
// const string& lang, TsAudioType audio_type, uint8_t* descriptor,
|
|
|
|
|
// size_t desriptor_size);
|
2014-04-01 01:34:59 +00:00
|
|
|
|
// Stream type is defined in
|
|
|
|
|
// "Table 2-34 – Stream type assignments" in H.222
|
2024-02-08 19:58:26 +00:00
|
|
|
|
// Audio type is defined in
|
|
|
|
|
// "Table 2-60 - Audio type values" in H.222
|
|
|
|
|
typedef std::function<void(int,
|
|
|
|
|
TsStreamType,
|
|
|
|
|
uint32_t,
|
|
|
|
|
const std::string&,
|
|
|
|
|
TsAudioType,
|
|
|
|
|
const uint8_t*,
|
|
|
|
|
size_t)>
|
2020-12-11 20:58:26 +00:00
|
|
|
|
RegisterPesCb;
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
|
|
explicit TsSectionPmt(const RegisterPesCb& register_pes_cb);
|
2015-07-22 23:40:45 +00:00
|
|
|
|
~TsSectionPmt() override;
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
|
|
// Mpeg2TsPsiParser implementation.
|
2015-07-22 23:40:45 +00:00
|
|
|
|
bool ParsePsiSection(BitReader* bit_reader) override;
|
|
|
|
|
void ResetPsiSection() override;
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
RegisterPesCb register_pes_cb_;
|
|
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(TsSectionPmt);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace mp2t
|
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
|
} // namespace shaka
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
|
|
#endif
|