修复点播错误时关闭rtpserver
This commit is contained in:
@@ -9,6 +9,7 @@ import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||
@@ -212,7 +213,7 @@ public interface IRedisCatchStorage {
|
||||
|
||||
void addPushListItem(String app, String stream, MediaArrivalEvent param);
|
||||
|
||||
OnStreamChangedHookParam getPushListItem(String app, String stream);
|
||||
StreamPushItem getPushListItem(String app, String stream);
|
||||
|
||||
void removePushListItem(String app, String stream, String mediaServerId);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.genersoft.iot.vmp.gb28181.bean.SendRtpItem;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamAuthorityInfo;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem;
|
||||
import com.genersoft.iot.vmp.media.zlm.dto.hook.OnStreamChangedHookParam;
|
||||
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.MessageForPushChannel;
|
||||
@@ -447,7 +448,6 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
@Override
|
||||
public StreamAuthorityInfo getStreamAuthorityInfo(String app, String stream) {
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId() + "_" + app+ "_" + stream ;
|
||||
System.out.println(key);
|
||||
return JsonUtil.redisJsonToObject(redisTemplate, key, StreamAuthorityInfo.class);
|
||||
|
||||
}
|
||||
@@ -655,19 +655,20 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
@Override
|
||||
public void addPushListItem(String app, String stream, MediaArrivalEvent event) {
|
||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||
redisTemplate.opsForValue().set(key, event);
|
||||
StreamPushItem streamPushItem = StreamPushItem.getInstance(event, userSetting.getServerId());
|
||||
redisTemplate.opsForValue().set(key, streamPushItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OnStreamChangedHookParam getPushListItem(String app, String stream) {
|
||||
public StreamPushItem getPushListItem(String app, String stream) {
|
||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||
return (OnStreamChangedHookParam)redisTemplate.opsForValue().get(key);
|
||||
return (StreamPushItem)redisTemplate.opsForValue().get(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removePushListItem(String app, String stream, String mediaServerId) {
|
||||
String key = VideoManagerConstants.PUSH_STREAM_LIST + app + "_" + stream;
|
||||
OnStreamChangedHookParam param = (OnStreamChangedHookParam)redisTemplate.opsForValue().get(key);
|
||||
StreamPushItem param = (StreamPushItem)redisTemplate.opsForValue().get(key);
|
||||
if (param != null && param.getMediaServerId().equalsIgnoreCase(mediaServerId)) {
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user