diff options
author | fischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-25 00:11:56 +0000 |
---|---|---|
committer | fischman@webrtc.org <fischman@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d> | 2014-03-25 00:11:56 +0000 |
commit | 7fa1fcb72cc7b0d68a5e11d52724504c1cd4ac36 (patch) | |
tree | 9dc142215112428d8db052b80e0f6846ed150fdb /talk/app/webrtc/objc/RTCPeerConnectionFactory.mm | |
parent | ce12f1fd320329b4111f2382225dd2cee1b69381 (diff) | |
download | webrtc-7fa1fcb72cc7b0d68a5e11d52724504c1cd4ac36.tar.gz |
AppRTCDemo(ios): style/cleanup fixes following cr/62871616-p10
BUG=2168
R=noahric@google.com
Review URL: https://webrtc-codereview.appspot.com/9709004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@5768 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'talk/app/webrtc/objc/RTCPeerConnectionFactory.mm')
-rw-r--r-- | talk/app/webrtc/objc/RTCPeerConnectionFactory.mm | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm index ca2eb72bbe..81af8e11fe 100644 --- a/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm +++ b/talk/app/webrtc/objc/RTCPeerConnectionFactory.mm @@ -86,54 +86,55 @@ return self; } -- (RTCPeerConnection *) - peerConnectionWithICEServers:(NSArray *)servers - constraints:(RTCMediaConstraints *)constraints +- (RTCPeerConnection*) + peerConnectionWithICEServers:(NSArray*)servers + constraints:(RTCMediaConstraints*)constraints delegate:(id<RTCPeerConnectionDelegate>)delegate { webrtc::PeerConnectionInterface::IceServers iceServers; - for (RTCICEServer *server in servers) { + for (RTCICEServer* server in servers) { iceServers.push_back(server.iceServer); } - webrtc::RTCPeerConnectionObserver *observer = + webrtc::RTCPeerConnectionObserver* observer = new webrtc::RTCPeerConnectionObserver(delegate); webrtc::DTLSIdentityServiceInterface* dummy_dtls_identity_service = NULL; talk_base::scoped_refptr<webrtc::PeerConnectionInterface> peerConnection = - self.nativeFactory->CreatePeerConnection( - iceServers, constraints.constraints, dummy_dtls_identity_service, - observer); - RTCPeerConnection *pc = + self.nativeFactory->CreatePeerConnection(iceServers, + constraints.constraints, + dummy_dtls_identity_service, + observer); + RTCPeerConnection* pc = [[RTCPeerConnection alloc] initWithPeerConnection:peerConnection observer:observer]; observer->SetPeerConnection(pc); return pc; } -- (RTCMediaStream *)mediaStreamWithLabel:(NSString *)label { +- (RTCMediaStream*)mediaStreamWithLabel:(NSString*)label { talk_base::scoped_refptr<webrtc::MediaStreamInterface> nativeMediaStream = self.nativeFactory->CreateLocalMediaStream([label UTF8String]); return [[RTCMediaStream alloc] initWithMediaStream:nativeMediaStream]; } -- (RTCVideoSource *)videoSourceWithCapturer:(RTCVideoCapturer *)capturer - constraints:(RTCMediaConstraints *)constraints { +- (RTCVideoSource*)videoSourceWithCapturer:(RTCVideoCapturer*)capturer + constraints:(RTCMediaConstraints*)constraints { if (!capturer) { return nil; } talk_base::scoped_refptr<webrtc::VideoSourceInterface> source = - self.nativeFactory->CreateVideoSource([capturer release_native_capturer], + self.nativeFactory->CreateVideoSource([capturer takeNativeCapturer], constraints.constraints); return [[RTCVideoSource alloc] initWithMediaSource:source]; } -- (RTCVideoTrack *)videoTrackWithID:(NSString *)videoId - source:(RTCVideoSource *)source { +- (RTCVideoTrack*)videoTrackWithID:(NSString*)videoId + source:(RTCVideoSource*)source { talk_base::scoped_refptr<webrtc::VideoTrackInterface> track = self.nativeFactory->CreateVideoTrack([videoId UTF8String], source.videoSource); return [[RTCVideoTrack alloc] initWithMediaTrack:track]; } -- (RTCAudioTrack *)audioTrackWithID:(NSString *)audioId { +- (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId { talk_base::scoped_refptr<webrtc::AudioTrackInterface> track = self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL); return [[RTCAudioTrack alloc] initWithMediaTrack:track]; |