mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 22:47:49 +08:00
1078-修复摄像头立即拍摄命令应答
This commit is contained in:
parent
e02a047eb2
commit
7bf548492a
@ -10,6 +10,7 @@ import io.netty.buffer.ByteBuf;
|
|||||||
import io.netty.buffer.ByteBufUtil;
|
import io.netty.buffer.ByteBufUtil;
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,17 +28,19 @@ public class J0805 extends Re {
|
|||||||
/**
|
/**
|
||||||
* 表示拍摄成功的多媒体个数
|
* 表示拍摄成功的多媒体个数
|
||||||
*/
|
*/
|
||||||
private List<Long> ids;
|
private List<Long> ids = new ArrayList<>();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
protected Rs decode0(ByteBuf buf, Header header, Session session) {
|
||||||
respNo = buf.readUnsignedShort();
|
respNo = buf.readUnsignedShort();
|
||||||
result = buf.readUnsignedByte();
|
result = buf.readUnsignedByte();
|
||||||
int length = buf.readUnsignedByte();
|
if (result == 0) {
|
||||||
for (int i = 0; i < length; i++) {
|
int length = buf.readUnsignedShort();
|
||||||
ids.add(buf.readUnsignedInt());
|
for (int i = 0; i < length; i++) {
|
||||||
|
ids.add(buf.readUnsignedInt());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
SessionManager.INSTANCE.response(header.getTerminalId(), "0805", (long) respNo, ids);
|
SessionManager.INSTANCE.response(header.getTerminalId(), "0805", null, ids);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -711,6 +711,6 @@ public class jt1078ServiceImpl implements Ijt1078Service {
|
|||||||
public List<Long> shooting(String deviceId, JTShootingCommand shootingCommand) {
|
public List<Long> shooting(String deviceId, JTShootingCommand shootingCommand) {
|
||||||
J8801 j8801 = new J8801();
|
J8801 j8801 = new J8801();
|
||||||
j8801.setCommand(shootingCommand);
|
j8801.setCommand(shootingCommand);
|
||||||
return (List<Long>)jt1078Template.shooting(deviceId, j8801, 20);
|
return (List<Long>)jt1078Template.shooting(deviceId, j8801, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ public enum SessionManager {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String requestKey = requestKey(cmd.getDevId(), cmd.getRespId(), cmd.getPackageNo());
|
String requestKey = requestKey(cmd.getDevId(), cmd.getRespId(), cmd.getPackageNo());
|
||||||
|
System.out.println("requestKey==" + requestKey);
|
||||||
SynchronousQueue<Object> subscribe = subscribe(requestKey);
|
SynchronousQueue<Object> subscribe = subscribe(requestKey);
|
||||||
if (subscribe == null) {
|
if (subscribe == null) {
|
||||||
log.error("DevId: {} key:{} send repaid", cmd.getDevId(), requestKey);
|
log.error("DevId: {} key:{} send repaid", cmd.getDevId(), requestKey);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user