Add support for JSEP offer/answer with transceivers

This change adds support to PeerConnection's CreateOffer/
CreateAnswer/SetLocalDescription/SetRemoteDescription for
Unified Plan SDP mapping to/from RtpTransceivers. This behavior
is enabled using the kUnifiedPlan SDP semantics in the
PeerConnection configuration.

Bug: webrtc:7600
Change-Id: I4b44f5d3690887d387bf9c47eac00db8ec974571
Reviewed-on: https://webrtc-review.googlesource.com/28341
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21442}
This commit is contained in:
Steve Anton
2017-12-22 16:02:54 -08:00
committed by Commit Bot
parent 24de1735b7
commit dcc3c02468
10 changed files with 1518 additions and 155 deletions

View File

@ -93,6 +93,21 @@ class PeerConnectionWrapper {
bool SetRemoteDescription(std::unique_ptr<SessionDescriptionInterface> desc,
RTCError* error_out);
// Does a round of offer/answer with the local PeerConnectionWrapper
// generating the offer and the given PeerConnectionWrapper generating the
// answer.
// Equivalent to:
// 1. this->CreateOffer()
// 2. this->SetLocalDescription(offer)
// 3. answerer->SetRemoteDescription(offer)
// 4. answerer->CreateAnswer()
// 5. answerer->SetLocalDescription(answer)
// 6. this->SetRemoteDescription(answer)
// Returns true if all steps succeed, false otherwise.
// Suggested usage:
// ASSERT_TRUE(caller->ExchangeOfferAnswerWith(callee.get()));
bool ExchangeOfferAnswerWith(PeerConnectionWrapper* answerer);
// The following are wrappers for the underlying PeerConnection's
// AddTransceiver method. They return the result of calling AddTransceiver
// with the given arguments, DCHECKing if there is an error.