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

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

Issue 1315503003: Set the IceConnectionReceivingTimeout as a RTCConfiguration parameter. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Sync and rebased Created 5 years, 3 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 kRtcpMuxPolicyRequire, 226 kRtcpMuxPolicyRequire,
227 }; 227 };
228 228
229 enum TcpCandidatePolicy { 229 enum TcpCandidatePolicy {
230 kTcpCandidatePolicyEnabled, 230 kTcpCandidatePolicyEnabled,
231 kTcpCandidatePolicyDisabled 231 kTcpCandidatePolicyDisabled
232 }; 232 };
233 233
234 // TODO(hbos): Change into class with private data and public getters. 234 // TODO(hbos): Change into class with private data and public getters.
235 struct RTCConfiguration { 235 struct RTCConfiguration {
236 // Default maximum number of packets in the audio jitter buffer.
237 static const int kAudioJitterBufferMaxPackets = 50;
238 // Default ICE connection receiving timeout value in milliseconds.
239 static const int kIceConnectionReceivingTimeout = 2500;
236 // TODO(pthatcher): Rename this ice_transport_type, but update 240 // TODO(pthatcher): Rename this ice_transport_type, but update
237 // Chromium at the same time. 241 // Chromium at the same time.
238 IceTransportsType type; 242 IceTransportsType type;
239 // TODO(pthatcher): Rename this ice_servers, but update Chromium 243 // TODO(pthatcher): Rename this ice_servers, but update Chromium
240 // at the same time. 244 // at the same time.
241 IceServers servers; 245 IceServers servers;
242 // A localhost candidate is signaled whenever a candidate with the any 246 // A localhost candidate is signaled whenever a candidate with the any
243 // address is allocated. 247 // address is allocated.
244 bool enable_localhost_ice_candidate; 248 bool enable_localhost_ice_candidate;
245 BundlePolicy bundle_policy; 249 BundlePolicy bundle_policy;
246 RtcpMuxPolicy rtcp_mux_policy; 250 RtcpMuxPolicy rtcp_mux_policy;
247 TcpCandidatePolicy tcp_candidate_policy; 251 TcpCandidatePolicy tcp_candidate_policy;
248 int audio_jitter_buffer_max_packets; 252 int audio_jitter_buffer_max_packets;
249 bool audio_jitter_buffer_fast_accelerate; 253 bool audio_jitter_buffer_fast_accelerate;
254 int ice_connection_receiving_timeout;
250 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates; 255 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates;
251 256
252 RTCConfiguration() 257 RTCConfiguration()
253 : type(kAll), 258 : type(kAll),
254 enable_localhost_ice_candidate(false), 259 enable_localhost_ice_candidate(false),
255 bundle_policy(kBundlePolicyBalanced), 260 bundle_policy(kBundlePolicyBalanced),
256 rtcp_mux_policy(kRtcpMuxPolicyNegotiate), 261 rtcp_mux_policy(kRtcpMuxPolicyNegotiate),
257 tcp_candidate_policy(kTcpCandidatePolicyEnabled), 262 tcp_candidate_policy(kTcpCandidatePolicyEnabled),
258 audio_jitter_buffer_max_packets(50), 263 audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets),
259 audio_jitter_buffer_fast_accelerate(false) {} 264 audio_jitter_buffer_fast_accelerate(false),
265 ice_connection_receiving_timeout(kIceConnectionReceivingTimeout) {}
260 }; 266 };
261 267
262 struct RTCOfferAnswerOptions { 268 struct RTCOfferAnswerOptions {
263 static const int kUndefined = -1; 269 static const int kUndefined = -1;
264 static const int kMaxOfferToReceiveMedia = 1; 270 static const int kMaxOfferToReceiveMedia = 1;
265 271
266 // The default value for constraint offerToReceiveX:true. 272 // The default value for constraint offerToReceiveX:true.
267 static const int kOfferToReceiveMediaTrue = 1; 273 static const int kOfferToReceiveMediaTrue = 1;
268 274
269 int offer_to_receive_video; 275 int offer_to_receive_video;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // Sets the local session description. 357 // Sets the local session description.
352 // JsepInterface takes the ownership of |desc| even if it fails. 358 // JsepInterface takes the ownership of |desc| even if it fails.
353 // The |observer| callback will be called when done. 359 // The |observer| callback will be called when done.
354 virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, 360 virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
355 SessionDescriptionInterface* desc) = 0; 361 SessionDescriptionInterface* desc) = 0;
356 // Sets the remote session description. 362 // Sets the remote session description.
357 // JsepInterface takes the ownership of |desc| even if it fails. 363 // JsepInterface takes the ownership of |desc| even if it fails.
358 // The |observer| callback will be called when done. 364 // The |observer| callback will be called when done.
359 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, 365 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
360 SessionDescriptionInterface* desc) = 0; 366 SessionDescriptionInterface* desc) = 0;
361 // Sets the ICE connection receiving timeout value in milliseconds.
362 virtual void SetIceConnectionReceivingTimeout(int timeout_ms) {}
363 // Restarts or updates the ICE Agent process of gathering local candidates 367 // Restarts or updates the ICE Agent process of gathering local candidates
364 // and pinging remote candidates. 368 // and pinging remote candidates.
365 virtual bool UpdateIce(const IceServers& configuration, 369 virtual bool UpdateIce(const IceServers& configuration,
366 const MediaConstraintsInterface* constraints) = 0; 370 const MediaConstraintsInterface* constraints) = 0;
367 // Provides a remote candidate to the ICE Agent. 371 // Provides a remote candidate to the ICE Agent.
368 // A copy of the |candidate| will be created and added to the remote 372 // A copy of the |candidate| will be created and added to the remote
369 // description. So the caller of this method still has the ownership of the 373 // description. So the caller of this method still has the ownership of the
370 // |candidate|. 374 // |candidate|.
371 // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will 375 // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will
372 // take the ownership of the |candidate|. 376 // take the ownership of the |candidate|.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 CreatePeerConnectionFactory( 605 CreatePeerConnectionFactory(
602 rtc::Thread* worker_thread, 606 rtc::Thread* worker_thread,
603 rtc::Thread* signaling_thread, 607 rtc::Thread* signaling_thread,
604 AudioDeviceModule* default_adm, 608 AudioDeviceModule* default_adm,
605 cricket::WebRtcVideoEncoderFactory* encoder_factory, 609 cricket::WebRtcVideoEncoderFactory* encoder_factory,
606 cricket::WebRtcVideoDecoderFactory* decoder_factory); 610 cricket::WebRtcVideoDecoderFactory* decoder_factory);
607 611
608 } // namespace webrtc 612 } // namespace webrtc
609 613
610 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_ 614 #endif // TALK_APP_WEBRTC_PEERCONNECTIONINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698