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_PAT_H_
|
|
|
|
#define PACKAGER_MEDIA_FORMATS_MP2T_TS_SECTION_PAT_H_
|
2014-04-01 01:34:59 +00:00
|
|
|
|
2023-12-01 17:32:19 +00:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
#include <packager/macros/classes.h>
|
|
|
|
#include <packager/media/formats/mp2t/ts_section_psi.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 TsSectionPat : public TsSectionPsi {
|
|
|
|
public:
|
|
|
|
// RegisterPmtCb::Run(int program_number, int pmt_pid);
|
2023-12-01 17:32:19 +00:00
|
|
|
typedef std::function<void(int, int)> RegisterPmtCb;
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
explicit TsSectionPat(const RegisterPmtCb& register_pmt_cb);
|
2015-07-22 23:40:45 +00:00
|
|
|
~TsSectionPat() override;
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
// TsSectionPsi 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:
|
|
|
|
RegisterPmtCb register_pmt_cb_;
|
|
|
|
|
|
|
|
// Parameters from the PAT.
|
|
|
|
int version_number_;
|
|
|
|
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(TsSectionPat);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mp2t
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2014-04-01 01:34:59 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|