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