Skip to content

Commit

Permalink
WebRTC: Negotiate publish/play error and print sdp info.
Browse files Browse the repository at this point in the history
  • Loading branch information
chundonglinlin committed Mar 6, 2023
1 parent dc7be76 commit abbb18a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trunk/src/app/srs_app_rtc_conn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,7 @@ srs_error_t SrsRtcConnection::add_publisher(SrsRtcUserConfig* ruc, SrsSdp& local

// TODO: FIXME: Change to api of stream desc.
if ((err = negotiate_publish_capability(ruc, stream_desc)) != srs_success) {
srs_warn("publish negotiate, offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str());
return srs_error_wrap(err, "publish negotiate, offer=%s", ruc->remote_sdp_str_.c_str());
}

Expand Down Expand Up @@ -1935,6 +1936,7 @@ srs_error_t SrsRtcConnection::add_player(SrsRtcUserConfig* ruc, SrsSdp& local_sd

std::map<uint32_t, SrsRtcTrackDescription*> play_sub_relations;
if ((err = negotiate_play_capability(ruc, play_sub_relations)) != srs_success) {
srs_warn("play negotiate, offer=%s", srs_string_replace(ruc->remote_sdp_str_.c_str(), "\r\n", "\\r\\n").c_str());
return srs_error_wrap(err, "play negotiate, offer=%s", ruc->remote_sdp_str_.c_str());
}

Expand Down

0 comments on commit abbb18a

Please sign in to comment.