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

Consumer: Get the RtpStreamRecv instance for the DEFAULT profile too

上级 038523e3
......@@ -229,13 +229,14 @@ namespace RTC
void Consumer::AddProfile(
const RTC::RtpEncodingParameters::Profile profile, const RTC::RtpStream* rtpStream)
{
MS_ASSERT(
profile != RTC::RtpEncodingParameters::Profile::NONE &&
profile != RTC::RtpEncodingParameters::Profile::DEFAULT,
"invalid profile");
MS_ASSERT(profile != RTC::RtpEncodingParameters::Profile::NONE, "invalid profile");
MS_ASSERT(this->profiles.find(profile) == this->profiles.end(), "profile already exists");
MS_ASSERT(
!(profile == RTC::RtpEncodingParameters::Profile::DEFAULT && this->profiles.size() != 0),
"default profile cannot coexist with others");
// Insert the new profile.
this->mapProfileRtpStream[profile] = rtpStream;
this->profiles.insert(profile);
......@@ -249,13 +250,14 @@ namespace RTC
void Consumer::RemoveProfile(const RTC::RtpEncodingParameters::Profile profile)
{
MS_ASSERT(
profile != RTC::RtpEncodingParameters::Profile::NONE &&
profile != RTC::RtpEncodingParameters::Profile::DEFAULT,
"invalid profile");
MS_ASSERT(profile != RTC::RtpEncodingParameters::Profile::NONE, "invalid profile");
MS_ASSERT(this->profiles.find(profile) != this->profiles.end(), "profile not found");
MS_ASSERT(
!(profile == RTC::RtpEncodingParameters::Profile::DEFAULT && this->profiles.size() != 1),
"default profile cannot coexist with others");
// Remove the profile.
this->mapProfileRtpStream.erase(profile);
this->profiles.erase(profile);
......
......@@ -635,10 +635,6 @@ namespace RTC
// Notify about the profiles being enabled.
for (auto& profile : profiles)
{
// Don't announce default profile, but just those for simulcast/SVC.
if (profile == RTC::RtpEncodingParameters::Profile::DEFAULT)
break;
MS_ASSERT(
this->healthyProfiles.find(profile) == this->healthyProfiles.end(),
"profile already in headltyProfiles set");
......@@ -660,10 +656,6 @@ namespace RTC
// Notify about the profiles being disabled.
for (auto& profile : profiles)
{
// Don't announce default profile, but just those for simulcast/SVC.
if (profile == RTC::RtpEncodingParameters::Profile::DEFAULT)
break;
MS_ASSERT(
this->healthyProfiles.find(profile) != this->healthyProfiles.end(),
"profile already in headltyProfiles set");
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论