RTSP支持强制协商RTP传输方式 (#2572)

当客户端发起RTSP SETUP的时候,如果rtp传输类型和配置不一致则返回461 Unsupported
transport。迫使客户端切换到对应rtp传输协议并重新SETUP;目前支持FFMPEG和VLC。
This commit is contained in:
Talus
2023-06-21 15:35:27 +08:00
committed by GitHub
parent 7e117b1c7f
commit 9f753b5e5f
4 changed files with 45 additions and 9 deletions

View File

@@ -209,6 +209,7 @@ const string kHandshakeSecond = RTSP_FIELD "handshakeSecond";
const string kKeepAliveSecond = RTSP_FIELD "keepAliveSecond";
const string kDirectProxy = RTSP_FIELD "directProxy";
const string kLowLatency = RTSP_FIELD"lowLatency";
const string kRtpTransportType = RTSP_FIELD"rtpTransportType";
static onceToken token([]() {
// 默认Md5方式认证
@@ -217,6 +218,7 @@ static onceToken token([]() {
mINI::Instance()[kKeepAliveSecond] = 15;
mINI::Instance()[kDirectProxy] = 1;
mINI::Instance()[kLowLatency] = 0;
mINI::Instance()[kRtpTransportType] = -1;
});
} // namespace Rtsp