离在线状态样式修改
修复未回复200ok导致catalog一直发送的bug 修改点播接口未收到视频后回复
This commit is contained in:
@@ -242,14 +242,15 @@ public class SIPCommander implements ISIPCommander {
|
||||
StreamInfo streamInfo = new StreamInfo();
|
||||
streamInfo.setSsrc(ssrc);
|
||||
// String streamId = Integer.toHexString(Integer.parseInt(streamInfo.getSsrc()));
|
||||
String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); // ZLM 要求大写且首位补零
|
||||
streamInfo.setFlv(String.format("http://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
streamInfo.setWS_FLV(String.format("ws://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
streamInfo.setRTMP(String.format("rtmp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtmpPort(), streamId));
|
||||
streamInfo.setHLS(String.format("http://%s:%s/rtp/%s/hls.m3u8", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
streamInfo.setRTSP(String.format("rtsp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtspPort(), streamId));
|
||||
|
||||
storager.startPlay(device.getDeviceId(), channelId, streamInfo);
|
||||
// String streamId = String.format("%08x", Integer.parseInt(streamInfo.getSsrc())).toUpperCase(); // ZLM 要求大写且首位补零
|
||||
// streamInfo.setFlv(String.format("http://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setWS_FLV(String.format("ws://%s:%s/rtp/%s.flv", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setRTMP(String.format("rtmp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtmpPort(), streamId));
|
||||
// streamInfo.setHLS(String.format("http://%s:%s/rtp/%s/hls.m3u8", mediaInfo.getLocalIP(), mediaInfo.getHttpPort(), streamId));
|
||||
// streamInfo.setRTSP(String.format("rtsp://%s:%s/rtp/%s", mediaInfo.getLocalIP(), mediaInfo.getRtspPort(), streamId));
|
||||
streamInfo.setCahnnelId(channelId);
|
||||
streamInfo.setDeviceID(device.getDeviceId());
|
||||
storager.startPlay(streamInfo);
|
||||
return streamInfo;
|
||||
} catch ( SipException | ParseException | InvalidArgumentException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -210,8 +210,11 @@ public class MessageRequestProcessor extends SIPRequestAbstractProcessor {
|
||||
msg.setType(DeferredResultHolder.CALLBACK_CMD_CATALOG);
|
||||
msg.setData(device);
|
||||
deferredResultHolder.invokeResult(msg);
|
||||
|
||||
// 回复200
|
||||
responseAck(evt);
|
||||
}
|
||||
} catch (DocumentException e) {
|
||||
} catch (DocumentException | SipException | InvalidArgumentException | ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user