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