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
|
|
|
|
|
2014-10-01 22:10:21 +00:00
|
|
|
|
#include "packager/base/callback.h"
|
|
|
|
|
#include "packager/base/compiler_specific.h"
|
|
|
|
|
#include "packager/media/formats/mp2t/ts_section_psi.h"
|
2021-01-25 20:16:32 +00:00
|
|
|
|
#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:
|
|
|
|
|
// RegisterPesCb::Run(int pes_pid, int stream_type);
|
|
|
|
|
// Stream type is defined in
|
|
|
|
|
// "Table 2-34 – Stream type assignments" in H.222
|
2020-12-11 20:58:26 +00:00
|
|
|
|
typedef base::Callback<void(int, TsStreamType, const uint8_t*, size_t)>
|
|
|
|
|
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
|