Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #import <Foundation/Foundation.h> | 11 #import <Foundation/Foundation.h> |
| 12 | 12 |
| 13 #import "WebRTC/RTCPeerConnection.h" | 13 #import "WebRTC/RTCPeerConnection.h" |
| 14 #import "WebRTC/RTCVideoTrack.h" | 14 #import "WebRTC/RTCVideoTrack.h" |
| 15 | 15 |
| 16 #import "ARDSettingsModel.h" | |
| 17 | |
| 16 typedef NS_ENUM(NSInteger, ARDAppClientState) { | 18 typedef NS_ENUM(NSInteger, ARDAppClientState) { |
| 17 // Disconnected from servers. | 19 // Disconnected from servers. |
| 18 kARDAppClientStateDisconnected, | 20 kARDAppClientStateDisconnected, |
| 19 // Connecting to servers. | 21 // Connecting to servers. |
| 20 kARDAppClientStateConnecting, | 22 kARDAppClientStateConnecting, |
| 21 // Connected to servers. | 23 // Connected to servers. |
| 22 kARDAppClientStateConnected, | 24 kARDAppClientStateConnected, |
| 23 }; | 25 }; |
| 24 | 26 |
| 25 @class ARDAppClient; | 27 @class ARDAppClient; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 53 // class should only be called from the main queue. | 55 // class should only be called from the main queue. |
| 54 @interface ARDAppClient : NSObject | 56 @interface ARDAppClient : NSObject |
| 55 | 57 |
| 56 // If |shouldGetStats| is true, stats will be reported in 1s intervals through | 58 // If |shouldGetStats| is true, stats will be reported in 1s intervals through |
| 57 // the delegate. | 59 // the delegate. |
| 58 @property(nonatomic, assign) BOOL shouldGetStats; | 60 @property(nonatomic, assign) BOOL shouldGetStats; |
| 59 @property(nonatomic, readonly) ARDAppClientState state; | 61 @property(nonatomic, readonly) ARDAppClientState state; |
| 60 @property(nonatomic, weak) id<ARDAppClientDelegate> delegate; | 62 @property(nonatomic, weak) id<ARDAppClientDelegate> delegate; |
| 61 // Convenience constructor since all expected use cases will need a delegate | 63 // Convenience constructor since all expected use cases will need a delegate |
| 62 // in order to receive remote tracks. | 64 // in order to receive remote tracks. |
| 63 - (instancetype)initWithDelegate:(id<ARDAppClientDelegate>)delegate | 65 - (instancetype)initWithDelegate:(id<ARDAppClientDelegate>)delegate; |
| 64 preferVideoCodec:(NSString*)codec; | |
| 65 | |
| 66 // Sets camera constraints. | |
| 67 - (void)setCameraConstraints:(RTCMediaConstraints *)mediaConstraints; | |
| 68 | |
| 69 // Sets maximum bitrate the rtp sender should use. | |
| 70 - (void)setMaxBitrate:(NSNumber *)maxBitrate; | |
| 71 | 66 |
| 72 // Establishes a connection with the AppRTC servers for the given room id. | 67 // Establishes a connection with the AppRTC servers for the given room id. |
| 73 // If |isLoopback| is true, the call will connect to itself. | 68 // If |isLoopback| is true, the call will connect to itself. |
| 74 // If |isAudioOnly| is true, video will be disabled for the call. | 69 // If |isAudioOnly| is true, video will be disabled for the call. |
| 75 // If |shouldMakeAecDump| is true, an aecdump will be created for the call. | 70 // If |shouldMakeAecDump| is true, an aecdump will be created for the call. |
| 76 // If |shouldUseLevelControl| is true, the level controller will be used | 71 // If |shouldUseLevelControl| is true, the level controller will be used |
| 77 // in the call. | 72 // in the call. |
| 78 - (void)connectToRoomWithId:(NSString *)roomId | 73 - (void)connectToRoomWithId:(NSString *)roomId |
| 74 usingSettings:(ARDSettingsModel *)settings | |
|
daniela-webrtc
2017/03/26 15:49:48
Nit: `using` is implied so you can remove the pref
sakal
2017/03/27 13:34:23
Done.
| |
| 79 isLoopback:(BOOL)isLoopback | 75 isLoopback:(BOOL)isLoopback |
| 80 isAudioOnly:(BOOL)isAudioOnly | 76 isAudioOnly:(BOOL)isAudioOnly |
| 81 shouldMakeAecDump:(BOOL)shouldMakeAecDump | 77 shouldMakeAecDump:(BOOL)shouldMakeAecDump |
| 82 shouldUseLevelControl:(BOOL)shouldUseLevelControl; | 78 shouldUseLevelControl:(BOOL)shouldUseLevelControl; |
| 83 | 79 |
| 84 // Disconnects from the AppRTC servers and any connected clients. | 80 // Disconnects from the AppRTC servers and any connected clients. |
| 85 - (void)disconnect; | 81 - (void)disconnect; |
| 86 | 82 |
| 87 @end | 83 @end |
| OLD | NEW |