Minor ObjC API tweaks.
Adds setConfiguration back and renames statsId back to reportId.
BUG=
Review URL: https://codereview.webrtc.org/1778033002
Cr-Commit-Position: refs/heads/master@{#11936}
diff --git a/talk/build/build_ios_libs.sh b/talk/build/build_ios_libs.sh
index cc58ccc..5830085 100755
--- a/talk/build/build_ios_libs.sh
+++ b/talk/build/build_ios_libs.sh
@@ -73,7 +73,8 @@
else
FLAVOR="${FLAVOR}-iphonesimulator"
fi
- export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} clang_xcode=1"
+ export GYP_DEFINES="OS=ios target_arch=${TARGET_ARCH} use_objc_h264=1 \
+clang_xcode=1"
export GYP_GENERATORS="ninja"
export GYP_GENERATOR_FLAGS="output_dir=${OUTPUT_DIR}"
webrtc/build/gyp_webrtc talk/build/merge_ios_libs.gyp
diff --git a/webrtc/api/objc/RTCPeerConnection.h b/webrtc/api/objc/RTCPeerConnection.h
index 80e8bf3..68db191 100644
--- a/webrtc/api/objc/RTCPeerConnection.h
+++ b/webrtc/api/objc/RTCPeerConnection.h
@@ -129,6 +129,14 @@
(nullable id<RTCPeerConnectionDelegate>)delegate
NS_DESIGNATED_INITIALIZER;
+/** Sets the PeerConnection's global configuration to |configuration|.
+ * Any changes to STUN/TURN servers or ICE candidate policy will affect the
+ * next gathering phase, and cause the next call to createOffer to generate
+ * new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies
+ * cannot be changed with this method.
+ */
+- (BOOL)setConfiguration:(RTCConfiguration *)configuration;
+
/** Terminate all media and close the transport. */
- (void)close;
diff --git a/webrtc/api/objc/RTCPeerConnection.mm b/webrtc/api/objc/RTCPeerConnection.mm
index 35ac07a..20a8939 100644
--- a/webrtc/api/objc/RTCPeerConnection.mm
+++ b/webrtc/api/objc/RTCPeerConnection.mm
@@ -248,6 +248,10 @@
_peerConnection->ice_gathering_state()];
}
+- (BOOL)setConfiguration:(RTCConfiguration *)configuration {
+ return _peerConnection->SetConfiguration(configuration.nativeConfiguration);
+}
+
- (void)close {
_peerConnection->Close();
}
diff --git a/webrtc/api/objc/RTCStatsReport.h b/webrtc/api/objc/RTCStatsReport.h
index fc66faf..f3f8907 100644
--- a/webrtc/api/objc/RTCStatsReport.h
+++ b/webrtc/api/objc/RTCStatsReport.h
@@ -22,7 +22,7 @@
@property(nonatomic, readonly) NSString *type;
/** The identifier for this object. */
-@property(nonatomic, readonly) NSString *statsId;
+@property(nonatomic, readonly) NSString *reportId;
/** A dictionary holding the actual stats. */
@property(nonatomic, readonly) NSDictionary<NSString *, NSString *> *values;
diff --git a/webrtc/api/objc/RTCStatsReport.mm b/webrtc/api/objc/RTCStatsReport.mm
index b3cd1a1..99cdd28 100644
--- a/webrtc/api/objc/RTCStatsReport.mm
+++ b/webrtc/api/objc/RTCStatsReport.mm
@@ -20,12 +20,12 @@
@synthesize timestamp = _timestamp;
@synthesize type = _type;
-@synthesize statsId = _statsId;
+@synthesize reportId = _reportId;
@synthesize values = _values;
- (NSString *)description {
return [NSString stringWithFormat:@"RTCStatsReport:\n%@\n%@\n%f\n%@",
- _statsId,
+ _reportId,
_type,
_timestamp,
_values];
@@ -37,7 +37,7 @@
if (self = [super init]) {
_timestamp = nativeReport.timestamp();
_type = [NSString stringForStdString:nativeReport.TypeToString()];
- _statsId = [NSString stringForStdString:
+ _reportId = [NSString stringForStdString:
nativeReport.id()->ToString()];
NSUInteger capacity = nativeReport.values().size();