Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: talk/app/webrtc/objc/RTCPeerConnectionFactory.mm

Issue 2035473004: RTCPeerConnectionInterface.mm createNativeConfiguration and other clean-up. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed presubmit warnings (lines longer than) Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!"); 92 NSAssert(_nativeFactory, @"Failed to initialize PeerConnectionFactory!");
93 // Uncomment to get sensitive logs emitted (to stderr or logcat). 93 // Uncomment to get sensitive logs emitted (to stderr or logcat).
94 // rtc::LogMessage::LogToDebug(rtc::LS_SENSITIVE); 94 // rtc::LogMessage::LogToDebug(rtc::LS_SENSITIVE);
95 } 95 }
96 return self; 96 return self;
97 } 97 }
98 98
99 - (RTCPeerConnection *)peerConnectionWithConfiguration:(RTCConfiguration *)confi guration 99 - (RTCPeerConnection *)peerConnectionWithConfiguration:(RTCConfiguration *)confi guration
100 constraints:(RTCMediaConstraints *)co nstraints 100 constraints:(RTCMediaConstraints *)co nstraints
101 delegate:(id<RTCPeerConnectionDele gate>)delegate { 101 delegate:(id<RTCPeerConnectionDele gate>)delegate {
102 std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
103 [configuration createNativeConfiguration]);
104 if (!config) {
105 return nil;
106 }
102 return [[RTCPeerConnection alloc] initWithFactory:self.nativeFactory.get() 107 return [[RTCPeerConnection alloc] initWithFactory:self.nativeFactory.get()
103 config:configuration.nativeConfigur ation 108 config:*config
104 constraints:constraints.constraints 109 constraints:constraints.constraints
105 delegate:delegate]; 110 delegate:delegate];
106 } 111 }
107 112
108 - (RTCPeerConnection*) 113 - (RTCPeerConnection*)
109 peerConnectionWithICEServers:(NSArray*)servers 114 peerConnectionWithICEServers:(NSArray*)servers
110 constraints:(RTCMediaConstraints*)constraints 115 constraints:(RTCMediaConstraints*)constraints
111 delegate:(id<RTCPeerConnectionDelegate>)delegate { 116 delegate:(id<RTCPeerConnectionDelegate>)delegate {
112 webrtc::PeerConnectionInterface::IceServers iceServers; 117 webrtc::PeerConnectionInterface::IceServers iceServers;
113 for (RTCICEServer* server in servers) { 118 for (RTCICEServer* server in servers) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 return [[RTCVideoTrack alloc] initWithMediaTrack:track]; 150 return [[RTCVideoTrack alloc] initWithMediaTrack:track];
146 } 151 }
147 152
148 - (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId { 153 - (RTCAudioTrack*)audioTrackWithID:(NSString*)audioId {
149 rtc::scoped_refptr<webrtc::AudioTrackInterface> track = 154 rtc::scoped_refptr<webrtc::AudioTrackInterface> track =
150 self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL); 155 self.nativeFactory->CreateAudioTrack([audioId UTF8String], NULL);
151 return [[RTCAudioTrack alloc] initWithMediaTrack:track]; 156 return [[RTCAudioTrack alloc] initWithMediaTrack:track];
152 } 157 }
153 158
154 @end 159 @end
OLDNEW
« no previous file with comments | « talk/app/webrtc/objc/RTCPeerConnection.mm ('k') | talk/app/webrtc/objc/RTCPeerConnectionInterface.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698