| | |
| | | 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; |
| | |
| | | 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()); |
| | |
| | | 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(); |