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

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

Issue 2888303005: Add PeerConnectionInterface::UpdateCallBitrate. (Closed)
Patch Set: Implement SetBitrate in PeerConnectionInterface to avoid breaking chromium mock. Created 3 years, 6 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 const std::vector<cricket::Candidate>& candidates) { 722 const std::vector<cricket::Candidate>& candidates) {
723 return false; 723 return false;
724 } 724 }
725 725
726 // Register a metric observer (used by chromium). 726 // Register a metric observer (used by chromium).
727 // 727 //
728 // There can only be one observer at a time. Before the observer is 728 // There can only be one observer at a time. Before the observer is
729 // destroyed, RegisterUMAOberver(nullptr) should be called. 729 // destroyed, RegisterUMAOberver(nullptr) should be called.
730 virtual void RegisterUMAObserver(UMAObserver* observer) = 0; 730 virtual void RegisterUMAObserver(UMAObserver* observer) = 0;
731 731
732 // 0 <= min <= current <= max should hold for set parameters.
733 struct BitrateParameters {
734 rtc::Optional<int> min_bitrate_bps;
735 rtc::Optional<int> current_bitrate_bps;
736 rtc::Optional<int> max_bitrate_bps;
737 };
738
739 // SetBitrate limits the bandwidth allocated for all RTP streams sent by
740 // this PeerConnection. Other limitations might affect these limits and
741 // are respected (for example "b=AS" in SDP).
742 //
743 // Setting |current_bitrate_bps| will reset the current bitrate estimate
744 // to the provided value.
745 virtual RTCError SetBitrate(const BitrateParameters& bitrate) {
746 return RTCError::OK();
747 }
748
732 // Returns the current SignalingState. 749 // Returns the current SignalingState.
733 virtual SignalingState signaling_state() = 0; 750 virtual SignalingState signaling_state() = 0;
734 virtual IceConnectionState ice_connection_state() = 0; 751 virtual IceConnectionState ice_connection_state() = 0;
735 virtual IceGatheringState ice_gathering_state() = 0; 752 virtual IceGatheringState ice_gathering_state() = 0;
736 753
737 // Starts RtcEventLog using existing file. Takes ownership of |file| and 754 // Starts RtcEventLog using existing file. Takes ownership of |file| and
738 // passes it on to Call, which will take the ownership. If the 755 // passes it on to Call, which will take the ownership. If the
739 // operation fails the file will be closed. The logging will stop 756 // operation fails the file will be closed. The logging will stop
740 // automatically after 10 minutes have passed, or when the StopRtcEventLog 757 // automatically after 10 minutes have passed, or when the StopRtcEventLog
741 // function is called. 758 // function is called.
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 cricket::WebRtcVideoEncoderFactory* encoder_factory, 1122 cricket::WebRtcVideoEncoderFactory* encoder_factory,
1106 cricket::WebRtcVideoDecoderFactory* decoder_factory) { 1123 cricket::WebRtcVideoDecoderFactory* decoder_factory) {
1107 return CreatePeerConnectionFactory( 1124 return CreatePeerConnectionFactory(
1108 worker_and_network_thread, worker_and_network_thread, signaling_thread, 1125 worker_and_network_thread, worker_and_network_thread, signaling_thread,
1109 default_adm, encoder_factory, decoder_factory); 1126 default_adm, encoder_factory, decoder_factory);
1110 } 1127 }
1111 1128
1112 } // namespace webrtc 1129 } // namespace webrtc
1113 1130
1114 #endif // WEBRTC_API_PEERCONNECTIONINTERFACE_H_ 1131 #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