|  |  |  | 
|---|
|  |  |  | package com.genersoft.iot.vmp.gb28181.transmit.cmd; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.genersoft.iot.vmp.common.StreamInfo; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.Device; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.InviteStreamCallback; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.bean.*; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; | 
|---|
|  |  |  | import com.genersoft.iot.vmp.service.bean.SSRCInfo; | 
|---|
|  |  |  | import gov.nist.javax.sip.message.SIPRequest; | 
|---|
|  |  |  | import gov.nist.javax.sip.stack.SIPDialog; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.sip.Dialog; | 
|---|
|  |  |  | import javax.sip.SipException; | 
|---|
|  |  |  | import java.text.ParseException; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * @description:设备能力接口,用于定义设备的控制、查询能力 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param device  视频设备 | 
|---|
|  |  |  | * @param channelId  预览通道 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void playStreamCmd(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId, ZLMHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void playStreamCmd(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId, ZLMHttpHookSubscribe.Event event, SipSubscribe.Event okEvent, SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 请求回放视频流 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void streamByeCmd(String deviceId, String channelId, String stream, String callId, SipSubscribe.Event okEvent); | 
|---|
|  |  |  | void streamByeCmd(String deviceId, String channelId, String stream, String callId); | 
|---|
|  |  |  | void streamByeCmd(SIPDialog dialog, SIPRequest request, SipSubscribe.Event okEvent) throws SipException, ParseException; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 回放暂停 | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void playSpeedCmd(Device device, StreamInfo streamInfo, Double speed); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 语音广播 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param device  视频设备 | 
|---|
|  |  |  | * @param channelId  预览通道 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean audioBroadcastCmd(Device device,String channelId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 语音广播 | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param device  视频设备 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | void audioBroadcastCmd(Device device, SipSubscribe.Event okEvent); | 
|---|
|  |  |  | boolean audioBroadcastCmd(Device device); | 
|---|
|  |  |  | boolean audioBroadcastCmd(Device device, String channelId, SipSubscribe.Event okEvent, SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 音视频录像控制 | 
|---|
|  |  |  | 
|---|
|  |  |  | * | 
|---|
|  |  |  | * @param device 视频设备 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean catalogQuery(Device device, SipSubscribe.Event errorEvent); | 
|---|
|  |  |  | boolean catalogQuery(Device device, int sn, SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 查询录像信息 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param device   视频设备 | 
|---|
|  |  |  | * @return         true = 命令发送成功 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean mobilePositionSubscribe(Device device, SipSubscribe.Event okEvent ,SipSubscribe.Event errorEvent); | 
|---|
|  |  |  | boolean mobilePositionSubscribe(Device device, Dialog dialog, SipSubscribe.Event okEvent , SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 订阅、取消订阅报警信息 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param device      视频设备 | 
|---|
|  |  |  | * @return            true = 命令发送成功 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean catalogSubscribe(Device device, SipSubscribe.Event okEvent ,SipSubscribe.Event errorEvent); | 
|---|
|  |  |  | boolean catalogSubscribe(Device device, Dialog dialog, SipSubscribe.Event okEvent ,SipSubscribe.Event errorEvent); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 拉框控制命令 | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param cmdString 前端控制指令串 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean dragZoomCmd(Device device, String channelId, String cmdString); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 向设备发送报警NOTIFY消息, 用于互联结构下,此时将设备当成一个平级平台看待 | 
|---|
|  |  |  | * @param device 设备 | 
|---|
|  |  |  | * @param deviceAlarm 报警信息信息 | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | boolean sendAlarmMessage(Device device, DeviceAlarm deviceAlarm); | 
|---|
|  |  |  | } | 
|---|