临时提交
parent
fe921b860a
commit
7b7512f84d
|
@ -22,10 +22,6 @@ public interface IGbChannelService {
|
|||
|
||||
int online(List<CommonGBChannel> commonGBChannelList);
|
||||
|
||||
void closeSend(CommonGBChannel commonGBChannel);
|
||||
|
||||
void closeSend(List<CommonGBChannel> commonGBChannelList);
|
||||
|
||||
void batchAdd(List<CommonGBChannel> commonGBChannels);
|
||||
|
||||
void updateStatus(List<CommonGBChannel> channelList);
|
||||
|
|
|
@ -44,8 +44,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
}catch (Exception e) {
|
||||
log.warn("[通道移除通知] 发送失败,{}", channel.getGbDeviceId(), e);
|
||||
}
|
||||
// 结束发送
|
||||
closeSend(channel);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
@ -119,8 +117,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
log.warn("[多个通道离线] 发送失败,数量:{}", onlineChannelList.size(), e);
|
||||
}
|
||||
}
|
||||
// 结束国标级联的发送
|
||||
closeSend(onlineChannelList);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -180,21 +176,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeSend(CommonGBChannel commonGBChannel) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void closeSend(List<CommonGBChannel> commonGBChannelList) {
|
||||
if (!commonGBChannelList.isEmpty()) {
|
||||
for (CommonGBChannel commonGBChannel : commonGBChannelList) {
|
||||
closeSend(commonGBChannel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchAdd(List<CommonGBChannel> commonGBChannels) {
|
||||
|
||||
|
|
|
@ -16,18 +16,24 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander;
|
|||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
import com.genersoft.iot.vmp.gb28181.utils.SipUtils;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaInfo;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.media.bean.RecordInfo;
|
||||
import com.genersoft.iot.vmp.media.event.hook.Hook;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookType;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaArrivalEvent;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaDepartureEvent;
|
||||
import com.genersoft.iot.vmp.media.event.media.MediaNotFoundEvent;
|
||||
import com.genersoft.iot.vmp.media.service.IMediaServerService;
|
||||
import com.genersoft.iot.vmp.media.zlm.SendRtpPortManager;
|
||||
import com.genersoft.iot.vmp.media.event.hook.HookSubscribe;
|
||||
import com.genersoft.iot.vmp.media.bean.MediaServer;
|
||||
import com.genersoft.iot.vmp.service.*;
|
||||
import com.genersoft.iot.vmp.service.bean.*;
|
||||
import com.genersoft.iot.vmp.service.IDeviceChannelService;
|
||||
import com.genersoft.iot.vmp.service.IDeviceService;
|
||||
import com.genersoft.iot.vmp.service.IInviteStreamService;
|
||||
import com.genersoft.iot.vmp.service.IPlayService;
|
||||
import com.genersoft.iot.vmp.service.bean.DownloadFileInfo;
|
||||
import com.genersoft.iot.vmp.service.bean.ErrorCallback;
|
||||
import com.genersoft.iot.vmp.service.bean.InviteErrorCode;
|
||||
import com.genersoft.iot.vmp.service.bean.SSRCInfo;
|
||||
import com.genersoft.iot.vmp.storager.IRedisCatchStorage;
|
||||
import com.genersoft.iot.vmp.storager.IVideoManagerStorage;
|
||||
import com.genersoft.iot.vmp.utils.CloudRecordUtils;
|
||||
|
@ -38,8 +44,6 @@ import com.genersoft.iot.vmp.vmanager.bean.StreamContent;
|
|||
import com.genersoft.iot.vmp.vmanager.gb28181.play.bean.AudioBroadcastEvent;
|
||||
import gov.nist.javax.sip.message.SIPResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
|
@ -55,7 +59,10 @@ import java.io.File;
|
|||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.ParseException;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.Vector;
|
||||
|
||||
@SuppressWarnings(value = {"rawtypes", "unchecked"})
|
||||
@Slf4j
|
||||
|
@ -591,7 +598,7 @@ public class PlayServiceImpl implements IPlayService {
|
|||
callback.run(InviteErrorCode.ERROR_FOR_SIP_SENDING_FAILED.getCode(),
|
||||
InviteErrorCode.ERROR_FOR_SIP_SENDING_FAILED.getMsg(), null);
|
||||
}
|
||||
inviteStreamService.call(InviteSessionType.PLAY, device.getDeviceId(), channel.getChannelId(), null,
|
||||
inviteStreamService.call(InviteSessionType.PLAY, device.getDeviceId(), channel.getDeviceId(), null,
|
||||
InviteErrorCode.ERROR_FOR_SIP_SENDING_FAILED.getCode(),
|
||||
InviteErrorCode.ERROR_FOR_SIP_SENDING_FAILED.getMsg(), null);
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
push.setPushIng(false);
|
||||
if (push.getGbDeviceId() != null) {
|
||||
if (userSetting.isUsePushingAsStatus()) {
|
||||
push.setGbStatus(false);
|
||||
push.setGbStatus(0);
|
||||
updateStatus(push);
|
||||
// streamPushMapper.updatePushStatus(event.getApp(), event.getStream(), false);
|
||||
// eventPublisher.catalogEventPublishForStream(null, gbStream, CatalogEvent.OFF);
|
||||
|
@ -279,10 +279,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
}
|
||||
streamPush.setPushIng(false);
|
||||
if (userSetting.isUsePushingAsStatus()) {
|
||||
streamPush.setGbStatus(false);
|
||||
gbChannelService.offline(streamPush.getCommonGBChannel());
|
||||
}
|
||||
gbChannelService.closeSend(streamPush.getCommonGBChannel());
|
||||
redisCatchStorage.deleteSendRTPServer(null, streamPush.getGbDeviceId(), null, streamPush.getStream());
|
||||
mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);
|
||||
streamPush.setUpdateTime(DateUtil.getNow());
|
||||
streamPushMapper.update(streamPush);
|
||||
return true;
|
||||
|
@ -508,7 +508,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
if (push.getGbDeviceId() != null) {
|
||||
return;
|
||||
}
|
||||
if (push.getGbStatus()) {
|
||||
if (push.getGbStatus() == 1) {
|
||||
gbChannelService.online(push.getCommonGBChannel());
|
||||
}else {
|
||||
gbChannelService.offline(push.getCommonGBChannel());
|
||||
|
@ -522,7 +522,7 @@ public class StreamPushServiceImpl implements IStreamPushService {
|
|||
StreamPush streamPushInDb = streamPushMapper.select(streamPushId);
|
||||
streamPushInDb.setPushIng(pushIng);
|
||||
if (userSetting.isUsePushingAsStatus()) {
|
||||
streamPushInDb.setGbStatus(pushIng);
|
||||
streamPushInDb.setGbStatus(pushIng?1:0);
|
||||
}
|
||||
streamPushInDb.setPushTime(DateUtil.getNow());
|
||||
updateStatus(streamPushInDb);
|
||||
|
|
Loading…
Reference in New Issue