优化录像查询接口
parent
d87ff7bf4d
commit
e192009325
|
@ -257,7 +257,7 @@ public interface ISIPCommander {
|
||||||
* @param startTime 开始时间,格式要求:yyyy-MM-dd HH:mm:ss
|
* @param startTime 开始时间,格式要求:yyyy-MM-dd HH:mm:ss
|
||||||
* @param endTime 结束时间,格式要求:yyyy-MM-dd HH:mm:ss
|
* @param endTime 结束时间,格式要求:yyyy-MM-dd HH:mm:ss
|
||||||
*/
|
*/
|
||||||
boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime);
|
boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime, SipSubscribe.Event errorEvent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询报警信息
|
* 查询报警信息
|
||||||
|
|
|
@ -1196,7 +1196,7 @@ public class SIPCommander implements ISIPCommander {
|
||||||
* @param endTime 结束时间,格式要求:yyyy-MM-dd HH:mm:ss
|
* @param endTime 结束时间,格式要求:yyyy-MM-dd HH:mm:ss
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime) {
|
public boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime, SipSubscribe.Event errorEvent) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
StringBuffer recordInfoXml = new StringBuffer(200);
|
StringBuffer recordInfoXml = new StringBuffer(200);
|
||||||
|
@ -1220,7 +1220,7 @@ public class SIPCommander implements ISIPCommander {
|
||||||
Request request = headerProvider.createMessageRequest(device, recordInfoXml.toString(),
|
Request request = headerProvider.createMessageRequest(device, recordInfoXml.toString(),
|
||||||
"z9hG4bK-ViaRecordInfo-" + tm, "fromRec" + tm, null, callIdHeader);
|
"z9hG4bK-ViaRecordInfo-" + tm, "fromRec" + tm, null, callIdHeader);
|
||||||
|
|
||||||
transmitRequest(device, request);
|
transmitRequest(device, request, errorEvent);
|
||||||
} catch (SipException | ParseException | InvalidArgumentException e) {
|
} catch (SipException | ParseException | InvalidArgumentException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return false;
|
return false;
|
||||||
|
@ -1609,7 +1609,8 @@ public class SIPCommander implements ISIPCommander {
|
||||||
StringBuffer content = new StringBuffer(200);
|
StringBuffer content = new StringBuffer(200);
|
||||||
content.append("PLAY RTSP/1.0\r\n");
|
content.append("PLAY RTSP/1.0\r\n");
|
||||||
content.append("CSeq: " + InfoCseqCache.CSEQCACHE.get(streamInfo.getStreamId()) + "\r\n");
|
content.append("CSeq: " + InfoCseqCache.CSEQCACHE.get(streamInfo.getStreamId()) + "\r\n");
|
||||||
content.append("Range: npt=" + seekTime + "-\r\n");
|
content.append("Range: npt=" + Math.abs(seekTime) + "-\r\n");
|
||||||
|
|
||||||
Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString());
|
Request request = headerProvider.createInfoRequest(device, streamInfo, content.toString());
|
||||||
logger.info(request.toString());
|
logger.info(request.toString());
|
||||||
ClientTransaction clientTransaction = null;
|
ClientTransaction clientTransaction = null;
|
||||||
|
|
Loading…
Reference in New Issue