| | |
| | | * @param endTime 结束时间,格式要求:yyyy-MM-dd HH:mm:ss
|
| | | */
|
| | | @Override
|
| | | public String playbackStreamCmd(Device device, String channelId, String startTime, String endTime) {
|
| | | public StreamInfo playbackStreamCmd(Device device, String channelId, String startTime, String endTime) {
|
| | | try {
|
| | | MediaServerConfig mediaInfo = storager.getMediaInfo();
|
| | | String ssrc = streamSession.createPlayBackSsrc();
|
| | |
| | |
|
| | | ClientTransaction transaction = transmitRequest(device, request);
|
| | | streamSession.put(ssrc, transaction);
|
| | | return ssrc;
|
| | |
|
| | | StreamInfo streamInfo = new StreamInfo();
|
| | | streamInfo.setSsrc(ssrc);
|
| | | streamInfo.setCahnnelId(channelId);
|
| | | streamInfo.setDeviceID(device.getDeviceId());
|
| | | boolean b = storager.startPlayBlack(streamInfo);
|
| | | return streamInfo;
|
| | |
|
| | | } catch ( SipException | ParseException | InvalidArgumentException e) {
|
| | | e.printStackTrace();
|
| | |
| | | recordInfoXml.append("<DeviceID>" + channelId + "</DeviceID>\r\n");
|
| | | recordInfoXml.append("<StartTime>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(startTime) + "</StartTime>\r\n");
|
| | | recordInfoXml.append("<EndTime>" + DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(endTime) + "</EndTime>\r\n");
|
| | | recordInfoXml.append("<Secrecy>0</Secrecy>\\r\n");
|
| | | recordInfoXml.append("<Secrecy>0</Secrecy>\r\n");
|
| | | // 大华NVR要求必须增加一个值为all的文本元素节点Type
|
| | | recordInfoXml.append("<Type>all</Type>\r\n");
|
| | | recordInfoXml.append("</Query>\r\n");
|