From a25f7e4f99401f842d9a0129d35011fa11930e9e Mon Sep 17 00:00:00 2001 From: panlinlin <648540858@qq.com> Date: Thu, 31 Dec 2020 13:22:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=98=E5=82=A8=E9=83=A8=E5=88=86=E4=BD=BF?= =?UTF-8?q?=E7=94=A8sqlite=E4=BB=A3=E6=9B=BFredis-2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/storager/impl/RedisCatchStorageImpl.java | 2 -- .../iot/vmp/vmanager/playback/PlaybackController.java | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java index 8eaaf68a..96b55b09 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java @@ -51,7 +51,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId()); if (deviceChannel != null) { deviceChannel.setStreamId(null); - deviceChannel.setPlay(false); deviceChannel.setDeviceId(streamInfo.getDeviceID()); deviceChannelMapper.update(deviceChannel); } @@ -144,7 +143,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId()); if (deviceChannel != null) { deviceChannel.setStreamId(null); - deviceChannel.setPlay(false); deviceChannel.setDeviceId(streamInfo.getDeviceID()); deviceChannelMapper.update(deviceChannel); } diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java index c9dc92c3..9449d263 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.common.StreamInfo; import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils; +import com.genersoft.iot.vmp.storager.IRedisCatchStorage; import com.genersoft.iot.vmp.vmanager.service.IPlayService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -43,6 +44,9 @@ public class PlaybackController { @Autowired private IVideoManagerStorager storager; + @Autowired + private IRedisCatchStorage redisCatchStorage; + @Autowired private ZLMRESTfulUtils zlmresTfulUtils; @@ -70,7 +74,7 @@ public class PlaybackController { resultHolder.invokeResult(msg); }); Device device = storager.queryVideoDevice(deviceId); - StreamInfo streamInfo = storager.queryPlaybackByDevice(deviceId, channelId); + StreamInfo streamInfo = redisCatchStorage.queryPlaybackByDevice(deviceId, channelId); if (streamInfo != null) { // 停止之前的回放 cmder.streamByeCmd(streamInfo.getStreamId());