zlm getRtpInfo api
This commit is contained in:
parent
2bd4a826d8
commit
595bcd065a
@ -0,0 +1,32 @@
|
|||||||
|
package cn.skcks.docking.gb28181.media.dto.rtp;
|
||||||
|
|
||||||
|
import cn.skcks.docking.gb28181.media.dto.status.ResponseStatus;
|
||||||
|
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonNaming;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
|
||||||
|
public class GetRtpInfoResp {
|
||||||
|
private ResponseStatus code;
|
||||||
|
/**
|
||||||
|
* 是否存在
|
||||||
|
*/
|
||||||
|
private Boolean exist;
|
||||||
|
/**
|
||||||
|
* 推流客户端ip
|
||||||
|
*/
|
||||||
|
private String peerIp;
|
||||||
|
/**
|
||||||
|
* 客户端端口号
|
||||||
|
*/
|
||||||
|
private Integer peerPort;
|
||||||
|
/**
|
||||||
|
* 本地监听的网卡ip
|
||||||
|
*/
|
||||||
|
private String localIp;
|
||||||
|
/**
|
||||||
|
* 本地监听端口号
|
||||||
|
*/
|
||||||
|
private Integer localPort;
|
||||||
|
}
|
@ -74,4 +74,7 @@ public interface ZlmMediaHttpClient {
|
|||||||
|
|
||||||
@PostMapping("/index/api/getMediaList")
|
@PostMapping("/index/api/getMediaList")
|
||||||
ZlmResponse<List<MediaResp>> getMediaList(@RequestParam String secret,@RequestBody GetMediaList params);
|
ZlmResponse<List<MediaResp>> getMediaList(@RequestParam String secret,@RequestBody GetMediaList params);
|
||||||
|
|
||||||
|
@GetMapping("/index/api/getRtpInfo")
|
||||||
|
GetRtpInfoResp getRtpInfo(@RequestParam String secret,@RequestParam("stream_id") String streamId);
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,6 @@ import cn.skcks.docking.gb28181.media.dto.snap.Snap;
|
|||||||
import cn.skcks.docking.gb28181.media.dto.version.VersionResp;
|
import cn.skcks.docking.gb28181.media.dto.version.VersionResp;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -153,5 +151,13 @@ public class ZlmMediaService {
|
|||||||
public ZlmResponse<List<MediaResp>> getMediaList(GetMediaList params){
|
public ZlmResponse<List<MediaResp>> getMediaList(GetMediaList params){
|
||||||
return exchange.getMediaList(secret, params);
|
return exchange.getMediaList(secret, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 功能:获取rtp代理时的某路ssrc rtp信息
|
||||||
|
* @param streamId RTP的ssrc,16进制字符串或者是流的id(openRtpServer接口指定)
|
||||||
|
*/
|
||||||
|
public GetRtpInfoResp getRtpInfo(String streamId){
|
||||||
|
return exchange.getRtpInfo(secret, streamId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,10 +12,7 @@ import cn.skcks.docking.gb28181.media.dto.media.MediaResp;
|
|||||||
import cn.skcks.docking.gb28181.media.dto.proxy.*;
|
import cn.skcks.docking.gb28181.media.dto.proxy.*;
|
||||||
import cn.skcks.docking.gb28181.media.dto.response.ZlmResponse;
|
import cn.skcks.docking.gb28181.media.dto.response.ZlmResponse;
|
||||||
import cn.skcks.docking.gb28181.media.dto.response.ZlmResponseConvertor;
|
import cn.skcks.docking.gb28181.media.dto.response.ZlmResponseConvertor;
|
||||||
import cn.skcks.docking.gb28181.media.dto.rtp.CloseRtpServer;
|
import cn.skcks.docking.gb28181.media.dto.rtp.*;
|
||||||
import cn.skcks.docking.gb28181.media.dto.rtp.OpenRtpServer;
|
|
||||||
import cn.skcks.docking.gb28181.media.dto.rtp.RtpServer;
|
|
||||||
import cn.skcks.docking.gb28181.media.dto.rtp.StartSendRtp;
|
|
||||||
import cn.skcks.docking.gb28181.media.dto.snap.Snap;
|
import cn.skcks.docking.gb28181.media.dto.snap.Snap;
|
||||||
import cn.skcks.docking.gb28181.media.dto.version.VersionResp;
|
import cn.skcks.docking.gb28181.media.dto.version.VersionResp;
|
||||||
import cn.skcks.docking.gb28181.media.proxy.ZlmMediaService;
|
import cn.skcks.docking.gb28181.media.proxy.ZlmMediaService;
|
||||||
@ -208,4 +205,10 @@ public class MediaServiceTest {
|
|||||||
log.info("\n{}", JsonUtils.toJson(item));
|
log.info("\n{}", JsonUtils.toJson(item));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void getRtcInfo(){
|
||||||
|
GetRtpInfoResp rtpInfo = zlmMediaService.getRtpInfo("test");
|
||||||
|
log.info("{}", rtpInfo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user