mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-24 03:30:52 +08:00
RtpServer返回更多信息
This commit is contained in:
parent
9814992a8e
commit
e69c0e648c
@ -1535,7 +1535,11 @@ void installWebApi() {
|
|||||||
obj["vhost"] = vec[0];
|
obj["vhost"] = vec[0];
|
||||||
obj["app"] = vec[1];
|
obj["app"] = vec[1];
|
||||||
obj["stream_id"] = vec[2];
|
obj["stream_id"] = vec[2];
|
||||||
obj["port"] = pr.second->getPort();
|
auto& rtps = pr.second;
|
||||||
|
obj["port"] = rtps->getPort();
|
||||||
|
obj["ssrc"] = rtps->getSSRC();
|
||||||
|
obj["tcp_mode"] = rtps->getTcpMode();
|
||||||
|
obj["only_track"] = rtps->getOnlyTrack();
|
||||||
val["data"].append(obj);
|
val["data"].append(obj);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -295,5 +295,13 @@ void RtpServer::updateSSRC(uint32_t ssrc) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t RtpServer::getSSRC() const {
|
||||||
|
if (_ssrc)
|
||||||
|
return *_ssrc;
|
||||||
|
else if (_tcp_server)
|
||||||
|
return (*_tcp_server)[RtpSession::kSSRC];
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}//namespace mediakit
|
}//namespace mediakit
|
||||||
#endif//defined(ENABLE_RTPPROXY)
|
#endif//defined(ENABLE_RTPPROXY)
|
||||||
|
@ -97,6 +97,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
void updateSSRC(uint32_t ssrc);
|
void updateSSRC(uint32_t ssrc);
|
||||||
|
|
||||||
|
uint32_t getSSRC() const;
|
||||||
|
int getOnlyTrack() const { return _only_track; }
|
||||||
|
TcpMode getTcpMode() const { return _tcp_mode; }
|
||||||
private:
|
private:
|
||||||
// tcp主动模式连接服务器成功回调 [AUTO-TRANSLATED:0775844e]
|
// tcp主动模式连接服务器成功回调 [AUTO-TRANSLATED:0775844e]
|
||||||
// tcp active mode connection server success callback
|
// tcp active mode connection server success callback
|
||||||
|
Loading…
Reference in New Issue
Block a user