Adding GetStats APIs for senders/receivers.
Bug: webrtc:10345
Change-Id: Id9c10db91d94323ffe8b9e4e540411837d56aaa4
Reviewed-on: https://webrtc-review.googlesource.com/c/124493
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26867}
diff --git a/sdk/objc/api/peerconnection/RTCPeerConnection.h b/sdk/objc/api/peerconnection/RTCPeerConnection.h
index 500a7ce..c641fdd 100644
--- a/sdk/objc/api/peerconnection/RTCPeerConnection.h
+++ b/sdk/objc/api/peerconnection/RTCPeerConnection.h
@@ -331,6 +331,18 @@
/** Gather statistic through the v2 statistics API. */
- (void)statisticsWithCompletionHandler:(RTCStatisticsCompletionHandler)completionHandler;
+/** Spec-compliant getStats() performing the stats selection algorithm with the
+ * sender.
+ */
+- (void)statisticsForSender:(RTCRtpSender *)sender
+ completionHandler:(RTCStatisticsCompletionHandler)completionHandler;
+
+/** Spec-compliant getStats() performing the stats selection algorithm with the
+ * receiver.
+ */
+- (void)statisticsForReceiver:(RTCRtpReceiver *)receiver
+ completionHandler:(RTCStatisticsCompletionHandler)completionHandler;
+
@end
NS_ASSUME_NONNULL_END