| | |
| | | String platformGbId = ((SipURI) ((HeaderAddress) evt.getRequest().getHeader(FromHeader.NAME)).getAddress().getURI()).getUser();
|
| | | String channelId = ((SipURI) ((HeaderAddress) evt.getRequest().getHeader(ToHeader.NAME)).getAddress().getURI()).getUser();
|
| | | SendRtpItem sendRtpItem = redisCatchStorage.querySendRTPServer(platformGbId, channelId);
|
| | | if (sendRtpItem == null) return;
|
| | | String streamId = sendRtpItem.getStreamId();
|
| | | Map<String, Object> param = new HashMap<>();
|
| | | param.put("vhost","__defaultVhost__");
|
| | |
| | |
|
| | | String streamId = json.getString("stream");
|
| | | String app = json.getString("app");
|
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId);
|
| | |
|
| | |
|
| | | if ("rtp".equals(app)){
|
| | | JSONObject ret = new JSONObject();
|
| | | ret.put("code", 0);
|
| | | ret.put("close", true);
|
| | | if (streamInfo != null) {
|
| | | if (redisCatchStorage.isChannelSendingRTP(streamInfo.getChannelId())) {
|
| | | StreamInfo streamInfoForPlayCatch = redisCatchStorage.queryPlayByStreamId(streamId);
|
| | | if (streamInfoForPlayCatch != null) {
|
| | | if (redisCatchStorage.isChannelSendingRTP(streamInfoForPlayCatch.getChannelId())) {
|
| | | ret.put("close", false);
|
| | | } else {
|
| | | cmder.streamByeCmd(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
| | | redisCatchStorage.stopPlay(streamInfo);
|
| | | storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
| | | cmder.streamByeCmd(streamInfoForPlayCatch.getDeviceID(), streamInfoForPlayCatch.getChannelId());
|
| | | redisCatchStorage.stopPlay(streamInfoForPlayCatch);
|
| | | storager.stopPlay(streamInfoForPlayCatch.getDeviceID(), streamInfoForPlayCatch.getChannelId());
|
| | | }
|
| | | }else{
|
| | | cmder.streamByeCmd(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
| | | streamInfo = redisCatchStorage.queryPlaybackByStreamId(streamId);
|
| | | redisCatchStorage.stopPlayback(streamInfo);
|
| | | StreamInfo streamInfoForPlayBackCatch = redisCatchStorage.queryPlaybackByStreamId(streamId);
|
| | | if (streamInfoForPlayBackCatch != null) {
|
| | | cmder.streamByeCmd(streamInfoForPlayBackCatch.getDeviceID(), streamInfoForPlayBackCatch.getChannelId());
|
| | | redisCatchStorage.stopPlayback(streamInfoForPlayBackCatch);
|
| | | }
|
| | | }
|
| | | return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
|
| | | }else {
|
| | |
| | | <el-checkbox label="转HLS" v-model="proxyParam.enable_hls" ></el-checkbox> |
| | | <el-checkbox label="MP4录制" v-model="proxyParam.enable_mp4" ></el-checkbox> |
| | | </div> |
| | | |
| | | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <div style="float: right;"> |
| | | <el-button type="primary" @click="onSubmit">{{onSubmit_text}}</el-button> |
| | | <el-button @click="close">取消</el-button> |
| | | </div> |
| | | |
| | | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | type: "default", |
| | | app: null, |
| | | stream: null, |
| | | url: "rtmp://58.200.131.2:1935/livetv/hunantv", |
| | | url: "rtmp://58.200.131.2/livetv/cctv5hd", |
| | | src_url: null, |
| | | timeout_ms: null, |
| | | ffmpeg_cmd_key: null, |
| | |
| | | enable_hls: true, |
| | | enable_mp4: false, |
| | | }, |
| | | |
| | | |
| | | rules: { |
| | | name: [{ required: true, message: "请输入名称", trigger: "blur" }], |
| | | app: [{ required: true, message: "请输入应用名", trigger: "blur" }], |
| | |
| | | var that = this; |
| | | that.$axios({ |
| | | method: 'post', |
| | | url:`/api/proxy/save`, |
| | | url:`/api/proxy/save`, |
| | | data: that.proxyParam |
| | | }).then(function (res) { |
| | | console.log(res); |