mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 04:55:58 +08:00
优化rtmp时间戳修正
This commit is contained in:
@@ -33,16 +33,17 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
//该类解决时间戳回环、回退问题
|
||||
//计算相对时间戳或者产生平滑时间戳
|
||||
class Stamp {
|
||||
public:
|
||||
Stamp(bool modifyStamp = false) {_modifyStamp = modifyStamp;};
|
||||
Stamp() = default;
|
||||
~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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user