Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(736)

Unified Diff: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp

Issue 2097683003: Support legacy offerToReceiveAudio/offerToReceiveVideo fields in RTCOfferOptions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/RTCOfferOptions.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
index 4e01dc02aa1becce3d1962bb91f437018383937e..b6251757b087fb7a23ca5c582d6e6ce08a2480e0 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp
@@ -90,7 +90,7 @@
#include "public/platform/WebRTCStatsRequest.h"
#include "public/platform/WebRTCVoidRequest.h"
#include "wtf/CurrentTime.h"
-
+#include <algorithm>
#include <memory>
namespace blink {
@@ -141,7 +141,8 @@ bool isIceCandidateMissingSdp(const RTCIceCandidateInitOrRTCIceCandidate& candid
WebRTCOfferOptions convertToWebRTCOfferOptions(const RTCOfferOptions& options)
{
return WebRTCOfferOptions(RTCOfferOptionsPlatform::create(
- -1, -1,
+ options.hasOfferToReceiveVideo() ? std::max(options.offerToReceiveVideo(), 0) : -1,
+ options.hasOfferToReceiveAudio() ? std::max(options.offerToReceiveAudio(), 0) : -1,
options.hasVoiceActivityDetection() ? options.voiceActivityDetection() : true,
options.hasIceRestart() ? options.iceRestart() : false));
}
« no previous file with comments | « third_party/WebKit/Source/modules/mediastream/RTCOfferOptions.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698