Bug 1963249 - support extmap-allow-mixed;r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D247412
This commit is contained in:
committed by
na-g@nostrum.com
parent
0905650fec
commit
ae22a488c2
@@ -308,6 +308,9 @@ nsresult JsepSessionImpl::CreateOfferMsection(const JsepOfferOptions& options,
|
||||
new SdpFlagAttribute(SdpAttribute::kRtcpRsizeAttribute));
|
||||
}
|
||||
}
|
||||
// Ditto for extmap-allow-mixed
|
||||
msection->GetAttributeList().SetAttribute(
|
||||
new SdpFlagAttribute(SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
|
||||
nsresult rv = AddTransportAttributes(msection, SdpSetupAttribute::kActpass);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@@ -570,6 +573,16 @@ JsepSession::Result JsepSessionImpl::CreateAnswer(
|
||||
mSdpHelper.GetBundleGroups(offer, &groupAttr->mGroups);
|
||||
sdp->GetAttributeList().SetAttribute(groupAttr.release());
|
||||
|
||||
// Copy EXTMAP-ALLOW-MIXED from the offer to the answer
|
||||
if (offer.GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute)) {
|
||||
sdp->GetAttributeList().SetAttribute(
|
||||
new SdpFlagAttribute(SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
} else {
|
||||
sdp->GetAttributeList().RemoveAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < offer.GetMediaSectionCount(); ++i) {
|
||||
// The transceivers are already in place, due to setRemote
|
||||
Maybe<JsepTransceiver> transceiver(GetTransceiverForLevel(i));
|
||||
|
||||
@@ -421,7 +421,11 @@ void JsepTrack::CreateEncodings(
|
||||
SdpAttribute::kRtcpRsizeAttribute)) {
|
||||
rtcpMode = webrtc::RtcpMode::kReducedSize;
|
||||
}
|
||||
negotiatedDetails->mRtpRtcpConf = RtpRtcpConfig(rtcpMode);
|
||||
// extmap-allow-mixed which can be at the media level or the session level
|
||||
constexpr bool SESSION_FALLBACK = true;
|
||||
bool extmapAllowMixed = remote.GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute, SESSION_FALLBACK);
|
||||
negotiatedDetails->mRtpRtcpConf = RtpRtcpConfig(rtcpMode, extmapAllowMixed);
|
||||
|
||||
// TODO add support for b=AS if TIAS is not set (bug 976521)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace mozilla {
|
||||
class JsepTrackNegotiatedDetails {
|
||||
public:
|
||||
JsepTrackNegotiatedDetails()
|
||||
: mTias(0), mRtpRtcpConf(webrtc::RtcpMode::kCompound) {}
|
||||
: mTias(0), mRtpRtcpConf(webrtc::RtcpMode::kCompound, true) {}
|
||||
|
||||
JsepTrackNegotiatedDetails(const JsepTrackNegotiatedDetails& orig)
|
||||
: mExtmap(orig.mExtmap),
|
||||
@@ -65,7 +65,7 @@ class JsepTrackNegotiatedDetails {
|
||||
void ForEachRTPHeaderExtension(
|
||||
const std::function<void(const SdpExtmapAttributeList::Extmap& extmap)>&
|
||||
fn) const {
|
||||
for (auto entry : mExtmap) {
|
||||
for (const auto& entry : mExtmap) {
|
||||
fn(entry.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,20 @@ namespace mozilla {
|
||||
class RtpRtcpConfig {
|
||||
public:
|
||||
RtpRtcpConfig() = delete;
|
||||
explicit RtpRtcpConfig(const webrtc::RtcpMode aMode) : mRtcpMode(aMode) {}
|
||||
explicit RtpRtcpConfig(const webrtc::RtcpMode aMode,
|
||||
const bool aExtmapAllowMixed)
|
||||
: mRtcpMode(aMode), mExtmapAllowMixed(aExtmapAllowMixed) {}
|
||||
webrtc::RtcpMode GetRtcpMode() const { return mRtcpMode; }
|
||||
bool GetExtmapAllowMixed() const { return mExtmapAllowMixed; }
|
||||
|
||||
bool operator==(const RtpRtcpConfig& aOther) const {
|
||||
return mRtcpMode == aOther.mRtcpMode;
|
||||
return mRtcpMode == aOther.mRtcpMode &&
|
||||
mExtmapAllowMixed == aOther.mExtmapAllowMixed;
|
||||
}
|
||||
|
||||
private:
|
||||
webrtc::RtcpMode mRtcpMode;
|
||||
bool mExtmapAllowMixed;
|
||||
};
|
||||
} // namespace mozilla
|
||||
#endif
|
||||
|
||||
@@ -506,7 +506,6 @@ void WebrtcVideoConduit::OnControlConfigChange() {
|
||||
rtpRtcpConfig != mControl.mConfiguredRecvRtpRtcpConfig)) {
|
||||
mControl.mConfiguredRecvCodecs = codecConfigList;
|
||||
mControl.mConfiguredRecvRtpRtcpConfig = rtpRtcpConfig;
|
||||
|
||||
webrtc::VideoReceiveStreamInterface::Config::Rtp newRtp(
|
||||
mRecvStreamConfig.rtp);
|
||||
MOZ_ASSERT(newRtp == mRecvStreamConfig.rtp);
|
||||
@@ -800,6 +799,7 @@ void WebrtcVideoConduit::OnControlConfigChange() {
|
||||
newRtp.payload_name = codecConfig->mName;
|
||||
newRtp.payload_type = codecConfig->mType;
|
||||
newRtp.rtcp_mode = rtpRtcpConfig->GetRtcpMode();
|
||||
newRtp.extmap_allow_mixed = rtpRtcpConfig->GetExtmapAllowMixed();
|
||||
newRtp.max_packet_size = kVideoMtu;
|
||||
newRtp.rtx.payload_type = codecConfig->RtxPayloadTypeIsSet()
|
||||
? codecConfig->mRTXPayloadType
|
||||
|
||||
@@ -379,6 +379,7 @@ void RsdparsaSdpAttributeList::LoadAttribute(RustAttributeList* attributeList,
|
||||
case SdpAttribute::kRtcpRsizeAttribute:
|
||||
case SdpAttribute::kBundleOnlyAttribute:
|
||||
case SdpAttribute::kEndOfCandidatesAttribute:
|
||||
case SdpAttribute::kExtmapAllowMixedAttribute:
|
||||
LoadFlags(attributeList);
|
||||
return;
|
||||
case SdpAttribute::kMaxMessageSizeAttribute:
|
||||
@@ -846,6 +847,10 @@ void RsdparsaSdpAttributeList::LoadFlags(RustAttributeList* attributeList) {
|
||||
if (flags.endOfCandidates) {
|
||||
SetAttribute(new SdpFlagAttribute(SdpAttribute::kEndOfCandidatesAttribute));
|
||||
}
|
||||
if (flags.extmapAllowMixed) {
|
||||
SetAttribute(
|
||||
new SdpFlagAttribute(SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
}
|
||||
}
|
||||
|
||||
void RsdparsaSdpAttributeList::LoadMaxMessageSize(
|
||||
|
||||
@@ -263,6 +263,7 @@ struct RustSdpAttributeFlags {
|
||||
bool rtcpRsize;
|
||||
bool bundleOnly;
|
||||
bool endOfCandidates;
|
||||
bool extmapAllowMixed;
|
||||
};
|
||||
|
||||
struct RustSdpAttributeMsid {
|
||||
|
||||
@@ -1333,6 +1333,8 @@ bool SdpAttribute::IsAllowedAtMediaLevel(AttributeType type) {
|
||||
return true;
|
||||
case kExtmapAttribute:
|
||||
return true;
|
||||
case kExtmapAllowMixedAttribute:
|
||||
return true;
|
||||
case kFingerprintAttribute:
|
||||
return true;
|
||||
case kFmtpAttribute:
|
||||
@@ -1416,6 +1418,8 @@ bool SdpAttribute::IsAllowedAtSessionLevel(AttributeType type) {
|
||||
return true;
|
||||
case kExtmapAttribute:
|
||||
return true;
|
||||
case kExtmapAllowMixedAttribute:
|
||||
return true;
|
||||
case kFingerprintAttribute:
|
||||
return true;
|
||||
case kFmtpAttribute:
|
||||
@@ -1494,6 +1498,8 @@ const std::string SdpAttribute::GetAttributeTypeString(AttributeType type) {
|
||||
return "end-of-candidates";
|
||||
case kExtmapAttribute:
|
||||
return "extmap";
|
||||
case kExtmapAllowMixedAttribute:
|
||||
return "extmap-allow-mixed";
|
||||
case kFingerprintAttribute:
|
||||
return "fingerprint";
|
||||
case kFmtpAttribute:
|
||||
|
||||
@@ -41,6 +41,7 @@ class SdpAttribute {
|
||||
kDtlsMessageAttribute,
|
||||
kEndOfCandidatesAttribute,
|
||||
kExtmapAttribute,
|
||||
kExtmapAllowMixedAttribute,
|
||||
kFingerprintAttribute,
|
||||
kFmtpAttribute,
|
||||
kGroupAttribute,
|
||||
|
||||
@@ -553,6 +553,11 @@ nsresult SdpHelper::CopyStickyParams(const SdpMediaSection& source,
|
||||
new SdpFlagAttribute(SdpAttribute::kRtcpRsizeAttribute));
|
||||
}
|
||||
|
||||
// Keep extmap-allow-mixed setting
|
||||
if (sourceAttrs.HasAttribute(SdpAttribute::kExtmapAllowMixedAttribute)) {
|
||||
destAttrs.SetAttribute(
|
||||
new SdpFlagAttribute(SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,12 @@ void SipccSdpAttributeList::LoadSimpleNumbers(sdp_t* sdp, uint16_t level,
|
||||
}
|
||||
|
||||
void SipccSdpAttributeList::LoadFlags(sdp_t* sdp, uint16_t level) {
|
||||
if (AtSessionLevel()) {
|
||||
// any-level
|
||||
if (sdp_attr_valid(sdp, SDP_ATTR_EXTMAP_ALLOW_MIXED, level, 0, 1)) {
|
||||
SetAttribute(
|
||||
new SdpFlagAttribute(SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
}
|
||||
if (AtSessionLevel()) { // session-level only
|
||||
if (sdp_attr_valid(sdp, SDP_ATTR_ICE_LITE, level, 0, 1)) {
|
||||
SetAttribute(new SdpFlagAttribute(SdpAttribute::kIceLiteAttribute));
|
||||
}
|
||||
@@ -157,10 +162,11 @@ void SipccSdpAttributeList::LoadFlags(sdp_t* sdp, uint16_t level) {
|
||||
if (sdp_attr_valid(sdp, SDP_ATTR_BUNDLE_ONLY, level, 0, 1)) {
|
||||
SetAttribute(new SdpFlagAttribute(SdpAttribute::kBundleOnlyAttribute));
|
||||
}
|
||||
if (sdp_attr_valid(sdp, SDP_ATTR_RTCP_RSIZE, level, 0, 1))
|
||||
if (sdp_attr_valid(sdp, SDP_ATTR_RTCP_RSIZE, level, 0, 1)) {
|
||||
SetAttribute(new SdpFlagAttribute(SdpAttribute::kRtcpRsizeAttribute));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void ConvertDirection(sdp_direction_e sipcc_direction,
|
||||
SdpDirectionAttribute::Direction* dir_outparam) {
|
||||
@@ -180,7 +186,8 @@ static void ConvertDirection(sdp_direction_e sipcc_direction,
|
||||
case SDP_MAX_QOS_DIRECTIONS:
|
||||
// Nothing actually sets this value.
|
||||
// Fall through to MOZ_CRASH below.
|
||||
{}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_CRASH("Invalid direction from sipcc; this is probably corruption");
|
||||
@@ -459,7 +466,8 @@ void SipccSdpAttributeList::LoadSetup(sdp_t* sdp, uint16_t level) {
|
||||
case SDP_MAX_SETUP:
|
||||
// There is no code that will set these.
|
||||
// Fall through to MOZ_CRASH() below.
|
||||
{}
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_CRASH("Invalid setup type from sipcc. This is probably corruption.");
|
||||
|
||||
@@ -613,6 +613,7 @@ pub struct RustSdpAttributeFlags {
|
||||
pub rtcp_rsize: bool,
|
||||
pub bundle_only: bool,
|
||||
pub end_of_candidates: bool,
|
||||
pub extmap_allow_mixed: bool,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
@@ -625,6 +626,7 @@ pub unsafe extern "C" fn sdp_get_attribute_flags(
|
||||
rtcp_rsize: false,
|
||||
bundle_only: false,
|
||||
end_of_candidates: false,
|
||||
extmap_allow_mixed: false,
|
||||
};
|
||||
for attribute in (*attributes).iter() {
|
||||
if let SdpAttribute::IceLite = *attribute {
|
||||
@@ -637,6 +639,8 @@ pub unsafe extern "C" fn sdp_get_attribute_flags(
|
||||
ret.bundle_only = true;
|
||||
} else if let SdpAttribute::EndOfCandidates = *attribute {
|
||||
ret.end_of_candidates = true;
|
||||
} else if let SdpAttribute::ExtmapAllowMixed = *attribute {
|
||||
ret.extmap_allow_mixed = true;
|
||||
}
|
||||
}
|
||||
ret
|
||||
|
||||
@@ -1163,12 +1163,12 @@ class JsepSessionTest : public JsepSessionTestBase,
|
||||
}
|
||||
|
||||
private:
|
||||
typedef size_t Level;
|
||||
typedef std::string TransportId;
|
||||
typedef std::string Mid;
|
||||
typedef std::string Candidate;
|
||||
typedef std::string Address;
|
||||
typedef uint16_t Port;
|
||||
using Level = size_t;
|
||||
using TransportId = std::string;
|
||||
using Mid = std::string;
|
||||
using Candidate = std::string;
|
||||
using Address = std::string;
|
||||
using Port = uint16_t;
|
||||
// Default candidates are put into the m-line, c-line, and rtcp
|
||||
// attribute for endpoints that don't support ICE.
|
||||
std::map<TransportId, std::map<ComponentType, std::pair<Address, Port>>>
|
||||
@@ -1505,6 +1505,20 @@ class JsepSessionTest : public JsepSessionTestBase,
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
bool ExtmapAllowMixed(const JsepSessionImpl& aSession) {
|
||||
if (aSession.mCurrentLocalDescription) {
|
||||
return aSession.mCurrentLocalDescription->GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute);
|
||||
}
|
||||
if (aSession.mPendingLocalDescription) {
|
||||
return aSession.mPendingLocalDescription->GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string mLastError;
|
||||
SdpHelper mSdpHelper;
|
||||
|
||||
@@ -7774,4 +7788,58 @@ TEST_F(JsepSessionTest, TestBundleSupportWithZeroPort) {
|
||||
ASSERT_TRUE(offerTransceiver.mSendTrack.GetActive());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(JsepSessionTest, ExtmapAllowMixedTrueWhenPrensentAtSessionLevel) {
|
||||
AddTracks(*mSessionOff, "audio,video,datachannel");
|
||||
AddTracks(*mSessionAns, "audio,video,datachannel");
|
||||
std::string offer;
|
||||
mSessionOff->CreateOffer(JsepOfferOptions(), &offer);
|
||||
|
||||
// Remove extmap-allow-mixed from the media level
|
||||
ReplaceAll("a=extmap-allow-mixed\r\n", "", &offer);
|
||||
|
||||
// Add extmap-allow-mixed to the session level
|
||||
Replace("m=audio", "a=extmap-allow-mixed\r\nm=audio", &offer);
|
||||
|
||||
mSessionOff->SetLocalDescription(kJsepSdpOffer, offer);
|
||||
mSessionAns->SetRemoteDescription(kJsepSdpOffer, offer);
|
||||
|
||||
std::string answer;
|
||||
mSessionAns->CreateAnswer(JsepAnswerOptions(), &answer);
|
||||
|
||||
mSessionOff->SetRemoteDescription(kJsepSdpAnswer, answer);
|
||||
mSessionAns->SetLocalDescription(kJsepSdpAnswer, answer);
|
||||
|
||||
ASSERT_TRUE(ExtmapAllowMixed(*mSessionOff));
|
||||
ASSERT_TRUE(ExtmapAllowMixed(*mSessionAns));
|
||||
|
||||
mSessionAns->ForEachTransceiver([](JsepTransceiver& aTransceiver) {
|
||||
if (aTransceiver.mSendTrack.GetMediaType()) {
|
||||
ASSERT_TRUE(aTransceiver.mSendTrack.GetNegotiatedDetails()
|
||||
->GetRtpRtcpConfig()
|
||||
.GetExtmapAllowMixed());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
TEST_F(JsepSessionTest, ExtmapAllowMixedCheckDoNotDefaultToSessionLevel) {
|
||||
AddTracks(*mSessionOff, "audio,video,datachannel");
|
||||
AddTracks(*mSessionAns, "audio,video,datachannel");
|
||||
|
||||
std::string offer;
|
||||
mSessionOff->CreateOffer(JsepOfferOptions(), &offer);
|
||||
|
||||
mSessionOff->SetLocalDescription(kJsepSdpOffer, offer);
|
||||
mSessionAns->SetRemoteDescription(kJsepSdpOffer, offer);
|
||||
|
||||
std::string answer;
|
||||
mSessionAns->CreateAnswer(JsepAnswerOptions(), &answer);
|
||||
|
||||
mSessionOff->SetRemoteDescription(kJsepSdpAnswer, answer);
|
||||
mSessionAns->SetLocalDescription(kJsepSdpAnswer, answer);
|
||||
|
||||
ASSERT_FALSE(ExtmapAllowMixed(*mSessionOff));
|
||||
ASSERT_FALSE(ExtmapAllowMixed(*mSessionAns));
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
@@ -420,6 +420,20 @@ class CheckForCodecType {
|
||||
SdpMediaSection::MediaType mType;
|
||||
};
|
||||
|
||||
TEST_F(JsepTrackTest, CheckForAnsweringWithExtmapAllowMixedWhenNotOffered) {
|
||||
Init(SdpMediaSection::kAudio);
|
||||
|
||||
CreateOffer();
|
||||
mOffer->GetMediaSection(0).GetAttributeList().RemoveAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute);
|
||||
CreateAnswer();
|
||||
|
||||
ASSERT_FALSE(mAnswer->GetMediaSection(0).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
Negotiate();
|
||||
SanityCheck();
|
||||
}
|
||||
|
||||
TEST_F(JsepTrackTest, CheckForMismatchedAudioCodecAndVideoTrack) {
|
||||
std::vector<UniquePtr<JsepCodecDescription>> offerCodecs;
|
||||
|
||||
|
||||
@@ -1555,6 +1555,18 @@ TEST_F(SdpTest, parseIceLite) {
|
||||
sdp_attr_is_present(sdp_ptr_, SDP_ATTR_ICE_LITE, SDP_SESSION_LEVEL, 0));
|
||||
}
|
||||
|
||||
TEST_F(SdpTest, parseExtmapAllowMixed) {
|
||||
std::string sdp =
|
||||
"v=0\r\n"
|
||||
"o=- 4294967296 2 IN IP4 127.0.0.1\r\n"
|
||||
"s=SIP Call\r\n"
|
||||
"t=0 0\r\n"
|
||||
"a=extmap-allow-mixed\r\n";
|
||||
ParseSdp(sdp);
|
||||
ASSERT_TRUE(sdp_attr_is_present(sdp_ptr_, SDP_ATTR_EXTMAP_ALLOW_MIXED,
|
||||
SDP_SESSION_LEVEL, 0));
|
||||
}
|
||||
|
||||
class NewSdpTest
|
||||
: public ::testing::Test,
|
||||
public ::testing::WithParamInterface< ::testing::tuple<bool, bool> > {
|
||||
@@ -1918,6 +1930,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAudioVideoOfferLines = {
|
||||
"a=ice-pwd:0000000000000000000000000000000",
|
||||
"a=sendonly",
|
||||
"a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=setup:actpass",
|
||||
"a=rtcp-mux",
|
||||
"a=msid:stream track",
|
||||
@@ -1950,6 +1963,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAudioVideoOfferLines = {
|
||||
"a=rtpmap:122 red/90000",
|
||||
"a=rtpmap:123 ulpfec/90000",
|
||||
"a=fmtp:122 120/121/123",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=recvonly",
|
||||
"a=rtcp-fb:120 nack",
|
||||
"a=rtcp-fb:120 nack pli",
|
||||
@@ -1991,6 +2005,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAudioVideoOfferLines = {
|
||||
"a=rtpmap:0 PCMU/8000",
|
||||
"a=ice-options:foo bar",
|
||||
"a=msid:noappdata",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=bundle-only"};
|
||||
|
||||
// SDP from a basic A/V apprtc call FFX/FFX
|
||||
@@ -2030,6 +2045,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAV1AudioVideoOfferLines = {
|
||||
"a=ice-pwd:0000000000000000000000000000000",
|
||||
"a=sendonly",
|
||||
"a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=setup:actpass",
|
||||
"a=rtcp-mux",
|
||||
"a=msid:stream track",
|
||||
@@ -2056,6 +2072,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAV1AudioVideoOfferLines = {
|
||||
"DF:FA:FB:08:3B:3C:54:1D:D7:D4:05:77:A0:72:9B:14:08:6D:0F:4C",
|
||||
"a=mid:second",
|
||||
"a=rtpmap:98 AV1/90000",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=fmtp:98 profile=1;level-idx=1;tier=1;max-fs=3600;max-fr=30",
|
||||
"a=rtpmap:122 red/90000",
|
||||
"a=rtpmap:123 ulpfec/90000",
|
||||
@@ -2098,6 +2115,7 @@ MOZ_RUNINIT const std::vector<std::string> kBasicAV1AudioVideoOfferLines = {
|
||||
"a=rtpmap:0 PCMU/8000",
|
||||
"a=ice-options:foo bar",
|
||||
"a=msid:noappdata",
|
||||
"a=extmap-allow-mixed",
|
||||
"a=bundle-only"};
|
||||
|
||||
static std::string joinSdp(const std::vector<std::string>& aSdp,
|
||||
@@ -2936,6 +2954,15 @@ TEST_P(NewSdpTest, CheckFlags) {
|
||||
ASSERT_FALSE(Sdp()->GetMediaSection(2).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kIceLiteAttribute));
|
||||
|
||||
ASSERT_FALSE(Sdp()->GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
ASSERT_TRUE(Sdp()->GetMediaSection(0).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
ASSERT_TRUE(Sdp()->GetMediaSection(1).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
ASSERT_TRUE(Sdp()->GetMediaSection(2).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kExtmapAllowMixedAttribute));
|
||||
|
||||
ASSERT_TRUE(Sdp()->GetMediaSection(0).GetAttributeList().HasAttribute(
|
||||
SdpAttribute::kRtcpMuxAttribute));
|
||||
ASSERT_FALSE(Sdp()->GetMediaSection(2).GetAttributeList().HasAttribute(
|
||||
|
||||
@@ -177,7 +177,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecs) {
|
||||
VideoCodecConfig codec(120, "VP8", EncodingConstraints());
|
||||
aControl.mVideoRecvCodecs = {codec};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -206,7 +206,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsFEC) {
|
||||
codecConfig, VideoCodecConfig(1, "ulpfec", EncodingConstraints()),
|
||||
VideoCodecConfig(2, "red", EncodingConstraints())};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
@@ -234,7 +234,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsH264) {
|
||||
aControl.mVideoRecvCodecs = {
|
||||
VideoCodecConfig(120, "H264", EncodingConstraints())};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -269,7 +269,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsMultipleH264) {
|
||||
h264_h.mLevel = 0x01;
|
||||
aControl.mVideoRecvCodecs = {h264_b, h264_h};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 2U);
|
||||
@@ -301,7 +301,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsKeyframeRequestType) {
|
||||
aControl.mReceiving = true;
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -340,7 +340,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsNack) {
|
||||
codecConfig.mNackFbTypes.push_back("");
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -368,7 +368,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsRemb) {
|
||||
codecConfig.mRembFbSet = true;
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -396,7 +396,7 @@ TEST_F(VideoConduitTest, TestConfigureReceiveMediaCodecsTmmbr) {
|
||||
codecConfig.mCcmFbTypes.push_back("tmmbr");
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -425,7 +425,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodec) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendConfig);
|
||||
ASSERT_EQ(Call()->mVideoSendConfig->rtp.payload_name, "VP8");
|
||||
@@ -456,7 +456,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecMaxFps) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
std::vector<webrtc::VideoStream> videoStreams;
|
||||
@@ -486,7 +486,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecMaxMbps) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
SendVideoFrame(640, 480, 1);
|
||||
@@ -516,7 +516,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecDefaults) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
|
||||
{
|
||||
@@ -550,7 +550,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecTias) {
|
||||
codecConfigTias.mTias = 2000000;
|
||||
aControl.mVideoSendCodec = Some(codecConfigTias);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_EQ(Call()->mVideoSendEncoderConfig->max_bitrate_bps, 2000000);
|
||||
{
|
||||
@@ -592,7 +592,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecMaxBr) {
|
||||
encoding.constraints.maxBr = 50000;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
SendVideoFrame(1280, 720, 1);
|
||||
@@ -618,7 +618,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecScaleResolutionBy) {
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mLocalSsrcs = {42, 1729};
|
||||
aControl.mLocalVideoRtxSsrcs = {43, 1730};
|
||||
});
|
||||
@@ -642,7 +642,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecCodecMode) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = webrtc::VideoCodecMode::kScreensharing;
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -663,7 +663,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecFEC) {
|
||||
codecConfig.mREDRTXPayloadType = 3;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendConfig);
|
||||
ASSERT_EQ(Call()->mVideoSendConfig->rtp.ulpfec.ulpfec_payload_type, 1);
|
||||
@@ -715,7 +715,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecNack) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendConfig);
|
||||
ASSERT_EQ(Call()->mVideoSendConfig->rtp.nack.rtp_history_ms, 0);
|
||||
@@ -736,7 +736,7 @@ TEST_F(VideoConduitTest, TestConfigureSendMediaCodecRids) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendConfig);
|
||||
ASSERT_EQ(Call()->mVideoSendConfig->rtp.rids.size(), 0U);
|
||||
@@ -769,7 +769,7 @@ TEST_F(VideoConduitTest, TestOnSinkWantsChanged) {
|
||||
codecConfig.mEncodingConstraints.maxFs = 0;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
rtc::VideoSinkWants wants;
|
||||
@@ -857,7 +857,7 @@ TEST_F(VideoConduitTestScalingLocked, TestOnSinkWantsChanged) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
rtc::VideoSinkWants wants;
|
||||
@@ -911,7 +911,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
}
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = {42, 43, 44};
|
||||
aControl.mLocalVideoRtxSsrcs = {45, 46, 47};
|
||||
@@ -971,7 +971,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = {42, 43, 44};
|
||||
aControl.mLocalVideoRtxSsrcs = {45, 46, 47};
|
||||
@@ -1050,7 +1050,7 @@ TEST_F(VideoConduitTest, TestReconfigureReceiveMediaCodecs) {
|
||||
aControl.mVideoRecvCodecs = {
|
||||
VideoCodecConfig(120, "VP8", EncodingConstraints())};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoReceiveConfig);
|
||||
ASSERT_EQ(Call()->mVideoReceiveConfig->decoders.size(), 1U);
|
||||
@@ -1199,7 +1199,7 @@ TEST_P(VideoConduitCodecModeTest, TestReconfigureSendMediaCodec) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_FALSE(Call()->mVideoSendConfig);
|
||||
@@ -1349,7 +1349,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_FALSE(Call()->mVideoSendConfig);
|
||||
@@ -1507,7 +1507,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncode) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1539,7 +1539,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeMaxFs) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1625,7 +1625,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeMaxFsNegotiatedThenSinkWants) {
|
||||
codecConfig.mEncodingConstraints.maxFs = 3500;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1667,7 +1667,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeMaxFsCodecChange) {
|
||||
codecConfig.mEncodingConstraints.maxFs = 3500;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1713,7 +1713,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1759,7 +1759,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeMaxFsNegotiated) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1814,7 +1814,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeMaxWidthAndHeight) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1852,7 +1852,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeScaleResolutionBy) {
|
||||
encoding.constraints.scaleDownBy = 2;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
});
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -1899,7 +1899,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeSimulcastScaleResolutionBy) {
|
||||
aControl.mTransmitting = true;
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = {42, 43, 44};
|
||||
aControl.mLocalVideoRtxSsrcs = {45, 46, 47};
|
||||
@@ -1945,7 +1945,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = scales;
|
||||
});
|
||||
@@ -2027,7 +2027,7 @@ TEST_P(VideoConduitCodecModeTest,
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = scales;
|
||||
});
|
||||
@@ -2122,7 +2122,7 @@ TEST_P(VideoConduitCodecModeTest, TestVideoEncodeResolutionAlignment) {
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mVideoCodecMode = GetParam();
|
||||
aControl.mLocalSsrcs = scales;
|
||||
});
|
||||
@@ -2156,7 +2156,7 @@ TEST_F(VideoConduitTest, TestSettingRtpRtcpRsize) {
|
||||
mControl.Update([&](auto& aControl) {
|
||||
VideoCodecConfig codecConfig(120, "VP8", EncodingConstraints());
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
RtpRtcpConfig rtcpConf(webrtc::RtcpMode::kReducedSize);
|
||||
RtpRtcpConfig rtcpConf(webrtc::RtcpMode::kReducedSize, true);
|
||||
|
||||
aControl.mReceiving = true;
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
@@ -2181,7 +2181,7 @@ TEST_F(VideoConduitTest, TestRemoteSsrcDefault) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2202,7 +2202,7 @@ TEST_F(VideoConduitTest, TestRemoteSsrcCollision) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2223,7 +2223,7 @@ TEST_F(VideoConduitTest, TestLocalSsrcDefault) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2245,7 +2245,7 @@ TEST_F(VideoConduitTest, TestLocalSsrcCollision) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2268,7 +2268,7 @@ TEST_F(VideoConduitTest, TestLocalSsrcUnorderedCollision) {
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2291,7 +2291,7 @@ TEST_F(VideoConduitTest, TestLocalAndRemoteSsrcCollision) {
|
||||
}
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2362,7 +2362,7 @@ TEST_F(VideoConduitTest, TestVideoConfigurationH264) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -2408,7 +2408,7 @@ TEST_F(VideoConduitTest, TestVideoConfigurationAV1) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
});
|
||||
|
||||
ASSERT_TRUE(Call()->mVideoSendEncoderConfig);
|
||||
@@ -2432,7 +2432,7 @@ TEST_F(VideoConduitTest, TestDegradationPreferences) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoSendCodec = Some(codecConfig);
|
||||
aControl.mVideoSendRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mTransmitting = true;
|
||||
});
|
||||
@@ -2555,7 +2555,7 @@ TEST_F(VideoConduitTest, TestRemoteRtxSsrc) {
|
||||
codecConfig.mRTXPayloadType = 121;
|
||||
aControl.mVideoRecvCodecs = {codecConfig};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mRemoteSsrc = 2;
|
||||
aControl.mRemoteVideoRtxSsrc = 43;
|
||||
@@ -2576,7 +2576,7 @@ TEST_F(VideoConduitTest, TestRemoteRtxSsrc) {
|
||||
codecConfig264.mRTXPayloadType = 97;
|
||||
aControl.mVideoRecvCodecs = {codecConfig, codecConfig264};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mRemoteSsrc = 2;
|
||||
aControl.mRemoteVideoRtxSsrc = 43;
|
||||
@@ -2594,7 +2594,7 @@ TEST_F(VideoConduitTest, TestRemoteRtxSsrc) {
|
||||
codecConfig.mEncodings.emplace_back();
|
||||
aControl.mVideoRecvCodecs = {codecConfig, codecConfig264};
|
||||
aControl.mVideoRecvRtpRtcpConfig =
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound));
|
||||
Some(RtpRtcpConfig(webrtc::RtcpMode::kCompound, true));
|
||||
aControl.mReceiving = true;
|
||||
aControl.mRemoteSsrc = 2;
|
||||
aControl.mRemoteVideoRtxSsrc = 43;
|
||||
|
||||
1
third_party/sipcc/ccsdp.h
vendored
1
third_party/sipcc/ccsdp.h
vendored
@@ -196,6 +196,7 @@ typedef enum {
|
||||
SDP_ATTR_MAXMESSAGESIZE,
|
||||
SDP_ATTR_SSRC_GROUP,
|
||||
SDP_ATTR_RTCP_RSIZE,
|
||||
SDP_ATTR_EXTMAP_ALLOW_MIXED,
|
||||
SDP_MAX_ATTR_TYPES,
|
||||
SDP_ATTR_INVALID
|
||||
} sdp_attr_e;
|
||||
|
||||
2
third_party/sipcc/sdp_main.c
vendored
2
third_party/sipcc/sdp_main.c
vendored
@@ -210,6 +210,8 @@ const sdp_attrarray_t sdp_attr[SDP_MAX_ATTR_TYPES] =
|
||||
sdp_build_attr_ssrc_group},
|
||||
{"rtcp-rsize", sizeof("rtcp-rsize"),
|
||||
sdp_parse_attr_simple_flag, sdp_build_attr_simple_flag},
|
||||
{"extmap-allow-mixed", sizeof("extmap-allow-mixed"),
|
||||
sdp_parse_attr_simple_flag, sdp_build_attr_simple_flag},
|
||||
};
|
||||
|
||||
/* Note: These *must* be in the same order as the enum types. */
|
||||
|
||||
Reference in New Issue
Block a user