Added timeoffset URL param to RTMP push input, for pushing with forced time offset
This commit is contained in:
parent
209cd4c0fc
commit
0c8261bf2f
1 changed files with 6 additions and 2 deletions
|
@ -1407,12 +1407,16 @@ namespace Mist{
|
|||
F.toMeta(meta, *amf_storage, reTrackToID[reTrack], targetParams);
|
||||
if (F.getDataLen() && !(F.needsInitData() && F.isInitData())){
|
||||
uint64_t tagTime = next.timestamp;
|
||||
uint64_t timeOffset = 0;
|
||||
if (targetParams.count("timeoffset")){
|
||||
timeOffset = JSON::Value(targetParams["timeoffset"]).asInt();
|
||||
}
|
||||
if (!M.getBootMsOffset()){
|
||||
meta.setBootMsOffset(Util::bootMS() - tagTime);
|
||||
rtmpOffset = 0;
|
||||
rtmpOffset = timeOffset;
|
||||
setRtmpOffset = true;
|
||||
}else if (!setRtmpOffset){
|
||||
rtmpOffset = (Util::bootMS() - tagTime) - M.getBootMsOffset();
|
||||
rtmpOffset = (Util::bootMS() - tagTime) - M.getBootMsOffset() + timeOffset;
|
||||
setRtmpOffset = true;
|
||||
}
|
||||
tagTime += rtmpOffset;
|
||||
|
|
Loading…
Add table
Reference in a new issue