合并主线
parent
67d1ff0d26
commit
c0b79878f4
|
@ -296,16 +296,16 @@ public class ZLMHttpHookListener {
|
||||||
if (ssrcTransactionForAll.get(0).getType() == InviteSessionType.DOWNLOAD) {
|
if (ssrcTransactionForAll.get(0).getType() == InviteSessionType.DOWNLOAD) {
|
||||||
// 获取录像的总时长,然后设置为这个视频的时长
|
// 获取录像的总时长,然后设置为这个视频的时长
|
||||||
InviteInfo inviteInfoForDownload = inviteStreamService.getInviteInfo(InviteSessionType.DOWNLOAD, deviceId, channelId, param.getStream());
|
InviteInfo inviteInfoForDownload = inviteStreamService.getInviteInfo(InviteSessionType.DOWNLOAD, deviceId, channelId, param.getStream());
|
||||||
if (inviteInfoForDownload != null && inviteInfoForDownload.getStreamInfo() != null ) {
|
if (inviteInfoForDownload != null && inviteInfoForDownload.getStreamInfo() != null) {
|
||||||
String startTime = inviteInfoForDownload.getStreamInfo().getStartTime();
|
String startTime = inviteInfoForDownload.getStreamInfo().getStartTime();
|
||||||
String endTime = inviteInfoForDownload.getStreamInfo().getEndTime();
|
String endTime = inviteInfoForDownload.getStreamInfo().getEndTime();
|
||||||
long difference = DateUtil.getDifference(startTime, endTime)/1000;
|
long difference = DateUtil.getDifference(startTime, endTime) / 1000;
|
||||||
result.setMp4_max_second((int)difference);
|
result.setMp4_max_second((int) difference);
|
||||||
result.setEnable_mp4(true);
|
result.setEnable_mp4(true);
|
||||||
// 设置为2保证得到的mp4的时长是正常的
|
// 设置为2保证得到的mp4的时长是正常的
|
||||||
result.setModify_stamp(2);
|
result.setModify_stamp(2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (param.getApp().equalsIgnoreCase("rtp")) {
|
if (param.getApp().equalsIgnoreCase("rtp")) {
|
||||||
|
|
Loading…
Reference in New Issue