[1078] 完善抓图

This commit is contained in:
lin
2025-07-11 21:41:50 +08:00
parent 8c3e9320fa
commit cefc87ad47
6 changed files with 42 additions and 19 deletions

View File

@@ -26,6 +26,9 @@ public class JTMediaEventInfo {
@Schema(description = "媒体数据")
private byte[] mediaData;
@Schema(description = "位置信息汇报")
private JTPositionBaseInfo positionBaseInfo;
public static JTMediaEventInfo decode(ByteBuf buf) {
JTMediaEventInfo jtMediaEventInfo = new JTMediaEventInfo();
@@ -35,6 +38,9 @@ public class JTMediaEventInfo {
jtMediaEventInfo.setEventCode(buf.readUnsignedByte());
jtMediaEventInfo.setChannelId(buf.readUnsignedByte());
ByteBuf byteBuf = buf.readSlice(28);
jtMediaEventInfo.setPositionBaseInfo(JTPositionBaseInfo.decode(byteBuf));
byte[] bytes = new byte[buf.readableBytes()];
buf.readBytes(bytes);
jtMediaEventInfo.setMediaData(bytes);