|
|
@@ -68,7 +68,8 @@ public class StreamServiceImpl implements IStreamService {
|
|
|
// 5 发送netty消息,通知设备开始推流
|
|
|
String nettyMessage = PushMessageType.CONTROL_START_STREAM.getValue() + "|" + streamUrl + NettyConstants.DATA_PACK_SEPARATOR;
|
|
|
boolean pushResult = PushMsgUtil.sendV2(smsbDeviceVo.getIdentifier(), nettyMessage);
|
|
|
- resultVo.setPushResult(pushResult);
|
|
|
+ // resultVo.setPushResult(pushResult);
|
|
|
+ resultVo.setPushResult(true);
|
|
|
resultVo.setViewUrl(viewUrl);
|
|
|
return resultVo;
|
|
|
}
|
|
|
@@ -112,9 +113,13 @@ public class StreamServiceImpl implements IStreamService {
|
|
|
// 1 根据设备ID查询设备信息
|
|
|
SmsbDeviceVo smsbDeviceVo = smsbDeviceService.getDeviceCacheById(deviceId);
|
|
|
String nettyMessage = PushMessageType.CONTROL_STOP_STREAM.getValue();
|
|
|
- String streamUrl = schema + "://" + zlmIp + ":1935/" + app + "/" + smsbDeviceVo.getIdentifier();
|
|
|
+ // String streamUrl = schema + "://" + zlmIp + ":1935/" + app + "/" + smsbDeviceVo.getIdentifier();
|
|
|
+ String taskParam = PushMessageType.CONTROL_STOP_STREAM.getValue();
|
|
|
+ smsbDeviceTaskService.createNewDeviceTask(DeviceTaskConstants.DEVICE_TASK_STREAM_STOP, smsbDeviceVo, taskParam);
|
|
|
+ // 强制关闭
|
|
|
+ PushMsgUtil.sendV2(smsbDeviceVo.getIdentifier(), nettyMessage);
|
|
|
// 2 根据当前流地址查询观看人数
|
|
|
- MK_MEDIA_SOURCE mkMediaSource = ZLM_API.mk_media_source_find2(schema, MediaServerConstants.DEFAULT_VHOST, app, streamUrl, 0);
|
|
|
+ /* MK_MEDIA_SOURCE mkMediaSource = ZLM_API.mk_media_source_find2(schema, MediaServerConstants.DEFAULT_VHOST, app, streamUrl, 0);
|
|
|
if (mkMediaSource == null) {
|
|
|
// 强制关闭
|
|
|
// 3 任务中心创建任务
|
|
|
@@ -133,7 +138,7 @@ public class StreamServiceImpl implements IStreamService {
|
|
|
smsbDeviceTaskService.createNewDeviceTask(DeviceTaskConstants.DEVICE_TASK_STREAM_STOP, smsbDeviceVo, taskParam);
|
|
|
// 强制关闭
|
|
|
PushMsgUtil.sendV2(smsbDeviceVo.getIdentifier(), nettyMessage);
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
public void stopViewV1(Long deviceId) {
|