Update CMakeFiles for RTP Proxy

This commit is contained in:
Gemfield
2019-12-05 19:53:55 +08:00
parent 55d258fafc
commit 55814070f8
3 changed files with 111 additions and 23 deletions

View File

@@ -46,6 +46,7 @@
#include "WebApi.h"
#include "WebHook.h"
#include "Thread/WorkThreadPool.h"
#include "Rtp/RtpSelector.h"
#if !defined(_WIN32)
#include "FFmpegSource.h"
@@ -692,6 +693,19 @@ void installWebApi() {
invoker.responseFile(headerIn,StrCaseMap(),exePath());
});
API_REGIST(api,getSsrcInfo,{
CHECK_SECRET();
CHECK_ARGS("ssrc");
auto process = RtpSelector::Instance().getProcess(allArgs["ssrc"],false);
if(!process){
val["exist"] = false;
return;
}
val["exist"] = true;
val["peer_ip"] = process->get_peer_ip();
val["peer_port"] = process->get_peer_port();
});
// 开始录制hls或MP4
API_REGIST(api,startRecord,{
CHECK_SECRET();