支持修正时间戳

This commit is contained in:
xiongziliang
2019-08-06 22:54:37 +08:00
parent 749fb98439
commit b70d6cd2c2
2 changed files with 12 additions and 4 deletions

View File

@@ -27,20 +27,23 @@
#ifndef ZLMEDIAKIT_STAMP_H
#define ZLMEDIAKIT_STAMP_H
#include "Util/TimeTicker.h"
#include <cstdint>
using namespace toolkit;
namespace mediakit {
class Stamp {
public:
Stamp() = default;
Stamp(bool modifyStamp = false) {_modifyStamp = modifyStamp;};
~Stamp() = default;
void revise(uint32_t dts, uint32_t pts, int64_t &dts_out, int64_t &pts_out);
private:
int64_t _start_dts = 0;
int64_t _dts_inc = 0;
bool _first = true;
bool _modifyStamp;
std::shared_ptr<SmoothTicker> _ticker;
};
}//namespace mediakit