Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 BundlePolicy bundle_policy; | 235 BundlePolicy bundle_policy; |
| 236 RtcpMuxPolicy rtcp_mux_policy; | 236 RtcpMuxPolicy rtcp_mux_policy; |
| 237 TcpCandidatePolicy tcp_candidate_policy; | 237 TcpCandidatePolicy tcp_candidate_policy; |
| 238 int audio_jitter_buffer_max_packets; | 238 int audio_jitter_buffer_max_packets; |
| 239 bool audio_jitter_buffer_fast_accelerate; | 239 bool audio_jitter_buffer_fast_accelerate; |
| 240 int ice_connection_receiving_timeout; // ms | 240 int ice_connection_receiving_timeout; // ms |
| 241 int ice_backup_candidate_pair_ping_interval; // ms | 241 int ice_backup_candidate_pair_ping_interval; // ms |
| 242 ContinualGatheringPolicy continual_gathering_policy; | 242 ContinualGatheringPolicy continual_gathering_policy; |
| 243 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates; | 243 std::vector<rtc::scoped_refptr<rtc::RTCCertificate>> certificates; |
| 244 bool disable_prerenderer_smoothing; | 244 bool disable_prerenderer_smoothing; |
| 245 // Flags corresponding to values set by constraint flags. | |
| 246 // If there is an "override" flag, the "enable/disable" flag is only acted | |
| 247 // on if the "override" flag is true. | |
| 248 bool disable_ipv6; | |
| 249 bool override_dscp; | |
| 250 bool enable_dscp; | |
|
nisse-webrtc
2016/02/23 13:05:32
If an "override"-flag *really* is needed, I guess
hta-webrtc
2016/02/23 14:30:34
One of these (I think it was dscp) is controlled b
nisse-webrtc
2016/02/23 15:11:02
If the default value needs to be configurable at r
hta-webrtc
2016/02/24 12:40:38
I don't think you're confused enough yet :-)
I don
nisse-webrtc
2016/02/24 15:48:19
Very likely.
| |
| 251 bool enable_rtp_data_channel; | |
| 252 bool override_cpu_overuse_detection; | |
| 253 bool enable_cpu_overuse_detection; | |
| 254 bool override_suspend_below_min_bitrate; | |
| 255 bool suspend_below_min_bitrate; | |
| 256 bool override_screencast_min_bitrate; | |
| 257 int screencast_min_bitrate; | |
| 258 bool override_combined_audio_video_bwe; | |
| 259 bool combined_audio_video_bwe; | |
| 260 bool override_enable_dtls_srtp; | |
| 261 bool enable_dtls_srtp; | |
| 245 RTCConfiguration() | 262 RTCConfiguration() |
| 246 : type(kAll), | 263 : type(kAll), |
| 247 bundle_policy(kBundlePolicyBalanced), | 264 bundle_policy(kBundlePolicyBalanced), |
| 248 rtcp_mux_policy(kRtcpMuxPolicyNegotiate), | 265 rtcp_mux_policy(kRtcpMuxPolicyNegotiate), |
| 249 tcp_candidate_policy(kTcpCandidatePolicyEnabled), | 266 tcp_candidate_policy(kTcpCandidatePolicyEnabled), |
| 250 audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets), | 267 audio_jitter_buffer_max_packets(kAudioJitterBufferMaxPackets), |
| 251 audio_jitter_buffer_fast_accelerate(false), | 268 audio_jitter_buffer_fast_accelerate(false), |
| 252 ice_connection_receiving_timeout(kUndefined), | 269 ice_connection_receiving_timeout(kUndefined), |
| 253 ice_backup_candidate_pair_ping_interval(kUndefined), | 270 ice_backup_candidate_pair_ping_interval(kUndefined), |
| 254 continual_gathering_policy(GATHER_ONCE), | 271 continual_gathering_policy(GATHER_ONCE), |
| 255 disable_prerenderer_smoothing(false) {} | 272 disable_prerenderer_smoothing(false), |
| 273 disable_ipv6(false), | |
| 274 override_dscp(false), | |
| 275 enable_dscp(false), | |
| 276 enable_rtp_data_channel(false), | |
| 277 override_cpu_overuse_detection(false), | |
| 278 enable_cpu_overuse_detection(false), | |
| 279 override_suspend_below_min_bitrate(false), | |
| 280 suspend_below_min_bitrate(false), | |
| 281 override_screencast_min_bitrate(false), | |
| 282 screencast_min_bitrate(0), | |
| 283 override_combined_audio_video_bwe(false), | |
| 284 combined_audio_video_bwe(false), | |
| 285 override_enable_dtls_srtp(false), | |
| 286 enable_dtls_srtp(false) {} | |
| 256 }; | 287 }; |
| 257 | 288 |
| 258 struct RTCOfferAnswerOptions { | 289 struct RTCOfferAnswerOptions { |
| 259 static const int kUndefined = -1; | 290 static const int kUndefined = -1; |
| 260 static const int kMaxOfferToReceiveMedia = 1; | 291 static const int kMaxOfferToReceiveMedia = 1; |
| 261 | 292 |
| 262 // The default value for constraint offerToReceiveX:true. | 293 // The default value for constraint offerToReceiveX:true. |
| 263 static const int kOfferToReceiveMediaTrue = 1; | 294 static const int kOfferToReceiveMediaTrue = 1; |
| 264 | 295 |
| 265 int offer_to_receive_video; | 296 int offer_to_receive_video; |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 280 bool voice_activity_detection, | 311 bool voice_activity_detection, |
| 281 bool ice_restart, | 312 bool ice_restart, |
| 282 bool use_rtp_mux) | 313 bool use_rtp_mux) |
| 283 : offer_to_receive_video(offer_to_receive_video), | 314 : offer_to_receive_video(offer_to_receive_video), |
| 284 offer_to_receive_audio(offer_to_receive_audio), | 315 offer_to_receive_audio(offer_to_receive_audio), |
| 285 voice_activity_detection(voice_activity_detection), | 316 voice_activity_detection(voice_activity_detection), |
| 286 ice_restart(ice_restart), | 317 ice_restart(ice_restart), |
| 287 use_rtp_mux(use_rtp_mux) {} | 318 use_rtp_mux(use_rtp_mux) {} |
| 288 }; | 319 }; |
| 289 | 320 |
| 321 // Argument to the CreatePeerConnection call. | |
| 322 struct CreateOptions {}; | |
|
perkj_webrtc
2016/02/23 11:40:18
unused?
hta-webrtc
2016/02/23 14:30:34
Removing.
| |
| 323 | |
| 290 // Used by GetStats to decide which stats to include in the stats reports. | 324 // Used by GetStats to decide which stats to include in the stats reports. |
| 291 // |kStatsOutputLevelStandard| includes the standard stats for Javascript API; | 325 // |kStatsOutputLevelStandard| includes the standard stats for Javascript API; |
| 292 // |kStatsOutputLevelDebug| includes both the standard stats and additional | 326 // |kStatsOutputLevelDebug| includes both the standard stats and additional |
| 293 // stats for debugging purposes. | 327 // stats for debugging purposes. |
| 294 enum StatsOutputLevel { | 328 enum StatsOutputLevel { |
| 295 kStatsOutputLevelStandard, | 329 kStatsOutputLevelStandard, |
| 296 kStatsOutputLevelDebug, | 330 kStatsOutputLevelDebug, |
| 297 }; | 331 }; |
| 298 | 332 |
| 299 // Accessor methods to active local streams. | 333 // Accessor methods to active local streams. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 374 | 408 |
| 375 // TODO(jiayl): remove the default impl and the old interface when chromium | 409 // TODO(jiayl): remove the default impl and the old interface when chromium |
| 376 // code is updated. | 410 // code is updated. |
| 377 virtual void CreateOffer(CreateSessionDescriptionObserver* observer, | 411 virtual void CreateOffer(CreateSessionDescriptionObserver* observer, |
| 378 const RTCOfferAnswerOptions& options) {} | 412 const RTCOfferAnswerOptions& options) {} |
| 379 | 413 |
| 380 // Create an answer to an offer. | 414 // Create an answer to an offer. |
| 381 // The CreateSessionDescriptionObserver callback will be called when done. | 415 // The CreateSessionDescriptionObserver callback will be called when done. |
| 382 virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, | 416 virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, |
| 383 const MediaConstraintsInterface* constraints) = 0; | 417 const MediaConstraintsInterface* constraints) = 0; |
| 418 virtual void CreateAnswer(CreateSessionDescriptionObserver* observer, | |
| 419 const RTCOfferAnswerOptions& options) = 0; | |
| 384 // Sets the local session description. | 420 // Sets the local session description. |
| 385 // JsepInterface takes the ownership of |desc| even if it fails. | 421 // JsepInterface takes the ownership of |desc| even if it fails. |
| 386 // The |observer| callback will be called when done. | 422 // The |observer| callback will be called when done. |
| 387 virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, | 423 virtual void SetLocalDescription(SetSessionDescriptionObserver* observer, |
| 388 SessionDescriptionInterface* desc) = 0; | 424 SessionDescriptionInterface* desc) = 0; |
| 389 // Sets the remote session description. | 425 // Sets the remote session description. |
| 390 // JsepInterface takes the ownership of |desc| even if it fails. | 426 // JsepInterface takes the ownership of |desc| even if it fails. |
| 391 // The |observer| callback will be called when done. | 427 // The |observer| callback will be called when done. |
| 392 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, | 428 virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer, |
| 393 SessionDescriptionInterface* desc) = 0; | 429 SessionDescriptionInterface* desc) = 0; |
| 394 // Restarts or updates the ICE Agent process of gathering local candidates | 430 // Restarts or updates the ICE Agent process of gathering local candidates |
| 395 // and pinging remote candidates. | 431 // and pinging remote candidates. |
| 396 // TODO(deadbeef): Remove once Chrome is moved over to SetConfiguration. | 432 // TODO(deadbeef): Remove once Chrome is moved over to SetConfiguration. |
| 397 virtual bool UpdateIce(const IceServers& configuration, | 433 virtual bool UpdateIce(const IceServers& configuration, |
| 398 const MediaConstraintsInterface* constraints) { | 434 const MediaConstraintsInterface* constraints) { |
| 399 return false; | 435 return false; |
| 400 } | 436 } |
| 437 virtual bool UpdateIce(const IceServers& configuration) { return false; } | |
|
perkj_webrtc
2016/02/23 11:40:18
not part of this cl?
hta-webrtc
2016/02/23 14:30:34
Needed to remove all APIs with MediaConstraintsInt
| |
| 401 // Sets the PeerConnection's global configuration to |config|. | 438 // Sets the PeerConnection's global configuration to |config|. |
| 402 // Any changes to STUN/TURN servers or ICE candidate policy will affect the | 439 // Any changes to STUN/TURN servers or ICE candidate policy will affect the |
| 403 // next gathering phase, and cause the next call to createOffer to generate | 440 // next gathering phase, and cause the next call to createOffer to generate |
| 404 // new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies | 441 // new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies |
| 405 // cannot be changed with this method. | 442 // cannot be changed with this method. |
| 406 // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of | 443 // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of |
| 407 // PeerConnectionInterface implement it. | 444 // PeerConnectionInterface implement it. |
| 408 virtual bool SetConfiguration( | 445 virtual bool SetConfiguration( |
| 409 const PeerConnectionInterface::RTCConfiguration& config) { | 446 const PeerConnectionInterface::RTCConfiguration& config) { |
| 410 return false; | 447 return false; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 510 int network_ignore_mask; | 547 int network_ignore_mask; |
| 511 | 548 |
| 512 // Sets the maximum supported protocol version. The highest version | 549 // Sets the maximum supported protocol version. The highest version |
| 513 // supported by both ends will be used for the connection, i.e. if one | 550 // supported by both ends will be used for the connection, i.e. if one |
| 514 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. | 551 // party supports DTLS 1.0 and the other DTLS 1.2, DTLS 1.0 will be used. |
| 515 rtc::SSLProtocolVersion ssl_max_version; | 552 rtc::SSLProtocolVersion ssl_max_version; |
| 516 }; | 553 }; |
| 517 | 554 |
| 518 virtual void SetOptions(const Options& options) = 0; | 555 virtual void SetOptions(const Options& options) = 0; |
| 519 | 556 |
| 520 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | 557 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( |
|
perkj_webrtc
2016/02/23 11:40:18
Mark as deprecated?
hta-webrtc
2016/02/23 14:30:34
Just add // deprecated in a comment above, or is t
| |
| 521 const PeerConnectionInterface::RTCConfiguration& configuration, | 558 const PeerConnectionInterface::RTCConfiguration& configuration, |
| 522 const MediaConstraintsInterface* constraints, | 559 const MediaConstraintsInterface* constraints, |
| 523 rtc::scoped_ptr<cricket::PortAllocator> allocator, | 560 rtc::scoped_ptr<cricket::PortAllocator> allocator, |
| 524 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | 561 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, |
| 525 PeerConnectionObserver* observer) = 0; | 562 PeerConnectionObserver* observer) = 0; |
| 526 | 563 |
| 564 virtual rtc::scoped_refptr<PeerConnectionInterface> CreatePeerConnection( | |
| 565 const PeerConnectionInterface::RTCConfiguration& configuration, | |
| 566 rtc::scoped_ptr<cricket::PortAllocator> allocator, | |
| 567 rtc::scoped_ptr<DtlsIdentityStoreInterface> dtls_identity_store, | |
| 568 PeerConnectionObserver* observer) = 0; | |
| 569 | |
| 527 virtual rtc::scoped_refptr<MediaStreamInterface> | 570 virtual rtc::scoped_refptr<MediaStreamInterface> |
| 528 CreateLocalMediaStream(const std::string& label) = 0; | 571 CreateLocalMediaStream(const std::string& label) = 0; |
| 529 | 572 |
| 530 // Creates a AudioSourceInterface. | 573 // Creates a AudioSourceInterface. |
| 531 // |constraints| decides audio processing settings but can be NULL. | 574 // |constraints| decides audio processing settings but can be NULL. |
| 532 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | 575 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( |
|
perkj_webrtc
2016/02/23 11:40:18
Mark as deprecated?
| |
| 533 const MediaConstraintsInterface* constraints) = 0; | 576 const MediaConstraintsInterface* constraints) = 0; |
| 577 virtual rtc::scoped_refptr<AudioSourceInterface> CreateAudioSource( | |
| 578 const cricket::AudioOptions& options) = 0; | |
| 534 | 579 |
| 535 // Creates a VideoSourceInterface. The new source take ownership of | 580 // Creates a VideoSourceInterface. The new source take ownership of |
| 536 // |capturer|. |constraints| decides video resolution and frame rate but can | 581 // |capturer|. |constraints| decides video resolution and frame rate but can |
| 537 // be NULL. | 582 // be NULL. |
| 538 virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | 583 virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( |
|
perkj_webrtc
2016/02/23 11:40:18
Mark as deprecated?
| |
| 539 cricket::VideoCapturer* capturer, | 584 cricket::VideoCapturer* capturer, |
| 540 const MediaConstraintsInterface* constraints) = 0; | 585 const MediaConstraintsInterface* constraints) = 0; |
| 586 virtual rtc::scoped_refptr<VideoSourceInterface> CreateVideoSource( | |
| 587 cricket::VideoCapturer* capturer) = 0; | |
| 541 | 588 |
| 542 // Creates a new local VideoTrack. The same |source| can be used in several | 589 // Creates a new local VideoTrack. The same |source| can be used in several |
| 543 // tracks. | 590 // tracks. |
| 544 virtual rtc::scoped_refptr<VideoTrackInterface> | 591 virtual rtc::scoped_refptr<VideoTrackInterface> |
| 545 CreateVideoTrack(const std::string& label, | 592 CreateVideoTrack(const std::string& label, |
| 546 VideoSourceInterface* source) = 0; | 593 VideoSourceInterface* source) = 0; |
| 547 | 594 |
| 548 // Creates an new AudioTrack. At the moment |source| can be NULL. | 595 // Creates an new AudioTrack. At the moment |source| can be NULL. |
| 549 virtual rtc::scoped_refptr<AudioTrackInterface> | 596 virtual rtc::scoped_refptr<AudioTrackInterface> |
| 550 CreateAudioTrack(const std::string& label, | 597 CreateAudioTrack(const std::string& label, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 596 CreatePeerConnectionFactory( | 643 CreatePeerConnectionFactory( |
| 597 rtc::Thread* worker_thread, | 644 rtc::Thread* worker_thread, |
| 598 rtc::Thread* signaling_thread, | 645 rtc::Thread* signaling_thread, |
| 599 AudioDeviceModule* default_adm, | 646 AudioDeviceModule* default_adm, |
| 600 cricket::WebRtcVideoEncoderFactory* encoder_factory, | 647 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
| 601 cricket::WebRtcVideoDecoderFactory* decoder_factory); | 648 cricket::WebRtcVideoDecoderFactory* decoder_factory); |
| 602 | 649 |
| 603 } // namespace webrtc | 650 } // namespace webrtc |
| 604 | 651 |
| 605 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 652 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |
| OLD | NEW |