| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  292         ice_connection_receiving_timeout = |  292         ice_connection_receiving_timeout = | 
|  293             kAggressiveIceConnectionReceivingTimeout; |  293             kAggressiveIceConnectionReceivingTimeout; | 
|  294  |  294  | 
|  295         // These parameters are not defined in Java or IOS configuration, |  295         // These parameters are not defined in Java or IOS configuration, | 
|  296         // so their values will not be overwritten. |  296         // so their values will not be overwritten. | 
|  297         enable_ice_renomination = true; |  297         enable_ice_renomination = true; | 
|  298         redetermine_role_on_ice_restart = false; |  298         redetermine_role_on_ice_restart = false; | 
|  299       } |  299       } | 
|  300     } |  300     } | 
|  301  |  301  | 
 |  302     bool operator==(const RTCConfiguration& o) const; | 
 |  303     bool operator!=(const RTCConfiguration& o) const; | 
 |  304  | 
|  302     bool dscp() { return media_config.enable_dscp; } |  305     bool dscp() { return media_config.enable_dscp; } | 
|  303     void set_dscp(bool enable) { media_config.enable_dscp = enable; } |  306     void set_dscp(bool enable) { media_config.enable_dscp = enable; } | 
|  304  |  307  | 
|  305     // TODO(nisse): The corresponding flag in MediaConfig and |  308     // TODO(nisse): The corresponding flag in MediaConfig and | 
|  306     // elsewhere should be renamed enable_cpu_adaptation. |  309     // elsewhere should be renamed enable_cpu_adaptation. | 
|  307     bool cpu_adaptation() { |  310     bool cpu_adaptation() { | 
|  308       return media_config.video.enable_cpu_overuse_detection; |  311       return media_config.video.enable_cpu_overuse_detection; | 
|  309     } |  312     } | 
|  310     void set_cpu_adaptation(bool enable) { |  313     void set_cpu_adaptation(bool enable) { | 
|  311       media_config.video.enable_cpu_overuse_detection = enable; |  314       media_config.video.enable_cpu_overuse_detection = enable; | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  365     bool prune_turn_ports = false; |  368     bool prune_turn_ports = false; | 
|  366     // If set to true, this means the ICE transport should presume TURN-to-TURN |  369     // If set to true, this means the ICE transport should presume TURN-to-TURN | 
|  367     // candidate pairs will succeed, even before a binding response is received. |  370     // candidate pairs will succeed, even before a binding response is received. | 
|  368     bool presume_writable_when_fully_relayed = false; |  371     bool presume_writable_when_fully_relayed = false; | 
|  369     // If true, "renomination" will be added to the ice options in the transport |  372     // If true, "renomination" will be added to the ice options in the transport | 
|  370     // description. |  373     // description. | 
|  371     bool enable_ice_renomination = false; |  374     bool enable_ice_renomination = false; | 
|  372     // If true, ICE role is redetermined when peerconnection sets a local |  375     // If true, ICE role is redetermined when peerconnection sets a local | 
|  373     // transport description that indicates an ICE restart. |  376     // transport description that indicates an ICE restart. | 
|  374     bool redetermine_role_on_ice_restart = true; |  377     bool redetermine_role_on_ice_restart = true; | 
 |  378     // | 
 |  379     // Don't forget to update operator== if adding something. | 
 |  380     // | 
|  375   }; |  381   }; | 
|  376  |  382  | 
|  377   struct RTCOfferAnswerOptions { |  383   struct RTCOfferAnswerOptions { | 
|  378     static const int kUndefined = -1; |  384     static const int kUndefined = -1; | 
|  379     static const int kMaxOfferToReceiveMedia = 1; |  385     static const int kMaxOfferToReceiveMedia = 1; | 
|  380  |  386  | 
|  381     // The default value for constraint offerToReceiveX:true. |  387     // The default value for constraint offerToReceiveX:true. | 
|  382     static const int kOfferToReceiveMediaTrue = 1; |  388     static const int kOfferToReceiveMediaTrue = 1; | 
|  383  |  389  | 
|  384     int offer_to_receive_video = kUndefined; |  390     int offer_to_receive_video = kUndefined; | 
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  523   virtual bool UpdateIce(const IceServers& configuration, |  529   virtual bool UpdateIce(const IceServers& configuration, | 
|  524                          const MediaConstraintsInterface* constraints) { |  530                          const MediaConstraintsInterface* constraints) { | 
|  525     return false; |  531     return false; | 
|  526   } |  532   } | 
|  527   virtual bool UpdateIce(const IceServers& configuration) { return false; } |  533   virtual bool UpdateIce(const IceServers& configuration) { return false; } | 
|  528   // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of |  534   // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of | 
|  529   // PeerConnectionInterface implement it. |  535   // PeerConnectionInterface implement it. | 
|  530   virtual PeerConnectionInterface::RTCConfiguration GetConfiguration() { |  536   virtual PeerConnectionInterface::RTCConfiguration GetConfiguration() { | 
|  531     return PeerConnectionInterface::RTCConfiguration(); |  537     return PeerConnectionInterface::RTCConfiguration(); | 
|  532   } |  538   } | 
 |  539  | 
|  533   // Sets the PeerConnection's global configuration to |config|. |  540   // Sets the PeerConnection's global configuration to |config|. | 
 |  541   // | 
 |  542   // The members of |config| that may be changed are |type|, |servers|, | 
 |  543   // |ice_candidate_pool_size| and |prune_turn_ports| (though the candidate | 
 |  544   // pool size can't be changed after the first call to SetLocalDescription). | 
 |  545   // Note that this means the BUNDLE and RTCP-multiplexing policies cannot be | 
 |  546   // changed with this method. | 
 |  547   // | 
|  534   // Any changes to STUN/TURN servers or ICE candidate policy will affect the |  548   // Any changes to STUN/TURN servers or ICE candidate policy will affect the | 
|  535   // next gathering phase, and cause the next call to createOffer to generate |  549   // next gathering phase, and cause the next call to createOffer to generate | 
|  536   // new ICE credentials. Note that the BUNDLE and RTCP-multiplexing policies |  550   // new ICE credentials, as described in JSEP. This also occurs when | 
|  537   // cannot be changed with this method. |  551   // |prune_turn_ports| changes, for the same reasoning. | 
 |  552   // | 
 |  553   // If an error occurs, returns false and populates |error| if non-null: | 
 |  554   // - INVALID_MODIFICATION if |config| contains a modified parameter other | 
 |  555   //   than one of the parameters listed above. | 
 |  556   // - INVALID_RANGE if |ice_candidate_pool_size| is out of range. | 
 |  557   // - SYNTAX_ERROR if parsing an ICE server URL failed. | 
 |  558   // - INVALID_PARAMETER if a TURN server is missing |username| or |password|. | 
 |  559   // - INTERNAL_ERROR if an unexpected error occurred. | 
 |  560   // | 
|  538   // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of |  561   // TODO(deadbeef): Make this pure virtual once all Chrome subclasses of | 
|  539   // PeerConnectionInterface implement it. |  562   // PeerConnectionInterface implement it. | 
|  540   virtual bool SetConfiguration( |  563   virtual bool SetConfiguration( | 
|  541       const PeerConnectionInterface::RTCConfiguration& config) { |  564       const PeerConnectionInterface::RTCConfiguration& config, | 
 |  565       RtcError* error = nullptr) { | 
|  542     return false; |  566     return false; | 
|  543   } |  567   } | 
|  544   // Provides a remote candidate to the ICE Agent. |  568   // Provides a remote candidate to the ICE Agent. | 
|  545   // A copy of the |candidate| will be created and added to the remote |  569   // A copy of the |candidate| will be created and added to the remote | 
|  546   // description. So the caller of this method still has the ownership of the |  570   // description. So the caller of this method still has the ownership of the | 
|  547   // |candidate|. |  571   // |candidate|. | 
|  548   // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will |  572   // TODO(ronghuawu): Consider to change this so that the AddIceCandidate will | 
|  549   // take the ownership of the |candidate|. |  573   // take the ownership of the |candidate|. | 
|  550   virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; |  574   virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0; | 
|  551  |  575  | 
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  828     cricket::WebRtcVideoEncoderFactory* encoder_factory, |  852     cricket::WebRtcVideoEncoderFactory* encoder_factory, | 
|  829     cricket::WebRtcVideoDecoderFactory* decoder_factory) { |  853     cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 
|  830   return CreatePeerConnectionFactory( |  854   return CreatePeerConnectionFactory( | 
|  831       worker_and_network_thread, worker_and_network_thread, signaling_thread, |  855       worker_and_network_thread, worker_and_network_thread, signaling_thread, | 
|  832       default_adm, encoder_factory, decoder_factory); |  856       default_adm, encoder_factory, decoder_factory); | 
|  833 } |  857 } | 
|  834  |  858  | 
|  835 }  // namespace webrtc |  859 }  // namespace webrtc | 
|  836  |  860  | 
|  837 #endif  // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ |  861 #endif  // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ | 
| OLD | NEW |