Delete almost all use of MediaConstraintsInterface in the PeerConnection API
Bug: webrtc:9239 Change-Id: I04f4370f624346bf72c7e4e090b57987b558213b Reviewed-on: https://webrtc-review.googlesource.com/74420 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24396}
This commit is contained in:
@ -451,7 +451,9 @@ static void JNI_PeerConnection_CreateOffer(
|
||||
rtc::scoped_refptr<CreateSdpObserverJni> observer(
|
||||
new rtc::RefCountedObject<CreateSdpObserverJni>(jni, j_observer,
|
||||
std::move(constraints)));
|
||||
ExtractNativePC(jni, j_pc)->CreateOffer(observer, observer->constraints());
|
||||
PeerConnectionInterface::RTCOfferAnswerOptions options;
|
||||
CopyConstraintsIntoOfferAnswerOptions(observer->constraints(), &options);
|
||||
ExtractNativePC(jni, j_pc)->CreateOffer(observer, options);
|
||||
}
|
||||
|
||||
static void JNI_PeerConnection_CreateAnswer(
|
||||
@ -464,7 +466,9 @@ static void JNI_PeerConnection_CreateAnswer(
|
||||
rtc::scoped_refptr<CreateSdpObserverJni> observer(
|
||||
new rtc::RefCountedObject<CreateSdpObserverJni>(jni, j_observer,
|
||||
std::move(constraints)));
|
||||
ExtractNativePC(jni, j_pc)->CreateAnswer(observer, observer->constraints());
|
||||
PeerConnectionInterface::RTCOfferAnswerOptions options;
|
||||
CopyConstraintsIntoOfferAnswerOptions(observer->constraints(), &options);
|
||||
ExtractNativePC(jni, j_pc)->CreateAnswer(observer, options);
|
||||
}
|
||||
|
||||
static void JNI_PeerConnection_SetLocalDescription(
|
||||
|
||||
@ -448,7 +448,10 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
|
||||
rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserverAdapter>
|
||||
observer(new rtc::RefCountedObject
|
||||
<webrtc::CreateSessionDescriptionObserverAdapter>(completionHandler));
|
||||
_peerConnection->CreateOffer(observer, constraints.nativeConstraints.get());
|
||||
webrtc::PeerConnectionInterface::RTCOfferAnswerOptions options;
|
||||
CopyConstraintsIntoOfferAnswerOptions(constraints.nativeConstraints.get(), &options);
|
||||
|
||||
_peerConnection->CreateOffer(observer, options);
|
||||
}
|
||||
|
||||
- (void)answerForConstraints:(RTCMediaConstraints *)constraints
|
||||
@ -458,7 +461,10 @@ void PeerConnectionDelegateAdapter::OnRemoveTrack(
|
||||
rtc::scoped_refptr<webrtc::CreateSessionDescriptionObserverAdapter>
|
||||
observer(new rtc::RefCountedObject
|
||||
<webrtc::CreateSessionDescriptionObserverAdapter>(completionHandler));
|
||||
_peerConnection->CreateAnswer(observer, constraints.nativeConstraints.get());
|
||||
webrtc::PeerConnectionInterface::RTCOfferAnswerOptions options;
|
||||
CopyConstraintsIntoOfferAnswerOptions(constraints.nativeConstraints.get(), &options);
|
||||
|
||||
_peerConnection->CreateAnswer(observer, options);
|
||||
}
|
||||
|
||||
- (void)setLocalDescription:(RTCSessionDescription *)sdp
|
||||
|
||||
Reference in New Issue
Block a user