Lawrence
2021-01-15 1b200bcc904d088b31ceaf1e9261b5433d9322a6
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
@@ -4,6 +4,7 @@
import com.alibaba.fastjson.JSONArray;
import com.genersoft.iot.vmp.common.StreamInfo;
import com.genersoft.iot.vmp.conf.MediaServerConfig;
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage;
import com.genersoft.iot.vmp.media.zlm.ZLMRESTfulUtils;
@@ -94,6 +95,7 @@
            resultHolder.invokeResult(msg);
         } else {
            redisCatchStorage.stopPlay(streamInfo);
            storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
            cmder.playStreamCmd(device, channelId, (JSONObject response) -> {
               logger.info("收到订阅消息: " + response.toJSONString());
               playService.onPublishHandlerForPlay(response, deviceId, channelId, uuid.toString());
@@ -138,17 +140,16 @@
            msg.setId(DeferredResultHolder.CALLBACK_CMD_PlAY + uuid);
            msg.setData("streamId not found");
            resultHolder.invokeResult(msg);
         }else {
            redisCatchStorage.stopPlay(streamInfo);
            storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
            RequestMessage msg = new RequestMessage();
            msg.setId(DeferredResultHolder.CALLBACK_CMD_STOP + uuid);
            Response response = event.getResponse();
            msg.setData(String.format("success"));
            resultHolder.invokeResult(msg);
         }
         RequestMessage msg = new RequestMessage();
         msg.setId(DeferredResultHolder.CALLBACK_CMD_STOP + uuid);
         Response response = event.getResponse();
         msg.setData(String.format("success"));
         resultHolder.invokeResult(msg);
      });
      if (streamId != null) {
         JSONObject json = new JSONObject();