mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 21:15:57 +08:00
时间戳处理新增接口支持获取相对时间戳
This commit is contained in:
@@ -20,6 +20,15 @@ using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
int64_t DeltaStamp::relativeStamp(int64_t stamp) {
|
||||
_relative_stamp += deltaStamp(stamp);
|
||||
return _relative_stamp;
|
||||
}
|
||||
|
||||
int64_t DeltaStamp::relativeStamp(){
|
||||
return _relative_stamp;
|
||||
}
|
||||
|
||||
int64_t DeltaStamp::deltaStamp(int64_t stamp) {
|
||||
if(!_last_stamp){
|
||||
//第一次计算时间戳增量,时间戳增量为0
|
||||
|
||||
Reference in New Issue
Block a user