From 094e7f1fa35ae5f7c77eb8ce693344faf1a62e1a Mon Sep 17 00:00:00 2001 From: Brindusan Cristian Date: Thu, 16 Apr 2020 09:01:26 +0300 Subject: [PATCH] Backed out 2 changesets (bug 1628630) for build bustages at SdpAttribute.h. CLOSED TREE Backed out changeset 5c05d978aa32 (bug 1628630) Backed out changeset bbd66b8940bb (bug 1628630) --- Cargo.lock | 4 +- .../src/sdp/RsdparsaSdpAttributeList.cpp | 10 +--- .../webrtc/signaling/src/sdp/RsdparsaSdpInc.h | 10 ---- .../webrtc/signaling/src/sdp/SdpAttribute.cpp | 1 - media/webrtc/signaling/src/sdp/SdpAttribute.h | 34 ------------- .../src/sdp/rsdparsa_capi/Cargo.toml | 2 +- .../src/sdp/rsdparsa_capi/src/attribute.rs | 4 -- .../rust/webrtc-sdp/.cargo-checksum.json | 2 +- third_party/rust/webrtc-sdp/CHANGELOG.md | 3 -- third_party/rust/webrtc-sdp/Cargo.lock | 2 +- third_party/rust/webrtc-sdp/Cargo.toml | 2 +- .../rust/webrtc-sdp/src/attribute_type.rs | 49 ++++--------------- third_party/rust/webrtc-sdp/src/media_type.rs | 3 +- 13 files changed, 18 insertions(+), 108 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3703ead46b3f..6e567f650ad8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5002,9 +5002,9 @@ dependencies = [ [[package]] name = "webrtc-sdp" -version = "0.3.5" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33a041b38913afdc47ea2337fda2bcfdafd2928439422a601bc3bf3cff11a2ee" +checksum = "bbedff74854f271e6e4c47d9fcbc8fbc254d6c153034ba9e0492121035c20cfe" dependencies = [ "log", "url", diff --git a/media/webrtc/signaling/src/sdp/RsdparsaSdpAttributeList.cpp b/media/webrtc/signaling/src/sdp/RsdparsaSdpAttributeList.cpp index 722bc4e27c29..4f231a737274 100644 --- a/media/webrtc/signaling/src/sdp/RsdparsaSdpAttributeList.cpp +++ b/media/webrtc/signaling/src/sdp/RsdparsaSdpAttributeList.cpp @@ -680,9 +680,6 @@ std::tuple strToCodecType( } else if (!nsCRT::strcasecmp(name.c_str(), "telephone-event")) { codec = SdpRtpmapAttributeList::kTelephoneEvent; defaults = {1}; - } else if (!nsCRT::strcasecmp(name.c_str(), "rtx")) { - codec = SdpRtpmapAttributeList::kRtx; - defaults = {0}; } return std::make_tuple(codec, defaults); } @@ -780,16 +777,11 @@ void RsdparsaSdpAttributeList::LoadFmtp(RustAttributeList* attributeList) { fmtpParameters.reset( new SdpFmtpAttributeList::RedParameters(std::move(redParameters))); - } else if (codecName == "RTX") { - MOZ_ASSERT(rustFmtpParameters.rtx); - rustFmtpParameters.rtx.apply([&](const auto& aRtx) { - fmtpParameters.reset( - new SdpFmtpAttributeList::RtxParameters(aRtx.apt, aRtx.rtx_time)); - }); } else { // The parameter set is unknown so skip it continue; } + fmtpList->PushEntry(std::to_string(payloadType), std::move(fmtpParameters)); } SetAttribute(fmtpList.release()); diff --git a/media/webrtc/signaling/src/sdp/RsdparsaSdpInc.h b/media/webrtc/signaling/src/sdp/RsdparsaSdpInc.h index 44563098fab3..03648946e482 100644 --- a/media/webrtc/signaling/src/sdp/RsdparsaSdpInc.h +++ b/media/webrtc/signaling/src/sdp/RsdparsaSdpInc.h @@ -7,8 +7,6 @@ #define _RUSTSDPINC_H_ #include "nsError.h" -#include "mozilla/Maybe.h" -#include "signaling/src/sdp/RsdparsaSdpInc.h" #include #include @@ -195,11 +193,6 @@ struct RustSdpAttributeImageAttr { RustSdpAttributeImageAttrSetList recv; }; -struct RustRtxFmtpParameters { - uint8_t apt; - mozilla::Maybe rtx_time; -}; - struct RustSdpAttributeFmtpParameters { // H264 uint32_t packetization_mode; @@ -225,9 +218,6 @@ struct RustSdpAttributeFmtpParameters { // telephone-event StringView dtmf_tones; - // RTX - mozilla::Maybe rtx; - // Red codecs U8Vec* encodings; diff --git a/media/webrtc/signaling/src/sdp/SdpAttribute.cpp b/media/webrtc/signaling/src/sdp/SdpAttribute.cpp index c90a5ecedc1d..3e86783e4b49 100644 --- a/media/webrtc/signaling/src/sdp/SdpAttribute.cpp +++ b/media/webrtc/signaling/src/sdp/SdpAttribute.cpp @@ -1046,7 +1046,6 @@ static bool ShouldSerializeChannels(SdpRtpmapAttributeList::CodecType type) { case SdpRtpmapAttributeList::kRed: case SdpRtpmapAttributeList::kUlpfec: case SdpRtpmapAttributeList::kTelephoneEvent: - case SdpRtpmapAttributeList::kRtx: return false; case SdpRtpmapAttributeList::kOtherCodec: return true; diff --git a/media/webrtc/signaling/src/sdp/SdpAttribute.h b/media/webrtc/signaling/src/sdp/SdpAttribute.h index f419f1c28e1c..ea47023744f6 100644 --- a/media/webrtc/signaling/src/sdp/SdpAttribute.h +++ b/media/webrtc/signaling/src/sdp/SdpAttribute.h @@ -1071,7 +1071,6 @@ class SdpRtpmapAttributeList : public SdpAttribute { kRed, kUlpfec, kTelephoneEvent, - kRtx, kOtherCodec }; @@ -1154,9 +1153,6 @@ inline std::ostream& operator<<(std::ostream& os, case SdpRtpmapAttributeList::kTelephoneEvent: os << "telephone-event"; break; - case SdpRtpmapAttributeList::kRtx: - os << "rtx"; - break; default: MOZ_ASSERT(false); os << "?"; @@ -1212,36 +1208,6 @@ class SdpFmtpAttributeList : public SdpAttribute { std::vector encodings; }; - class RtxParameters : public Parameters { - public: - uint8_t apt; - Maybe rtx_time; - - RtxParameters(const uint8_t aApt, const Maybe& aRtxTime) - : Parameters(SdpRtpmapAttributeList::kRtx), - apt(aApt), - rtx_time(aRtxTime) {} - - virtual ~RtxParameters() {} - - virtual Parameters* Clone() const override { - return new RtxParameters(*this); - } - - virtual void Serialize(std::ostream& os) const override { - os << "apt=" << apt; - rtx_time.apply([&](const auto& time) { os << ";rtx-time=" << time; }); - } - - virtual bool CompareEq(const Parameters& aOther) const override { - if (aOther.codec_type != codec_type) { - return false; - } - auto other = static_cast(aOther); - return other.apt = apt && other.rtx_time == rtx_time; - } - }; - class H264Parameters : public Parameters { public: static const uint32_t kDefaultProfileLevelId = 0x420010; diff --git a/media/webrtc/signaling/src/sdp/rsdparsa_capi/Cargo.toml b/media/webrtc/signaling/src/sdp/rsdparsa_capi/Cargo.toml index d46b85f89699..3f47bd9ed179 100644 --- a/media/webrtc/signaling/src/sdp/rsdparsa_capi/Cargo.toml +++ b/media/webrtc/signaling/src/sdp/rsdparsa_capi/Cargo.toml @@ -7,5 +7,5 @@ authors = ["Paul Ellenbogen ", [dependencies] libc = "^0.2.0" log = "0.4" -rsdparsa = {package = "webrtc-sdp", version = "0.3.5"} +rsdparsa = {package = "webrtc-sdp", version = "0.3.4"} nserror = { path = "../../../../../../xpcom/rust/nserror" } diff --git a/media/webrtc/signaling/src/sdp/rsdparsa_capi/src/attribute.rs b/media/webrtc/signaling/src/sdp/rsdparsa_capi/src/attribute.rs index f46a124cd963..15d76b02568c 100644 --- a/media/webrtc/signaling/src/sdp/rsdparsa_capi/src/attribute.rs +++ b/media/webrtc/signaling/src/sdp/rsdparsa_capi/src/attribute.rs @@ -425,9 +425,6 @@ pub struct RustSdpAttributeFmtpParameters { // telephone-event pub dtmf_tones: StringView, - // RTX - pub rtx: Option, - // Red pub encodings: *const Vec, @@ -453,7 +450,6 @@ impl<'a> From<&'a SdpAttributeFmtpParameters> for RustSdpAttributeFmtpParameters max_fr: other.max_fr, maxplaybackrate: other.maxplaybackrate, dtmf_tones: StringView::from(other.dtmf_tones.as_str()), - rtx: other.rtx, encodings: &other.encodings, unknown_tokens: &other.unknown_tokens, } diff --git a/third_party/rust/webrtc-sdp/.cargo-checksum.json b/third_party/rust/webrtc-sdp/.cargo-checksum.json index e8c8593ac4fe..3aa55a1759d6 100644 --- a/third_party/rust/webrtc-sdp/.cargo-checksum.json +++ b/third_party/rust/webrtc-sdp/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"CHANGELOG.md":"27eb02bbca9cf758c0e8703f519ec76c0f9e5fa597621c7ecb3c960336de9ee3","CODE_OF_CONDUCT.md":"ab482a6e8d9ed00cc77e0f90d823210e3368201ed98d9fda36033fd19aff24c4","Cargo.lock":"f1fd6bb3492e0cfd27d3eac295f2167bdcf971a204788d83f9017e980233b08c","Cargo.toml":"51e33b2df9946d8231f6aaaba286bba17547c01aeef69ad55436e38b8c5529dd","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"506c403b19399ce72245436bd91b70ee9b07413bc3f6459d0efd475de790486e","examples/file_parser.rs":"fdd2a7e30b6ce8245371e7005e9cc7c32b8a81719fb3506005e5b1deb99847df","examples/sdps/02.sdp":"bda3c63d42091eb8dc6cda46e1ed252020b76bbc78563a36244d49a95ff11d00","examples/sdps/03.sdp":"a18aa7be19dd911779dafce2c92b3ed21084598ecb9eb45c0d665f1925030547","examples/sdps/04.sdp":"a8139befd817711e301a16db7f12e24410add1fa39c8a8de77ae25cdd4baab5e","examples/sdps/05.sdp":"445febdc16afeed4bf36c4b30e1952b8915078248c6bb6f9d4eb6e16c75f7065","examples/sdps/06.sdp":"49fb363dfab70340b3906015e1f4fb8d5058267995dd4e344b0e021429da58de","examples/sdps/07.sdp":"03d2a6847d9a405eeaaec2d7011e81aa73b63b33d22a4f7371dff7e9c82ba096","examples/sdps/08.sdp":"bcab5d8b258e3bcdcd21a3299e51b26e6563d549b74f612780d2e3be8a0495c5","examples/sdps/09.sdp":"c771c5aa3efc4acb4b47f488fb9ceaedd6f94f706fd92c704e98fa26d3f37e29","examples/sdps/10.sdp":"deb23d5578a20df6e16ffbda193a4ba97df7131ce95eac3677b4d2fc74e50003","examples/sdps/11.sdp":"7e14a6d290a659b715f32a5257cb0035126c9bb9c7e1dac26f757bf36c93dc09","examples/sdps/12.sdp":"8ad9b018ba1c62865520d65869b568f6750f4ff93deca238f6c04dd468562dc9","examples/sdps/13.sdp":"d396c398247c253fcf5ed087fd5a3334ce2f8c66efd93638d2e8884dc318eac1","examples/sdps/14.sdp":"b714a4216e8d44bc71b9430d49229b61dd9e6a5b3fbda15ed8c0c76843154c9e","examples/sdps/15.sdp":"c96e468a51db1e205898867dcc95af0bd544676eceb4d930c24cdd4c8e8ce152","examples/sdps/16.sdp":"034c556ef8d0c9972c7b8f37e8b419f343e3ac993794e2f20c946a8ebd1cb781","examples/sdps/17.sdp":"b35628e255798817539420528950b05dd2369920d5c00a0279de25679056363b","examples/sdps/18.sdp":"d60f4530b98f6ab9fa68a4e1c7d899220f43e3596f5ed82b008d867d27d464c6","examples/sdps/19.sdp":"2929f883bc54cfd52d8a41e6dbe4ab46a307611ea6f974d22f6f81e2a6e861cc","examples/sdps/20.sdp":"f087414d44f4edc0238ce429a7fd9ee764180a11758c80dcb3f18ff596411144","examples/sdps/21.sdp":"50ee7dad5aa101cc6460d6136a173b894f8ec3b2304eb6b89739d794c2593858","examples/sdps/22.sdp":"60ba3631584333b07c9ba482b2681dfd5f47961485bd9869c0ce399ac78a28c0","examples/sdps/23.sdp":"e19f374de91927c54019b41681ab9116a781b3434151bbb9b1e333ba5ba15305","examples/sdps/24.sdp":"cf410817c7ac2c61c94b02ae24696da54c5439d182b919f0804aefa985b7dec6","examples/sdps/25.sdp":"0aba5390d78b948477f4116a3665f3b0214f1c7c8cb7d7308563ff7b66b3320c","examples/sdps/26.sdp":"02edf268aec6562db717d2e7e090eccccc336f37232cbd0c9848dc396cd1f68d","examples/sdps/27.sdp":"1950a83ff7311d75eaee8fc6a88f54034540add4a413b8c97daad258bc11510a","examples/sdps/28.sdp":"0bd3d1dad72087f90d67996d71a190c56701e8866f248406db8e183c6deee4cd","examples/sdps/29.sdp":"60a71fab3f0facef4e045f78eabb1ff4f1150393427f6720e1228e010edc2f26","examples/sdps/30.sdp":"52fb5119e4a18026b9fe0e10732e621dd13ace847e68ab51687cb633761eeabc","examples/sdps/31.sdp":"6080176767fc4188903b08f98a6fdbca2478fb923b79f31bb741d91e8cc1c4a5","examples/sdps/32.sdp":"b764977a4be5d3808260eaf93c2ec7c6aba7e4589996dd514e9d3bd8d3d02975","examples/sdps/33.sdp":"bd6367ad1abe795576c58c34be6bf5d2073db3343c0edb02a88cf314176fdc51","examples/sdps/34.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/35.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/36.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/37.sdp":"64623a06b325f6219b645c2cf3072703443104ac68c8f02aeb1ac68107f13ab8","examples/sdps/38.sdp":"f59fd5295eebd62acb79708f5258ac4e92082f5725f50348ba31675c2bd9c3a9","examples/sdps/39.sdp":"e3ea9870d76f6257d27d1222f7b74a247a6556d5361479c64d2db11b5c6e2b8d","examples/sdps/40.sdp":"e3ea9870d76f6257d27d1222f7b74a247a6556d5361479c64d2db11b5c6e2b8d","examples/sdps/41.sdp":"186e94e19a6bd802dd787a1a251c39d903aa86dda4f22bb6bb7aeb7678587141","examples/sdps/extract.sh":"fa9daf98313f57ff7717841da9a5f2bf3e30394baded7c42023173b53a09e6d8","src/address.rs":"6e5614f55ebdd7d1cf8c7278a31e24910f2b46e4d8440b46ff99ed4c4f7bf2d9","src/anonymizer.rs":"37856b19334716327d74c6ecb850ed7f1b193f5f1e5963ad7b2d2822aad4ecfc","src/attribute_type.rs":"d380f02f727fa072c720c4c644b9a6a87c43a756fd5e0859ccf33748eb5253ad","src/error.rs":"a8af6de849501f9927e052b4f407b84803e227462f5cfe7825e5f6c362906e71","src/lib.rs":"b88b1c472adc14aa730762e5f7e8ab4afd23158f3361a38e11739d5634d22ac5","src/media_type.rs":"92f81e8040954ba52b877b6059752edf250dcd10c3ac549c2e0aa0efb2781c94","src/network.rs":"6679c759eb1304315190ac87161affd3517ec9311d728e4c68f4169bfcd5111f","tests/unit_tests.rs":"7e995a78c3f19e3ea0d5ff098ad2ee8b599281f7915da262d166e064ce059cdd"},"package":"33a041b38913afdc47ea2337fda2bcfdafd2928439422a601bc3bf3cff11a2ee"} \ No newline at end of file +{"files":{"CHANGELOG.md":"b5f82159ff84b2b17fee15bc82d0beb0d4637336baa3e05828393ba142aef491","CODE_OF_CONDUCT.md":"ab482a6e8d9ed00cc77e0f90d823210e3368201ed98d9fda36033fd19aff24c4","Cargo.lock":"5a50d46d1246de2206fb7bcff9fd17af633551cc0d3a7b094276d6f0cf360f37","Cargo.toml":"5ed7853cdffe08b4564e873765bdd31f5ffe2390974a4356c4136c85e933dd71","LICENSE":"1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5","README.md":"506c403b19399ce72245436bd91b70ee9b07413bc3f6459d0efd475de790486e","examples/file_parser.rs":"fdd2a7e30b6ce8245371e7005e9cc7c32b8a81719fb3506005e5b1deb99847df","examples/sdps/02.sdp":"bda3c63d42091eb8dc6cda46e1ed252020b76bbc78563a36244d49a95ff11d00","examples/sdps/03.sdp":"a18aa7be19dd911779dafce2c92b3ed21084598ecb9eb45c0d665f1925030547","examples/sdps/04.sdp":"a8139befd817711e301a16db7f12e24410add1fa39c8a8de77ae25cdd4baab5e","examples/sdps/05.sdp":"445febdc16afeed4bf36c4b30e1952b8915078248c6bb6f9d4eb6e16c75f7065","examples/sdps/06.sdp":"49fb363dfab70340b3906015e1f4fb8d5058267995dd4e344b0e021429da58de","examples/sdps/07.sdp":"03d2a6847d9a405eeaaec2d7011e81aa73b63b33d22a4f7371dff7e9c82ba096","examples/sdps/08.sdp":"bcab5d8b258e3bcdcd21a3299e51b26e6563d549b74f612780d2e3be8a0495c5","examples/sdps/09.sdp":"c771c5aa3efc4acb4b47f488fb9ceaedd6f94f706fd92c704e98fa26d3f37e29","examples/sdps/10.sdp":"deb23d5578a20df6e16ffbda193a4ba97df7131ce95eac3677b4d2fc74e50003","examples/sdps/11.sdp":"7e14a6d290a659b715f32a5257cb0035126c9bb9c7e1dac26f757bf36c93dc09","examples/sdps/12.sdp":"8ad9b018ba1c62865520d65869b568f6750f4ff93deca238f6c04dd468562dc9","examples/sdps/13.sdp":"d396c398247c253fcf5ed087fd5a3334ce2f8c66efd93638d2e8884dc318eac1","examples/sdps/14.sdp":"b714a4216e8d44bc71b9430d49229b61dd9e6a5b3fbda15ed8c0c76843154c9e","examples/sdps/15.sdp":"c96e468a51db1e205898867dcc95af0bd544676eceb4d930c24cdd4c8e8ce152","examples/sdps/16.sdp":"034c556ef8d0c9972c7b8f37e8b419f343e3ac993794e2f20c946a8ebd1cb781","examples/sdps/17.sdp":"b35628e255798817539420528950b05dd2369920d5c00a0279de25679056363b","examples/sdps/18.sdp":"d60f4530b98f6ab9fa68a4e1c7d899220f43e3596f5ed82b008d867d27d464c6","examples/sdps/19.sdp":"2929f883bc54cfd52d8a41e6dbe4ab46a307611ea6f974d22f6f81e2a6e861cc","examples/sdps/20.sdp":"f087414d44f4edc0238ce429a7fd9ee764180a11758c80dcb3f18ff596411144","examples/sdps/21.sdp":"50ee7dad5aa101cc6460d6136a173b894f8ec3b2304eb6b89739d794c2593858","examples/sdps/22.sdp":"60ba3631584333b07c9ba482b2681dfd5f47961485bd9869c0ce399ac78a28c0","examples/sdps/23.sdp":"e19f374de91927c54019b41681ab9116a781b3434151bbb9b1e333ba5ba15305","examples/sdps/24.sdp":"cf410817c7ac2c61c94b02ae24696da54c5439d182b919f0804aefa985b7dec6","examples/sdps/25.sdp":"0aba5390d78b948477f4116a3665f3b0214f1c7c8cb7d7308563ff7b66b3320c","examples/sdps/26.sdp":"02edf268aec6562db717d2e7e090eccccc336f37232cbd0c9848dc396cd1f68d","examples/sdps/27.sdp":"1950a83ff7311d75eaee8fc6a88f54034540add4a413b8c97daad258bc11510a","examples/sdps/28.sdp":"0bd3d1dad72087f90d67996d71a190c56701e8866f248406db8e183c6deee4cd","examples/sdps/29.sdp":"60a71fab3f0facef4e045f78eabb1ff4f1150393427f6720e1228e010edc2f26","examples/sdps/30.sdp":"52fb5119e4a18026b9fe0e10732e621dd13ace847e68ab51687cb633761eeabc","examples/sdps/31.sdp":"6080176767fc4188903b08f98a6fdbca2478fb923b79f31bb741d91e8cc1c4a5","examples/sdps/32.sdp":"b764977a4be5d3808260eaf93c2ec7c6aba7e4589996dd514e9d3bd8d3d02975","examples/sdps/33.sdp":"bd6367ad1abe795576c58c34be6bf5d2073db3343c0edb02a88cf314176fdc51","examples/sdps/34.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/35.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/36.sdp":"4dc1bbfdf292f2303ff3e6f26ee9db87164e57464d077e8e94c3c11490d4f839","examples/sdps/37.sdp":"64623a06b325f6219b645c2cf3072703443104ac68c8f02aeb1ac68107f13ab8","examples/sdps/38.sdp":"f59fd5295eebd62acb79708f5258ac4e92082f5725f50348ba31675c2bd9c3a9","examples/sdps/39.sdp":"e3ea9870d76f6257d27d1222f7b74a247a6556d5361479c64d2db11b5c6e2b8d","examples/sdps/40.sdp":"e3ea9870d76f6257d27d1222f7b74a247a6556d5361479c64d2db11b5c6e2b8d","examples/sdps/41.sdp":"186e94e19a6bd802dd787a1a251c39d903aa86dda4f22bb6bb7aeb7678587141","examples/sdps/extract.sh":"fa9daf98313f57ff7717841da9a5f2bf3e30394baded7c42023173b53a09e6d8","src/address.rs":"6e5614f55ebdd7d1cf8c7278a31e24910f2b46e4d8440b46ff99ed4c4f7bf2d9","src/anonymizer.rs":"37856b19334716327d74c6ecb850ed7f1b193f5f1e5963ad7b2d2822aad4ecfc","src/attribute_type.rs":"eeeedc55e8b1cb9136beab61800989df21efbdb9243ce8bb1a46a482cdae2db5","src/error.rs":"a8af6de849501f9927e052b4f407b84803e227462f5cfe7825e5f6c362906e71","src/lib.rs":"b88b1c472adc14aa730762e5f7e8ab4afd23158f3361a38e11739d5634d22ac5","src/media_type.rs":"f7fd44b78026fcf404f294c9afc799d21a802c702139ef7779d787f8d028b058","src/network.rs":"6679c759eb1304315190ac87161affd3517ec9311d728e4c68f4169bfcd5111f","tests/unit_tests.rs":"7e995a78c3f19e3ea0d5ff098ad2ee8b599281f7915da262d166e064ce059cdd"},"package":"bbedff74854f271e6e4c47d9fcbc8fbc254d6c153034ba9e0492121035c20cfe"} \ No newline at end of file diff --git a/third_party/rust/webrtc-sdp/CHANGELOG.md b/third_party/rust/webrtc-sdp/CHANGELOG.md index de2e3209b879..6c58775f74db 100644 --- a/third_party/rust/webrtc-sdp/CHANGELOG.md +++ b/third_party/rust/webrtc-sdp/CHANGELOG.md @@ -1,7 +1,4 @@ # Changelog -## [0.3.5] - 2020-04-07 -### Fixed -- RTX apt can now be zero ## [0.3.4] - 2020-03-31 ### Fixed - Fixed new clippy warnings in stable diff --git a/third_party/rust/webrtc-sdp/Cargo.lock b/third_party/rust/webrtc-sdp/Cargo.lock index dd8867cdca2d..af0bb3a16cab 100644 --- a/third_party/rust/webrtc-sdp/Cargo.lock +++ b/third_party/rust/webrtc-sdp/Cargo.lock @@ -140,7 +140,7 @@ dependencies = [ [[package]] name = "webrtc-sdp" -version = "0.3.5" +version = "0.3.4" dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/third_party/rust/webrtc-sdp/Cargo.toml b/third_party/rust/webrtc-sdp/Cargo.toml index 1ad6fab90bdd..0e8934ac071d 100644 --- a/third_party/rust/webrtc-sdp/Cargo.toml +++ b/third_party/rust/webrtc-sdp/Cargo.toml @@ -12,7 +12,7 @@ [package] name = "webrtc-sdp" -version = "0.3.5" +version = "0.3.4" authors = ["Nils Ohlmeier "] description = "This create parses strings in the format of the Session Description Protocol according to RFC4566. It specifically supports the subset of features required to support WebRTC according to the JSEP draft." readme = "README.md" diff --git a/third_party/rust/webrtc-sdp/src/attribute_type.rs b/third_party/rust/webrtc-sdp/src/attribute_type.rs index 8e00af013785..00c843f197d1 100644 --- a/third_party/rust/webrtc-sdp/src/attribute_type.rs +++ b/third_party/rust/webrtc-sdp/src/attribute_type.rs @@ -544,23 +544,6 @@ impl fmt::Display for SdpAttributeExtmap { } } -#[derive(Clone, Copy)] -#[cfg_attr(feature = "serialize", derive(Serialize))] -pub struct RtxFmtpParameters { - pub apt: u8, - pub rtx_time: Option, -} - -impl fmt::Display for RtxFmtpParameters { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - if let Some(rtx_time) = self.rtx_time { - write!(f, "apt={};rtx-time={}", self.apt, rtx_time) - } else { - write!(f, "apt={}", self.apt) - } - } -} - #[derive(Clone)] #[cfg_attr(feature = "serialize", derive(Serialize))] pub struct SdpAttributeFmtpParameters { @@ -594,8 +577,9 @@ pub struct SdpAttributeFmtpParameters { // telephone-event pub dtmf_tones: String, - // RTX - pub rtx: Option, + // Rtx + pub apt: u8, + pub rtx_time: u32, // Unknown pub unknown_tokens: Vec, @@ -603,9 +587,6 @@ pub struct SdpAttributeFmtpParameters { impl fmt::Display for SdpAttributeFmtpParameters { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - if let Some(ref rtx) = self.rtx { - return write!(f, "{}", rtx); - } write!( f, "{parameters}{red}{dtmf}{unknown}", @@ -2001,7 +1982,8 @@ fn parse_fmtp(to_parse: &str) -> Result { maxplaybackrate: 48000, encodings: Vec::new(), dtmf_tones: "".to_string(), - rtx: None, + apt: 0, + rtx_time: 0, unknown_tokens: Vec::new(), }; @@ -2082,21 +2064,8 @@ fn parse_fmtp(to_parse: &str) -> Result { parameters.useinbandfec = parse_bool(parameter_val, "useinbandfec")? } "CBR" => parameters.cbr = parse_bool(parameter_val, "cbr")?, - "APT" => { - parameters.rtx = Some(RtxFmtpParameters { - apt: parameter_val.parse::()?, - rtx_time: None, - }) - } - "RTX-TIME" => { - if let Some(ref mut rtx) = parameters.rtx { - rtx.rtx_time = Some(parameter_val.parse::()?) - } else { - return Err(SdpParserInternalError::Generic( - "RTX codec must have an APT field".to_string(), - )); - } - } + "APT" => parameters.apt = parameter_val.parse::()?, + "RTX-TIME" => parameters.rtx_time = parameter_val.parse::()?, _ => parameters .unknown_tokens .push((*parameter_token).to_string()), @@ -3622,8 +3591,8 @@ mod tests { assert!( parse_attribute("fmtp:8 x-google-start-bitrate=800; maxplaybackrate=48000;").is_ok() ); - check_parse_and_serialize("fmtp:97 apt=96"); - check_parse_and_serialize("fmtp:97 apt=96;rtx-time=3000"); + assert!(parse_attribute("fmtp:97 apt=96").is_ok()); + assert!(parse_attribute("fmtp:97 apt=96;rtx-time=3000").is_ok()); } #[test] diff --git a/third_party/rust/webrtc-sdp/src/media_type.rs b/third_party/rust/webrtc-sdp/src/media_type.rs index f8974da4869c..d460e2ef0983 100644 --- a/third_party/rust/webrtc-sdp/src/media_type.rs +++ b/third_party/rust/webrtc-sdp/src/media_type.rs @@ -542,7 +542,8 @@ mod tests { maxplaybackrate: 48000, encodings: Vec::new(), dtmf_tones: "".to_string(), - rtx: None, + apt: 0, + rtx_time: 0, unknown_tokens: Vec::new() } },))