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