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

Side by Side Diff: webrtc/api/peerconnectioninterface.h

Issue 2793913008: Add PeerConnectionInterface::UpdateCallBitrate. (Closed)
Patch Set: Force update if current bitrate is set. Remove big lambda. Improve parameter validation. Created 3 years, 8 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
« no previous file with comments | « no previous file | webrtc/api/peerconnectionproxy.h » ('j') | webrtc/call/call.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 const std::vector<cricket::Candidate>& candidates) { 721 const std::vector<cricket::Candidate>& candidates) {
722 return false; 722 return false;
723 } 723 }
724 724
725 // Register a metric observer (used by chromium). 725 // Register a metric observer (used by chromium).
726 // 726 //
727 // There can only be one observer at a time. Before the observer is 727 // There can only be one observer at a time. Before the observer is
728 // destroyed, RegisterUMAOberver(nullptr) should be called. 728 // destroyed, RegisterUMAOberver(nullptr) should be called.
729 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; 729 virtual void RegisterUMAObserver(UMAObserver* observer) = 0;
730 730
731 struct BitrateParameters {
732 rtc::Optional<int> min_bitrate_bps;
733 rtc::Optional<int> current_bitrate_bps;
734 rtc::Optional<int> max_bitrate_bps;
735 };
736
737 // SetBitrate limits the bandwidth allocated for all RTP streams sent by
738 // this PeerConnection. Other limitations might affect these limits and
739 // are respected (for example "b=AS" in SDP).
740 //
741 // 0 <= min <= current <= max should hold for set parameters.
742 //
743 // Changing |current_bitrate_bps| to a new value will reset the current
744 // bitrate estimate to the provided value.
745 virtual RTCError SetBitrate(const BitrateParameters& bitrate) = 0;
746
731 // Returns the current SignalingState. 747 // Returns the current SignalingState.
732 virtual SignalingState signaling_state() = 0; 748 virtual SignalingState signaling_state() = 0;
733 virtual IceConnectionState ice_connection_state() = 0; 749 virtual IceConnectionState ice_connection_state() = 0;
734 virtual IceGatheringState ice_gathering_state() = 0; 750 virtual IceGatheringState ice_gathering_state() = 0;
735 751
736 // Starts RtcEventLog using existing file. Takes ownership of |file| and 752 // Starts RtcEventLog using existing file. Takes ownership of |file| and
737 // passes it on to Call, which will take the ownership. If the 753 // passes it on to Call, which will take the ownership. If the
738 // operation fails the file will be closed. The logging will stop 754 // operation fails the file will be closed. The logging will stop
739 // automatically after 10 minutes have passed, or when the StopRtcEventLog 755 // automatically after 10 minutes have passed, or when the StopRtcEventLog
740 // function is called. 756 // function is called.
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 cricket::WebRtcVideoEncoderFactory* encoder_factory, 1114 cricket::WebRtcVideoEncoderFactory* encoder_factory,
1099 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 1115 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
1100 return CreatePeerConnectionFactory( 1116 return CreatePeerConnectionFactory(
1101 worker_and_network_thread, worker_and_network_thread, signaling_thread, 1117 worker_and_network_thread, worker_and_network_thread, signaling_thread,
1102 default_adm, encoder_factory, decoder_factory); 1118 default_adm, encoder_factory, decoder_factory);
1103 } 1119 }
1104 1120
1105 } // namespace webrtc 1121 } // namespace webrtc
1106 1122
1107 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 1123 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/peerconnectionproxy.h » ('j') | webrtc/call/call.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698