Remove the groupid field
This field is unused within WebRTC, and doesn't seem to be essential for any existing customers. If this works well, it will be deprecated and removed. Bug: none Change-Id: I96d7485e4d094abfa6a8c3d1e6855834c13dedd7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/189680 Reviewed-by: Henrik Boström <hbos@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35263}
This commit is contained in:
parent
f9e502d935
commit
519c15de2b
@ -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 << ";";
|
||||
}
|
||||
|
||||
@ -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<RidDescription> 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
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user