提交 dce340a8 authored 作者: José Luis Millán's avatar José Luis Millán

Consumer: GetStats. Include inboundRtpId field along with its stats

上级 3965fca2
...@@ -39,6 +39,7 @@ namespace RTC ...@@ -39,6 +39,7 @@ namespace RTC
const RTC::RtpCodecMimeType& GetMimeType() const; const RTC::RtpCodecMimeType& GetMimeType() const;
float GetLossPercentage() const; float GetLossPercentage() const;
uint64_t GetMaxPacketMs() const; uint64_t GetMaxPacketMs() const;
const std::string& GetId() const;
void RestartStatusCheckTimer(); void RestartStatusCheckTimer();
void StopStatusCheckTimer(); void StopStatusCheckTimer();
...@@ -122,6 +123,11 @@ namespace RTC ...@@ -122,6 +123,11 @@ namespace RTC
{ {
return this->maxPacketMs; return this->maxPacketMs;
} }
inline const std::string& RtpStream::GetId() const
{
return this->rtpStreamId;
}
} // namespace RTC } // namespace RTC
#endif #endif
...@@ -106,6 +106,7 @@ namespace RTC ...@@ -106,6 +106,7 @@ namespace RTC
MS_TRACE(); MS_TRACE();
static const Json::StaticString JsonStringTransportId{ "transportId" }; static const Json::StaticString JsonStringTransportId{ "transportId" };
static const Json::StaticString JsonStringInboundRtpId{ "inboundRtpId" };
Json::Value json(Json::arrayValue); Json::Value json(Json::arrayValue);
...@@ -118,6 +119,20 @@ namespace RTC ...@@ -118,6 +119,20 @@ namespace RTC
jsonRtpStream[JsonStringTransportId] = this->transport->transportId; jsonRtpStream[JsonStringTransportId] = this->transport->transportId;
} }
if (this->effectiveProfile != RTC::RtpEncodingParameters::Profile::NONE)
{
auto it = this->mapProfileRtpStream.find(this->effectiveProfile);
MS_ASSERT(it != this->mapProfileRtpStream.end(), "effective profile does not map to a rtp stream");
auto inboundRtpStream = const_cast<RTC::RtpStream*>(it->second);
auto jsonInboundRtpStream = inboundRtpStream->GetStats();
jsonRtpStream[JsonStringInboundRtpId] = inboundRtpStream->GetId();
json.append(jsonInboundRtpStream);
}
json.append(jsonRtpStream); json.append(jsonRtpStream);
} }
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论