保留 WebRtcTransport::onCheckSdp 接口。

This commit is contained in:
Johnny
2021-10-12 17:04:21 +08:00
parent 0f4289a584
commit 2a906ad04a
2 changed files with 16 additions and 3 deletions

View File

@@ -188,6 +188,7 @@ std::string WebRtcTransport::getAnswerSdp(const string &offer){
_offer_sdp->loadFrom(offer);
_offer_sdp->checkSdp();
_offer_sdp->checkValidSSRC();
// onCheckSdp(SdpType::offer, *_offer_sdp);
setRemoteDtlsFingerprint(*_offer_sdp);
//// sdp 配置 ////
@@ -202,7 +203,7 @@ std::string WebRtcTransport::getAnswerSdp(const string &offer){
//// 生成answer sdp ////
_answer_sdp = configure.createAnswer(*_offer_sdp);
_answer_sdp->checkSdp();
onCheckAnswer(*_answer_sdp);
onCheckSdp(SdpType::answer, *_answer_sdp);
return _answer_sdp->toString();
} catch (exception &ex) {
onShutdown(SockException(Err_shutdown, ex.what()));
@@ -549,6 +550,17 @@ void WebRtcTransportImp::onCheckAnswer(RtcSession &sdp) {
}
}
void WebRtcTransportImp::onCheckSdp(SdpType type, RtcSession &sdp) {
switch (type) {
case SdpType::answer:
onCheckAnswer(sdp);
break;
default:
// TODO for offer and other
break;
}
}
void WebRtcTransportImp::onRtcConfigure(RtcConfigure &configure) const {
WebRtcTransport::onRtcConfigure(configure);