diff --git a/media/base/stream_params.cc b/media/base/stream_params.cc index db781acfc7..0fe1be6ac7 100644 --- a/media/base/stream_params.cc +++ b/media/base/stream_params.cc @@ -111,7 +111,7 @@ StreamParams& StreamParams::operator=(const StreamParams&) = default; StreamParams& StreamParams::operator=(StreamParams&&) = default; bool StreamParams::operator==(const StreamParams& other) const { - return (groupid == other.groupid && id == other.id && ssrcs == other.ssrcs && + return (id == other.id && ssrcs == other.ssrcs && ssrc_groups == other.ssrc_groups && cname == other.cname && stream_ids_ == other.stream_ids_ && // RIDs are not required to be in the same order for equality. @@ -122,9 +122,6 @@ std::string StreamParams::ToString() const { char buf[2 * 1024]; rtc::SimpleStringBuilder sb(buf); sb << "{"; - if (!groupid.empty()) { - sb << "groupid:" << groupid << ";"; - } if (!id.empty()) { sb << "id:" << id << ";"; } diff --git a/media/base/stream_params.h b/media/base/stream_params.h index b8c37706df..1f46469cb5 100644 --- a/media/base/stream_params.h +++ b/media/base/stream_params.h @@ -183,11 +183,6 @@ struct StreamParams { std::string ToString() const; - // Resource of the MUC jid of the participant of with this stream. - // For 1:1 calls, should be left empty (which means remote streams - // and local streams should not be mixed together). This is not used - // internally and should be deprecated. - std::string groupid; // A unique identifier of the StreamParams object. When the SDP is created, // this comes from the track ID of the sender that the StreamParams object // is associated with. @@ -224,26 +219,22 @@ struct StreamParams { std::vector rids_; }; -// A Stream can be selected by either groupid+id or ssrc. +// A Stream can be selected by either id or ssrc. struct StreamSelector { explicit StreamSelector(uint32_t ssrc) : ssrc(ssrc) {} - StreamSelector(const std::string& groupid, const std::string& streamid) - : ssrc(0), groupid(groupid), streamid(streamid) {} - explicit StreamSelector(const std::string& streamid) : ssrc(0), streamid(streamid) {} bool Matches(const StreamParams& stream) const { if (ssrc == 0) { - return stream.groupid == groupid && stream.id == streamid; + return stream.id == streamid; } else { return stream.has_ssrc(ssrc); } } uint32_t ssrc; - std::string groupid; std::string streamid; }; @@ -274,19 +265,15 @@ inline const StreamParams* GetStreamBySsrc(const StreamParamsVec& streams, } inline const StreamParams* GetStreamByIds(const StreamParamsVec& streams, - const std::string& groupid, const std::string& id) { - return GetStream(streams, [&groupid, &id](const StreamParams& sp) { - return sp.groupid == groupid && sp.id == id; - }); + return GetStream(streams, + [&id](const StreamParams& sp) { return sp.id == id; }); } inline StreamParams* GetStreamByIds(StreamParamsVec& streams, - const std::string& groupid, const std::string& id) { - return GetStream(streams, [&groupid, &id](const StreamParams& sp) { - return sp.groupid == groupid && sp.id == id; - }); + return GetStream(streams, + [&id](const StreamParams& sp) { return sp.id == id; }); } inline const StreamParams* GetStream(const StreamParamsVec& streams, @@ -318,11 +305,9 @@ inline bool RemoveStreamBySsrc(StreamParamsVec* streams, uint32_t ssrc) { streams, [&ssrc](const StreamParams& sp) { return sp.has_ssrc(ssrc); }); } inline bool RemoveStreamByIds(StreamParamsVec* streams, - const std::string& groupid, const std::string& id) { - return RemoveStream(streams, [&groupid, &id](const StreamParams& sp) { - return sp.groupid == groupid && sp.id == id; - }); + return RemoveStream(streams, + [&id](const StreamParams& sp) { return sp.id == id; }); } } // namespace cricket diff --git a/pc/channel_unittest.cc b/pc/channel_unittest.cc index b38ab94549..ca5946bf90 100644 --- a/pc/channel_unittest.cc +++ b/pc/channel_unittest.cc @@ -626,13 +626,11 @@ class ChannelTest : public ::testing::Test, public sigslot::has_slots<> { // SdpType::kOffer / SdpType::kAnswer. void TestChangeStreamParamsInContent() { cricket::StreamParams stream1; - stream1.groupid = "group1"; stream1.id = "stream1"; stream1.ssrcs.push_back(kSsrc1); stream1.cname = "stream1_cname"; cricket::StreamParams stream2; - stream2.groupid = "group1"; stream2.id = "stream2"; stream2.ssrcs.push_back(kSsrc2); stream2.cname = "stream2_cname"; diff --git a/pc/media_session.cc b/pc/media_session.cc index 6b8f2544ad..21da2da009 100644 --- a/pc/media_session.cc +++ b/pc/media_session.cc @@ -443,10 +443,7 @@ static bool AddStreamParams( ContainsFlexfecCodec(content_description->codecs()); for (const SenderOptions& sender : sender_options) { - // groupid is empty for StreamParams generated using - // MediaSessionDescriptionFactory. - StreamParams* param = - GetStreamByIds(*current_streams, "" /*group_id*/, sender.track_id); + StreamParams* param = GetStreamByIds(*current_streams, sender.track_id); if (!param) { // This is a new sender. StreamParams stream_param =