Add new PeerConnection APIs to the ObjC SDK

This CL adds wrappers for the following PeerConnection native
APIs to the Objective C API:
- SdpSemantics enum added to the RTCConfiguration
- RTCRtpTransceiver
- RTCPeerConnection.addTrack
- RTCPeerConnection.removeTrack
- RTCPeerConnection.addTransceiver
- RTCPeerConnection.transceivers

Bug: webrtc:8870
Change-Id: I9449df9742a59e90894712dc7749ca30b569d94b
Reviewed-on: https://webrtc-review.googlesource.com/54780
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22214}
This commit is contained in:
Steve Anton
2018-02-27 15:34:53 -08:00
committed by Commit Bot
parent ac7539e2d1
commit 8cb344acfd
12 changed files with 637 additions and 25 deletions

View File

@ -0,0 +1,41 @@
/*
* Copyright 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#import "WebRTC/RTCRtpTransceiver.h"
#include "api/rtptransceiverinterface.h"
NS_ASSUME_NONNULL_BEGIN
@interface RTCRtpTransceiverInit ()
@property(nonatomic, readonly) webrtc::RtpTransceiverInit nativeInit;
@end
@interface RTCRtpTransceiver ()
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::RtpTransceiverInterface>
nativeRtpTransceiver;
/** Initialize an RTCRtpTransceiver with a native RtpTransceiverInterface. */
- (instancetype)initWithNativeRtpTransceiver:
(rtc::scoped_refptr<webrtc::RtpTransceiverInterface>)nativeRtpTransceiver
NS_DESIGNATED_INITIALIZER;
+ (webrtc::RtpTransceiverDirection)nativeRtpTransceiverDirectionFromDirection:
(RTCRtpTransceiverDirection)direction;
+ (RTCRtpTransceiverDirection)rtpTransceiverDirectionFromNativeDirection:
(webrtc::RtpTransceiverDirection)nativeDirection;
@end
NS_ASSUME_NONNULL_END