| | |
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.http.HttpStatus;
|
| | | import org.springframework.http.ResponseEntity;
|
| | | import org.springframework.util.StringUtils;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | |
|
| | | @Value("${media.ip}")
|
| | | private String mediaIp;
|
| | |
|
| | | @Value("${media.wanIp}")
|
| | | private String mediaWanIp;
|
| | |
|
| | | @Value("${media.port}")
|
| | | private int mediaPort;
|
| | |
| | | if ("rtp".equals(app) && !regist ) {
|
| | | if (streamInfo!=null){
|
| | | redisCatchStorage.stopPlay(streamInfo);
|
| | | storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
| | | }else{
|
| | | streamInfo = redisCatchStorage.queryPlaybackByStreamId(streamId);
|
| | | redisCatchStorage.stopPlayback(streamInfo);
|
| | |
| | | StreamInfo streamInfo = redisCatchStorage.queryPlayByStreamId(streamId);
|
| | | if (streamInfo!=null){
|
| | | redisCatchStorage.stopPlay(streamInfo);
|
| | | storager.stopPlay(streamInfo.getDeviceID(), streamInfo.getChannelId());
|
| | | }else{
|
| | | streamInfo = redisCatchStorage.queryPlaybackByStreamId(streamId);
|
| | | redisCatchStorage.stopPlayback(streamInfo);
|
| | |
| | | // List<MediaServerConfig> mediaServerConfigs = JSON.parseArray(JSON.toJSONString(json), MediaServerConfig.class);
|
| | | // MediaServerConfig mediaServerConfig = mediaServerConfigs.get(0);
|
| | | MediaServerConfig mediaServerConfig = JSON.toJavaObject(json, MediaServerConfig.class);
|
| | | mediaServerConfig.setWanIp(StringUtils.isEmpty(mediaWanIp)? mediaIp: mediaWanIp);
|
| | | mediaServerConfig.setLocalIP(mediaIp);
|
| | | redisCatchStorage.updateMediaInfo(mediaServerConfig);
|
| | | // TODO Auto-generated method stub
|