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

Side by Side Diff: talk/app/webrtc/peerconnectioninterface.h

Issue 1369773003: Add a continual_gathering_policy in PeerConnection RTCConfiguration (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Addressed comments Created 5 years, 2 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 2012 Google Inc. 3 * Copyright 2012 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 enum RtcpMuxPolicy { 218 enum RtcpMuxPolicy {
219 kRtcpMuxPolicyNegotiate, 219 kRtcpMuxPolicyNegotiate,
220 kRtcpMuxPolicyRequire, 220 kRtcpMuxPolicyRequire,
221 }; 221 };
222 222
223 enum TcpCandidatePolicy { 223 enum TcpCandidatePolicy {
224 kTcpCandidatePolicyEnabled, 224 kTcpCandidatePolicyEnabled,
225 kTcpCandidatePolicyDisabled 225 kTcpCandidatePolicyDisabled
226 }; 226 };
227 227
228 enum ContinuousGatheringPolicy {
pthatcher1 2015/09/25 22:26:57 Based on http://blog.dictionary.com/continually-vs
honghaiz3 2015/09/25 23:05:00 Done.
229 kGatheringOnce,
230 kGatheringContinuously
pthatcher1 2015/09/25 22:26:57 Cand kGatherContinually
pthatcher1 2015/09/25 22:26:57 The new enum style is GATHERING_CONTINUALLY.
pthatcher1 2015/09/25 22:26:57 kGatherOnce kGatherContinuosly
honghaiz3 2015/09/25 23:05:00 Done.
honghaiz3 2015/09/25 23:05:00 Done.
honghaiz3 2015/09/25 23:05:00 Done.
231 };
232
228 // TODO(hbos): Change into class with private data and public getters. 233 // TODO(hbos): Change into class with private data and public getters.
229 struct RTCConfiguration { 234 struct RTCConfiguration {
230 static const int kUndefined = -1; 235 static const int kUndefined = -1;
231 // Default maximum number of packets in the audio jitter buffer. 236 // Default maximum number of packets in the audio jitter buffer.
232 static const int kAudioJitterBufferMaxPackets = 50; 237 static const int kAudioJitterBufferMaxPackets = 50;
233 // TODO(pthatcher): Rename this ice_transport_type, but update 238 // TODO(pthatcher): Rename this ice_transport_type, but update
234 // Chromium at the same time. 239 // Chromium at the same time.
235 IceTransportsType type; 240 IceTransportsType type;
236 // TODO(pthatcher): Rename this ice_servers, but update Chromium 241 // TODO(pthatcher): Rename this ice_servers, but update Chromium
237 // at the same time. 242 // at the same time.
238 IceServers servers; 243 IceServers servers;
239 // A localhost candidate is signaled whenever a candidate with the any 244 // A localhost candidate is signaled whenever a candidate with the any
240 // address is allocated. 245 // address is allocated.
241 bool enable_localhost_ice_candidate; 246 bool enable_localhost_ice_candidate;
242 BundlePolicy bundle_policy; 247 BundlePolicy bundle_policy;
243 RtcpMuxPolicy rtcp_mux_policy; 248 RtcpMuxPolicy rtcp_mux_policy;
244 TcpCandidatePolicy tcp_candidate_policy; 249 TcpCandidatePolicy tcp_candidate_policy;
245 int audio_jitter_buffer_max_packets; 250 int audio_jitter_buffer_max_packets;
246 bool audio_jitter_buffer_fast_accelerate; 251 bool audio_jitter_buffer_fast_accelerate;
247 int ice_connection_receiving_timeout; 252 int ice_connection_receiving_timeout;
253 ContinuousGatheringPolicy continuous_gathering_policy;
248 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates; 254 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
249 255
250 RTCConfiguration() 256 RTCConfiguration()
251 : type(kAll), 257 : type(kAll),
252 enable_localhost_ice_candidate(false), 258 enable_localhost_ice_candidate(false),
253 bundle_policy(kBundlePolicyBalanced), 259 bundle_policy(kBundlePolicyBalanced),
254 rtcp_mux_policy(kRtcpMuxPolicyNegotiate), 260 rtcp_mux_policy(kRtcpMuxPolicyNegotiate),
255 tcp_candidate_policy(kTcpCandidatePolicyEnabled), 261 tcp_candidate_policy(kTcpCandidatePolicyEnabled),
256 audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets), 262 audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets),
257 audio_jitter_buffer_fast_accelerate(false), 263 audio_jitter_buffer_fast_accelerate(false),
258 ice_connection_receiving_timeout(kUndefined) {} 264 ice_connection_receiving_timeout(kUndefined),
265 continuous_gathering_policy(kGatheringOnce) {}
259 }; 266 };
260 267
261 struct RTCOfferAnswerOptions { 268 struct RTCOfferAnswerOptions {
262 static const int kUndefined = -1; 269 static const int kUndefined = -1;
263 static const int kMaxOfferToReceiveMedia = 1; 270 static const int kMaxOfferToReceiveMedia = 1;
264 271
265 // The default value for constraint offerToReceiveX:true. 272 // The default value for constraint offerToReceiveX:true.
266 static const int kOfferToReceiveMediaTrue = 1; 273 static const int kOfferToReceiveMediaTrue = 1;
267 274
268 int offer_to_receive_video; 275 int offer_to_receive_video;
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 CreatePeerConnectionFactory( 605 CreatePeerConnectionFactory(
599 rtc::Thread* worker_thread, 606 rtc::Thread* worker_thread,
600 rtc::Thread* signaling_thread, 607 rtc::Thread* signaling_thread,
601 AudioDeviceModule* default_adm, 608 AudioDeviceModule* default_adm,
602 cricket::WebRtcVideoEncoderFactory* encoder_factory, 609 cricket::WebRtcVideoEncoderFactory* encoder_factory,
603 cricket::WebRtcVideoDecoderFactory* decoder_factory); 610 cricket::WebRtcVideoDecoderFactory* decoder_factory);
604 611
605 } // namespace webrtc 612 } // namespace webrtc
606 613
607 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 614 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698