Commit a25f7e4f99401f842d9a0129d35011fa11930e9e

Authored by panlinlin
1 parent 3d837754

存储部分使用sqlite代替redis-2

src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java
... ... @@ -51,7 +51,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
51 51 DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId());
52 52 if (deviceChannel != null) {
53 53 deviceChannel.setStreamId(null);
54   - deviceChannel.setPlay(false);
55 54 deviceChannel.setDeviceId(streamInfo.getDeviceID());
56 55 deviceChannelMapper.update(deviceChannel);
57 56 }
... ... @@ -144,7 +143,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
144 143 DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId());
145 144 if (deviceChannel != null) {
146 145 deviceChannel.setStreamId(null);
147   - deviceChannel.setPlay(false);
148 146 deviceChannel.setDeviceId(streamInfo.getDeviceID());
149 147 deviceChannelMapper.update(deviceChannel);
150 148 }
... ...
src/main/java/com/genersoft/iot/vmp/vmanager/playback/PlaybackController.java
... ... @@ -6,6 +6,7 @@ import com.genersoft.iot.vmp.common.StreamInfo;
6 6 import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
7 7 import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
8 8 import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
  9 +import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
9 10 import com.genersoft.iot.vmp.vmanager.service.IPlayService;
10 11 import org.slf4j.Logger;
11 12 import org.slf4j.LoggerFactory;
... ... @@ -44,6 +45,9 @@ public class PlaybackController {
44 45 private IVideoManagerStorager storager;
45 46  
46 47 @Autowired
  48 + private IRedisCatchStorage redisCatchStorage;
  49 +
  50 + @Autowired
47 51 private ZLMRESTfulUtils zlmresTfulUtils;
48 52  
49 53 @Autowired
... ... @@ -70,7 +74,7 @@ public class PlaybackController {
70 74 resultHolder.invokeResult(msg);
71 75 });
72 76 Device device = storager.queryVideoDevice(deviceId);
73   - StreamInfo streamInfo = storager.queryPlaybackByDevice(deviceId, channelId);
  77 + StreamInfo streamInfo = redisCatchStorage.queryPlaybackByDevice(deviceId, channelId);
74 78 if (streamInfo != null) {
75 79 // 停止之前的回放
76 80 cmder.streamByeCmd(streamInfo.getStreamId());
... ...