Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions trunk/src/app/srs_app_rtc_sdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,12 @@ void SrsSdp::add_candidate(const std::string& protocol, const std::string& ip, c

std::string SrsSdp::get_ice_ufrag() const
{
// Becaues we use BUNDLE, so we can choose the first element.
// For OBS WHIP, use the global ice-ufrag.
if (!session_info_.ice_ufrag_.empty()) {
return session_info_.ice_ufrag_;
}

// Because we use BUNDLE, so we can choose the first element.
for (std::vector<SrsMediaDesc>::const_iterator iter = media_descs_.begin(); iter != media_descs_.end(); ++iter) {
const SrsMediaDesc* desc = &(*iter);
return desc->session_info_.ice_ufrag_;
Expand All @@ -951,7 +956,12 @@ std::string SrsSdp::get_ice_ufrag() const

std::string SrsSdp::get_ice_pwd() const
{
// Becaues we use BUNDLE, so we can choose the first element.
// For OBS WHIP, use the global ice pwd.
if (!session_info_.ice_pwd_.empty()) {
return session_info_.ice_pwd_;
}

// Because we use BUNDLE, so we can choose the first element.
for (std::vector<SrsMediaDesc>::const_iterator iter = media_descs_.begin(); iter != media_descs_.end(); ++iter) {
const SrsMediaDesc* desc = &(*iter);
return desc->session_info_.ice_pwd_;
Expand All @@ -962,7 +972,7 @@ std::string SrsSdp::get_ice_pwd() const

std::string SrsSdp::get_dtls_role() const
{
// Becaues we use BUNDLE, so we can choose the first element.
// Because we use BUNDLE, so we can choose the first element.
for (std::vector<SrsMediaDesc>::const_iterator iter = media_descs_.begin(); iter != media_descs_.end(); ++iter) {
const SrsMediaDesc* desc = &(*iter);
return desc->session_info_.setup_;
Expand Down Expand Up @@ -1132,6 +1142,12 @@ srs_error_t SrsSdp::parse_attr_group(const std::string& value)
srs_error_t err = srs_success;
// @see: https://tools.ietf.org/html/rfc5888#section-5

// Overlook the OBS WHIP group LS, as it is utilized for synchronizing the playback of
// the relevant media streams, see https://datatracker.ietf.org/doc/html/rfc5888#section-7
if (srs_string_starts_with(value, "LS")) {
return err;
}

std::istringstream is(value);

FETCH(is, group_policy_);
Expand Down
5 changes: 4 additions & 1 deletion trunk/src/app/srs_app_rtc_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,10 @@ std::vector<SrsRtcTrackDescription*> SrsRtcSource::get_track_desc(std::string ty
if (! stream_desc_->audio_track_desc_) {
return track_descs;
}
if (stream_desc_->audio_track_desc_->media_->name_ == media_name) {

string name = stream_desc_->audio_track_desc_->media_->name_;
std::transform(name.begin(), name.end(), name.begin(), static_cast<int(*)(int)>(std::tolower));
if (name == media_name) {
track_descs.push_back(stream_desc_->audio_track_desc_);
}
}
Expand Down