| | |
| | | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| | | import com.genersoft.iot.vmp.media.bean.MediaServer; |
| | | import com.genersoft.iot.vmp.service.IDeviceService; |
| | | import com.genersoft.iot.vmp.service.IInviteStreamService; |
| | | import com.genersoft.iot.vmp.service.IPlayService; |
| | |
| | | result.setResult(resultJSON); |
| | | return result; |
| | | } |
| | | MediaServerItem newMediaServerItem = playService.getNewMediaServerItem(device); |
| | | MediaServer newMediaServerItem = playService.getNewMediaServerItem(device); |
| | | |
| | | playService.play(newMediaServerItem, serial, code, null, (errorCode, msg, data) -> { |
| | | if (errorCode == InviteErrorCode.SUCCESS.getCode()) { |
| | |
| | | resultJjson.put("ChannelID", code); |
| | | resultJjson.put("ChannelName", deviceChannel.getName()); |
| | | resultJjson.put("ChannelCustomName", ""); |
| | | resultJjson.put("FLV", streamInfo.getFlv().getUrl()); |
| | | if(streamInfo.getHttps_flv() != null) { |
| | | resultJjson.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl()); |
| | | if (streamInfo.getTranscodeStream() != null) { |
| | | resultJjson.put("FLV", streamInfo.getTranscodeStream().getFlv().getUrl()); |
| | | }else { |
| | | resultJjson.put("FLV", streamInfo.getFlv().getUrl()); |
| | | |
| | | } |
| | | resultJjson.put("WS_FLV", streamInfo.getWs_flv().getUrl()); |
| | | if(streamInfo.getHttps_flv() != null) { |
| | | if (streamInfo.getTranscodeStream() != null) { |
| | | resultJjson.put("HTTPS_FLV", streamInfo.getTranscodeStream().getHttps_flv().getUrl()); |
| | | }else { |
| | | resultJjson.put("HTTPS_FLV", streamInfo.getHttps_flv().getUrl()); |
| | | } |
| | | } |
| | | |
| | | if (streamInfo.getTranscodeStream() != null) { |
| | | resultJjson.put("WS_FLV", streamInfo.getTranscodeStream().getWs_flv().getUrl()); |
| | | }else { |
| | | resultJjson.put("WS_FLV", streamInfo.getWs_flv().getUrl()); |
| | | } |
| | | |
| | | if(streamInfo.getWss_flv() != null) { |
| | | resultJjson.put("WSS_FLV", streamInfo.getWss_flv().getUrl()); |
| | | if (streamInfo.getTranscodeStream() != null) { |
| | | resultJjson.put("WSS_FLV", streamInfo.getTranscodeStream().getWss_flv().getUrl()); |
| | | }else { |
| | | resultJjson.put("WSS_FLV", streamInfo.getWss_flv().getUrl()); |
| | | } |
| | | } |
| | | resultJjson.put("RTMP", streamInfo.getRtmp().getUrl()); |
| | | if (streamInfo.getRtmps() != null) { |