зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1646838: Replace this function with a better named one. r=mjf
Depends on D80272 Differential Revision: https://phabricator.services.mozilla.com/D80275
This commit is contained in:
Родитель
9a4fa6ba9e
Коммит
0d162c327d
|
@ -1432,7 +1432,7 @@ class JsepSessionTest : public JsepSessionTestBase,
|
|||
ValidateDisabledMSection(&msection);
|
||||
continue;
|
||||
}
|
||||
if (!mSdpHelper.IsBundleSlave(*sdp, i)) {
|
||||
if (mSdpHelper.HasOwnTransport(*sdp, i)) {
|
||||
const SdpAttributeList& attrs = msection.GetAttributeList();
|
||||
|
||||
ASSERT_FALSE(attrs.GetIceUfrag().empty());
|
||||
|
|
|
@ -83,7 +83,7 @@ bool SdpHelper::AreOldTransportParamsValid(const Sdp& oldAnswer,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IsBundleSlave(oldAnswer, level)) {
|
||||
if (!HasOwnTransport(oldAnswer, level)) {
|
||||
// The transport attributes on this m-section were thrown away, because it
|
||||
// was bundled.
|
||||
return false;
|
||||
|
@ -91,7 +91,7 @@ bool SdpHelper::AreOldTransportParamsValid(const Sdp& oldAnswer,
|
|||
|
||||
if (newOffer.GetMediaSection(level).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kBundleOnlyAttribute) &&
|
||||
IsBundleSlave(newOffer, level)) {
|
||||
!HasOwnTransport(newOffer, level)) {
|
||||
// It never makes sense to put transport attributes in a bundle-only
|
||||
// m-section
|
||||
return false;
|
||||
|
@ -237,12 +237,12 @@ nsresult SdpHelper::GetBundledMids(const Sdp& sdp, BundledMids* bundledMids) {
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool SdpHelper::IsBundleSlave(const Sdp& sdp, uint16_t level) {
|
||||
bool SdpHelper::HasOwnTransport(const Sdp& sdp, uint16_t level) {
|
||||
auto& msection = sdp.GetMediaSection(level);
|
||||
|
||||
if (!msection.GetAttributeList().HasAttribute(SdpAttribute::kMidAttribute)) {
|
||||
// No mid, definitely no bundle for this m-section
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
std::string mid(msection.GetAttributeList().GetMid());
|
||||
|
||||
|
@ -251,15 +251,15 @@ bool SdpHelper::IsBundleSlave(const Sdp& sdp, uint16_t level) {
|
|||
if (NS_FAILED(rv)) {
|
||||
// Should have been caught sooner.
|
||||
MOZ_ASSERT(false);
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (bundledMids.count(mid) && level != bundledMids[mid]->GetLevel()) {
|
||||
// mid is bundled, and isn't the bundle m-section
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
nsresult SdpHelper::GetMidFromLevel(const Sdp& sdp, uint16_t level,
|
||||
|
|
|
@ -48,7 +48,7 @@ class SdpHelper {
|
|||
|
||||
nsresult GetBundledMids(const Sdp& sdp, BundledMids* bundledMids);
|
||||
|
||||
bool IsBundleSlave(const Sdp& localSdp, uint16_t level);
|
||||
bool HasOwnTransport(const Sdp& localSdp, uint16_t level);
|
||||
void GetBundleGroups(const Sdp& sdp,
|
||||
std::vector<SdpGroupAttributeList::Group>* groups) const;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче