rtc推流添加媒体事件相关接口

This commit is contained in:
xia-chu
2021-04-07 18:18:27 +08:00
parent 155c59e17e
commit 0c5fa36e4d
3 changed files with 48 additions and 1 deletions

View File

@@ -1137,6 +1137,7 @@ void installWebApi() {
auto push_src = std::make_shared<RtspMediaSourceImp>(info._vhost, info._app, info._streamid);
push_src->setProtocolTranslation(enableHls, enableMP4);
auto rtc = WebRtcTransportImp::create(EventPollerPool::Instance().getPoller());
push_src->setListener(rtc);
rtc->attach(push_src, false);
val["sdp"] = rtc->getAnswerSdp(offer_sdp);
val["type"] = "answer";