aboutsummaryrefslogtreecommitdiff
path: root/pc/sdp_offer_answer.h
diff options
context:
space:
mode:
Diffstat (limited to 'pc/sdp_offer_answer.h')
-rw-r--r--pc/sdp_offer_answer.h58
1 files changed, 35 insertions, 23 deletions
diff --git a/pc/sdp_offer_answer.h b/pc/sdp_offer_answer.h
index 0608c38ce5..e5b39b83e7 100644
--- a/pc/sdp_offer_answer.h
+++ b/pc/sdp_offer_answer.h
@@ -227,9 +227,13 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
// Synchronous implementations of SetLocalDescription/SetRemoteDescription
// that return an RTCError instead of invoking a callback.
RTCError ApplyLocalDescription(
- std::unique_ptr<SessionDescriptionInterface> desc);
+ std::unique_ptr<SessionDescriptionInterface> desc,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
RTCError ApplyRemoteDescription(
- std::unique_ptr<SessionDescriptionInterface> desc);
+ std::unique_ptr<SessionDescriptionInterface> desc,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
// Implementation of the offer/answer exchange operations. These are chained
// onto the |operations_chain_| when the public CreateOffer(), CreateAnswer(),
@@ -251,9 +255,12 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
void ChangeSignalingState(
PeerConnectionInterface::SignalingState signaling_state);
- RTCError UpdateSessionState(SdpType type,
- cricket::ContentSource source,
- const cricket::SessionDescription* description);
+ RTCError UpdateSessionState(
+ SdpType type,
+ cricket::ContentSource source,
+ const cricket::SessionDescription* description,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
bool IsUnifiedPlan() const RTC_RUN_ON(signaling_thread());
@@ -286,9 +293,11 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
bool CheckIfNegotiationIsNeeded();
void GenerateNegotiationNeededEvent();
// Helper method which verifies SDP.
- RTCError ValidateSessionDescription(const SessionDescriptionInterface* sdesc,
- cricket::ContentSource source)
- RTC_RUN_ON(signaling_thread());
+ RTCError ValidateSessionDescription(
+ const SessionDescriptionInterface* sdesc,
+ cricket::ContentSource source,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid) RTC_RUN_ON(signaling_thread());
// Updates the local RtpTransceivers according to the JSEP rules. Called as
// part of setting the local/remote description.
@@ -296,7 +305,9 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
cricket::ContentSource source,
const SessionDescriptionInterface& new_session,
const SessionDescriptionInterface* old_local_description,
- const SessionDescriptionInterface* old_remote_description);
+ const SessionDescriptionInterface* old_remote_description,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
// Associate the given transceiver according to the JSEP rules.
RTCErrorOr<
@@ -317,15 +328,6 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
const RtpTransceiver* transceiver,
const SessionDescriptionInterface* sdesc) const;
- // If the BUNDLE policy is max-bundle, then we know for sure that all
- // transports will be bundled from the start. This method returns the BUNDLE
- // group if that's the case, or null if BUNDLE will be negotiated later. An
- // error is returned if max-bundle is specified but the session description
- // does not have a BUNDLE group.
- RTCErrorOr<const cricket::ContentGroup*> GetEarlyBundleGroup(
- const cricket::SessionDescription& desc) const
- RTC_RUN_ON(signaling_thread());
-
// Either creates or destroys the transceiver's BaseChannel according to the
// given media section.
RTCError UpdateTransceiverChannel(
@@ -452,13 +454,15 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
StreamCollection* new_streams);
// Enables media channels to allow sending of media.
- // This enables media to flow on all configured audio/video channels and the
- // RtpDataChannel.
+ // This enables media to flow on all configured audio/video channels.
void EnableSending();
// Push the media parts of the local or remote session description
// down to all of the channels.
- RTCError PushdownMediaDescription(SdpType type,
- cricket::ContentSource source);
+ RTCError PushdownMediaDescription(
+ SdpType type,
+ cricket::ContentSource source,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
RTCError PushdownTransportDescription(cricket::ContentSource source,
SdpType type);
@@ -545,7 +549,10 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
// Based on number of transceivers per media type, enabled or disable
// payload type based demuxing in the affected channels.
- bool UpdatePayloadTypeDemuxingState(cricket::ContentSource source);
+ bool UpdatePayloadTypeDemuxingState(
+ cricket::ContentSource source,
+ const std::map<std::string, const cricket::ContentGroup*>&
+ bundle_groups_by_mid);
// ==================================================================
// Access to pc_ variables
@@ -622,6 +629,11 @@ class SdpOfferAnswerHandler : public SdpStateProvider,
uint32_t negotiation_needed_event_id_ = 0;
bool update_negotiation_needed_on_empty_chain_
RTC_GUARDED_BY(signaling_thread()) = false;
+ // If PT demuxing is successfully negotiated one time we will allow PT
+ // demuxing for the rest of the session so that PT-based apps default to PT
+ // demuxing in follow-up O/A exchanges.
+ bool pt_demuxing_has_been_used_audio_ = false;
+ bool pt_demuxing_has_been_used_video_ = false;
// In Unified Plan, if we encounter remote SDP that does not contain an a=msid
// line we create and use a stream with a random ID for our receivers. This is