on_play/on_publish hook 新增protocol字段 (#4133 #4143)

对于webhook  涉及到media info的相关信息,增加protocol 的字段,表明是基于什么协议传输的
This commit is contained in:
xiongguangjie
2025-02-13 15:18:47 +08:00
committed by GitHub
parent 8a4d548427
commit 2a85dffdf9
7 changed files with 19 additions and 0 deletions

View File

@@ -134,6 +134,7 @@ void RtspSession::onWholeRtspPacket(Parser &parser) {
_content_base = rtsp._url;
_media_info.parse(parser.fullUrl());
_media_info.schema = RTSP_SCHEMA;
_media_info.protocol = overSsl() ? "rtsps" : "rtsp";
}
using rtsp_request_handler = void (RtspSession::*)(const Parser &parser);
@@ -206,6 +207,7 @@ void RtspSession::handleReq_ANNOUNCE(const Parser &parser) {
//去除.sdp后缀防止EasyDarwin推流器强制添加.sdp后缀
full_url = full_url.substr(0, full_url.length() - 4);
_media_info.parse(full_url);
_media_info.protocol = overSsl() ? "rtsps" : "rtsp";
}
if (_media_info.app.empty() || _media_info.stream.empty()) {