iOS: Move AppRTC logging methods to public headers.
BUG= Review URL: https://codereview.webrtc.org/1241283004 Cr-Commit-Position: refs/heads/master@{#9629}
This commit is contained in:
@ -32,17 +32,16 @@
|
||||
#endif
|
||||
#import "RTCFileLogger.h"
|
||||
#import "RTCICEServer.h"
|
||||
#import "RTCLogging.h"
|
||||
#import "RTCMediaConstraints.h"
|
||||
#import "RTCMediaStream.h"
|
||||
#import "RTCPair.h"
|
||||
#import "RTCPeerConnectionInterface.h"
|
||||
#import "RTCVideoCapturer.h"
|
||||
#import "RTCAVFoundationVideoSource.h"
|
||||
|
||||
#import "ARDAppEngineClient.h"
|
||||
#import "ARDCEODTURNClient.h"
|
||||
#import "ARDJoinResponse.h"
|
||||
#import "ARDLogging.h"
|
||||
#import "ARDMessageResponse.h"
|
||||
#import "ARDSDPUtils.h"
|
||||
#import "ARDSignalingMessage.h"
|
||||
@ -162,7 +161,8 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
[_turnClient requestServersWithCompletionHandler:^(NSArray *turnServers,
|
||||
NSError *error) {
|
||||
if (error) {
|
||||
ARDLog("Error retrieving TURN servers: %@", error.localizedDescription);
|
||||
RTCLogError("Error retrieving TURN servers: %@",
|
||||
error.localizedDescription);
|
||||
}
|
||||
ARDAppClient *strongSelf = weakSelf;
|
||||
[strongSelf.iceServers addObjectsFromArray:turnServers];
|
||||
@ -181,12 +181,12 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
NSError *joinError =
|
||||
[[strongSelf class] errorForJoinResultType:response.result];
|
||||
if (joinError) {
|
||||
ARDLog(@"Failed to join room:%@ on room server.", roomId);
|
||||
RTCLogError(@"Failed to join room:%@ on room server.", roomId);
|
||||
[strongSelf disconnect];
|
||||
[strongSelf.delegate appClient:strongSelf didError:joinError];
|
||||
return;
|
||||
}
|
||||
ARDLog(@"Joined room:%@ on room server.", roomId);
|
||||
RTCLog(@"Joined room:%@ on room server.", roomId);
|
||||
strongSelf.roomId = response.roomId;
|
||||
strongSelf.clientId = response.clientId;
|
||||
strongSelf.isInitiator = response.isInitiator;
|
||||
@ -278,13 +278,13 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
signalingStateChanged:(RTCSignalingState)stateChanged {
|
||||
ARDLog(@"Signaling state changed: %d", stateChanged);
|
||||
RTCLog(@"Signaling state changed: %d", stateChanged);
|
||||
}
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
addedStream:(RTCMediaStream *)stream {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
ARDLog(@"Received %lu video tracks and %lu audio tracks",
|
||||
RTCLog(@"Received %lu video tracks and %lu audio tracks",
|
||||
(unsigned long)stream.videoTracks.count,
|
||||
(unsigned long)stream.audioTracks.count);
|
||||
if (stream.videoTracks.count) {
|
||||
@ -296,17 +296,17 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
removedStream:(RTCMediaStream *)stream {
|
||||
ARDLog(@"Stream was removed.");
|
||||
RTCLog(@"Stream was removed.");
|
||||
}
|
||||
|
||||
- (void)peerConnectionOnRenegotiationNeeded:
|
||||
(RTCPeerConnection *)peerConnection {
|
||||
ARDLog(@"WARNING: Renegotiation needed but unimplemented.");
|
||||
RTCLog(@"WARNING: Renegotiation needed but unimplemented.");
|
||||
}
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
iceConnectionChanged:(RTCICEConnectionState)newState {
|
||||
ARDLog(@"ICE state changed: %d", newState);
|
||||
RTCLog(@"ICE state changed: %d", newState);
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[_delegate appClient:self didChangeConnectionState:newState];
|
||||
});
|
||||
@ -314,7 +314,7 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
iceGatheringChanged:(RTCICEGatheringState)newState {
|
||||
ARDLog(@"ICE gathering state changed: %d", newState);
|
||||
RTCLog(@"ICE gathering state changed: %d", newState);
|
||||
}
|
||||
|
||||
- (void)peerConnection:(RTCPeerConnection *)peerConnection
|
||||
@ -339,7 +339,7 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
error:(NSError *)error {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (error) {
|
||||
ARDLog(@"Failed to create session description. Error: %@", error);
|
||||
RTCLogError(@"Failed to create session description. Error: %@", error);
|
||||
[self disconnect];
|
||||
NSDictionary *userInfo = @{
|
||||
NSLocalizedDescriptionKey: @"Failed to create session description.",
|
||||
@ -368,7 +368,7 @@ static NSInteger const kARDAppClientErrorInvalidRoom = -6;
|
||||
didSetSessionDescriptionWithError:(NSError *)error {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if (error) {
|
||||
ARDLog(@"Failed to set session description. Error: %@", error);
|
||||
RTCLogError(@"Failed to set session description. Error: %@", error);
|
||||
[self disconnect];
|
||||
NSDictionary *userInfo = @{
|
||||
NSLocalizedDescriptionKey: @"Failed to set session description.",
|
||||
|
||||
Reference in New Issue
Block a user