2022-08-26 15:44:59 +00:00
|
|
|
// Copyright 2016 Google LLC. All rights reserved.
|
2016-04-14 05:40:24 +00:00
|
|
|
//
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file or at
|
|
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
|
|
|
|
#ifndef PACKAGER_MEDIA_FORMATS_MP2T_CONTINUITY_COUNTER_H_
|
|
|
|
#define PACKAGER_MEDIA_FORMATS_MP2T_CONTINUITY_COUNTER_H_
|
|
|
|
|
2023-08-31 23:59:46 +00:00
|
|
|
#include "packager/macros.h"
|
2016-04-14 05:40:24 +00:00
|
|
|
|
2016-05-20 21:19:33 +00:00
|
|
|
namespace shaka {
|
2016-04-14 05:40:24 +00:00
|
|
|
namespace media {
|
|
|
|
namespace mp2t {
|
|
|
|
|
|
|
|
class ContinuityCounter {
|
|
|
|
public:
|
|
|
|
ContinuityCounter();
|
|
|
|
~ContinuityCounter();
|
|
|
|
|
|
|
|
/// As specified by the spec, this starts from 0 and is incremented by 1 until
|
|
|
|
/// it wraps back to 0 when it reaches 16.
|
|
|
|
/// @return counter value.
|
|
|
|
int GetNext();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int counter_ = 0;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ContinuityCounter);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace mp2t
|
|
|
|
} // namespace media
|
2016-05-20 21:19:33 +00:00
|
|
|
} // namespace shaka
|
2016-04-14 05:40:24 +00:00
|
|
|
|
|
|
|
#endif // PACKAGER_MEDIA_FORMATS_MP2T_CONTINUITY_COUNTER_H_
|