From 7e581e9d3a0e32be5e90e453f4283d70d895a634 Mon Sep 17 00:00:00 2001
From: panlinlin <648540858@qq.com>
Date: 星期五, 08 一月 2021 17:31:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 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 89eaa13..63abc80 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
@@ -35,7 +35,7 @@
      */
     @Override
     public boolean startPlay(StreamInfo stream) {
-        return redis.set(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAYER_PREFIX, stream.getStreamId(),stream.getDeviceID(), stream.getCahnnelId()),
+        return redis.set(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAYER_PREFIX, stream.getStreamId(),stream.getDeviceID(), stream.getChannelId()),
                 stream);
     }
 
@@ -47,16 +47,10 @@
     @Override
     public boolean stopPlay(StreamInfo streamInfo) {
         if (streamInfo == null) return false;
-        DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId());
-        if (deviceChannel != null) {
-            deviceChannel.setStreamId(null);
-            deviceChannel.setDeviceId(streamInfo.getDeviceID());
-            deviceChannelMapper.update(deviceChannel);
-        }
         return redis.del(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAYER_PREFIX,
                 streamInfo.getStreamId(),
                 streamInfo.getDeviceID(),
-                streamInfo.getCahnnelId()));
+                streamInfo.getChannelId()));
     }
 
     /**
@@ -69,7 +63,7 @@
                 VideoManagerConstants.PLAYER_PREFIX,
                 streamInfo.getStreamId(),
                 streamInfo.getDeviceID(),
-                streamInfo.getCahnnelId()));
+                streamInfo.getChannelId()));
     }
     @Override
     public StreamInfo queryPlayByStreamId(String steamId) {
@@ -123,7 +117,7 @@
         for (int i = 0; i < players.size(); i++) {
             String key = (String) players.get(i);
             StreamInfo streamInfo = (StreamInfo)redis.get(key);
-            streamInfos.put(streamInfo.getDeviceID() + "_" + streamInfo.getCahnnelId(), streamInfo);
+            streamInfos.put(streamInfo.getDeviceID() + "_" + streamInfo.getChannelId(), streamInfo);
         }
         return streamInfos;
     }
@@ -131,7 +125,7 @@
 
     @Override
     public boolean startPlayback(StreamInfo stream) {
-        return redis.set(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAY_BLACK_PREFIX, stream.getStreamId(),stream.getDeviceID(), stream.getCahnnelId()),
+        return redis.set(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAY_BLACK_PREFIX, stream.getStreamId(),stream.getDeviceID(), stream.getChannelId()),
                 stream);
     }
 
@@ -139,7 +133,7 @@
     @Override
     public boolean stopPlayback(StreamInfo streamInfo) {
         if (streamInfo == null) return false;
-        DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getCahnnelId());
+        DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(streamInfo.getDeviceID(), streamInfo.getChannelId());
         if (deviceChannel != null) {
             deviceChannel.setStreamId(null);
             deviceChannel.setDeviceId(streamInfo.getDeviceID());
@@ -148,7 +142,7 @@
         return redis.del(String.format("%S_%s_%s_%s", VideoManagerConstants.PLAY_BLACK_PREFIX,
                 streamInfo.getStreamId(),
                 streamInfo.getDeviceID(),
-                streamInfo.getCahnnelId()));
+                streamInfo.getChannelId()));
     }
 
     @Override

--
Gitblit v1.8.0