diff options
author | Niels Möller <nisse@webrtc.org> | 2020-07-13 10:25:41 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-15 07:35:16 +0000 |
commit | 9ad1f6fecae223549a17e344b35bd4e91241fc20 (patch) | |
tree | a86918c290d0b893f0d862cf98640a5dafd6b78c /api | |
parent | c888ffa57f30d90162823fdc2e4c9e312558ea15 (diff) | |
download | webrtc-9ad1f6fecae223549a17e344b35bd4e91241fc20.tar.gz |
Reland "Delete PeerConnectionInterface::BitrateParameters"
This is a reland of e2dfe74b0e29558ddea6473d0272bc38c838370c
Downstream breakage has been fixed.
Original change's description:
> Delete PeerConnectionInterface::BitrateParameters
>
> Replaced by the api struct BitrateSettings, added in
> https://webrtc-review.googlesource.com/74020
>
> Bug: None
> Change-Id: I8b50b32f5c7a8918fad675904d913a21fd905274
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/177665
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Reviewed-by: Taylor <deadbeef@webrtc.org>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31714}
Tbr: kwiberg@webrtc.org
Bug: None
Change-Id: Ic039e51f9f842329525887a28d1cb9819addc74b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179282
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31728}
Diffstat (limited to 'api')
-rw-r--r-- | api/BUILD.gn | 1 | ||||
-rw-r--r-- | api/peer_connection_interface.cc | 21 | ||||
-rw-r--r-- | api/peer_connection_interface.h | 17 | ||||
-rw-r--r-- | api/test/compile_all_headers.cc | 1 | ||||
-rw-r--r-- | api/test/dummy_peer_connection.h | 4 | ||||
-rw-r--r-- | api/test/mock_peerconnectioninterface.h | 1 | ||||
-rw-r--r-- | api/test/peerconnection_quality_test_fixture.h | 4 |
7 files changed, 2 insertions, 47 deletions
diff --git a/api/BUILD.gn b/api/BUILD.gn index 560cabccc7..37473eafe3 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -381,7 +381,6 @@ rtc_source_set("peer_connection_quality_test_fixture_api") { ":track_id_stream_info_map", ":video_quality_analyzer_api", "../media:rtc_media_base", - "../rtc_base:deprecation", "../rtc_base:rtc_base", "rtc_event_log", "task_queue", diff --git a/api/peer_connection_interface.cc b/api/peer_connection_interface.cc index 0c25405784..f82e84b80f 100644 --- a/api/peer_connection_interface.cc +++ b/api/peer_connection_interface.cc @@ -53,27 +53,6 @@ RTCError PeerConnectionInterface::SetConfiguration( return RTCError(); } -RTCError PeerConnectionInterface::SetBitrate(const BitrateSettings& bitrate) { - BitrateParameters bitrate_parameters; - bitrate_parameters.min_bitrate_bps = bitrate.min_bitrate_bps; - bitrate_parameters.current_bitrate_bps = bitrate.start_bitrate_bps; - bitrate_parameters.max_bitrate_bps = bitrate.max_bitrate_bps; - return SetBitrate(bitrate_parameters); -} - -RTCError PeerConnectionInterface::SetBitrate( - const BitrateParameters& bitrate_parameters) { - BitrateSettings bitrate; - bitrate.min_bitrate_bps = bitrate_parameters.min_bitrate_bps; - bitrate.start_bitrate_bps = bitrate_parameters.current_bitrate_bps; - bitrate.max_bitrate_bps = bitrate_parameters.max_bitrate_bps; - return SetBitrate(bitrate); -} - -PeerConnectionInterface::BitrateParameters::BitrateParameters() = default; - -PeerConnectionInterface::BitrateParameters::~BitrateParameters() = default; - PeerConnectionDependencies::PeerConnectionDependencies( PeerConnectionObserver* observer_in) : observer(observer_in) {} diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h index 2664af4e5e..fd4d2df6a7 100644 --- a/api/peer_connection_interface.h +++ b/api/peer_connection_interface.h @@ -1015,28 +1015,13 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface { virtual bool RemoveIceCandidates( const std::vector<cricket::Candidate>& candidates) = 0; - // 0 <= min <= current <= max should hold for set parameters. - struct BitrateParameters { - BitrateParameters(); - ~BitrateParameters(); - - absl::optional<int> min_bitrate_bps; - absl::optional<int> current_bitrate_bps; - absl::optional<int> max_bitrate_bps; - }; - // SetBitrate limits the bandwidth allocated for all RTP streams sent by // this PeerConnection. Other limitations might affect these limits and // are respected (for example "b=AS" in SDP). // // Setting |current_bitrate_bps| will reset the current bitrate estimate // to the provided value. - virtual RTCError SetBitrate(const BitrateSettings& bitrate); - - // TODO(nisse): Deprecated - use version above. These two default - // implementations require subclasses to implement one or the other - // of the methods. - virtual RTCError SetBitrate(const BitrateParameters& bitrate_parameters); + virtual RTCError SetBitrate(const BitrateSettings& bitrate) = 0; // Enable/disable playout of received audio streams. Enabled by default. Note // that even if playout is enabled, streams will only be played out if the diff --git a/api/test/compile_all_headers.cc b/api/test/compile_all_headers.cc index 44b9b1fe68..4cece5b286 100644 --- a/api/test/compile_all_headers.cc +++ b/api/test/compile_all_headers.cc @@ -27,6 +27,7 @@ // "api/test/videocodec_test_fixture.h" // "api/test/videocodec_test_stats.h" +#include "api/test/dummy_peer_connection.h" #include "api/test/fake_frame_decryptor.h" #include "api/test/fake_frame_encryptor.h" #include "api/test/mock_audio_mixer.h" diff --git a/api/test/dummy_peer_connection.h b/api/test/dummy_peer_connection.h index 102b0684c0..97a97d0c81 100644 --- a/api/test/dummy_peer_connection.h +++ b/api/test/dummy_peer_connection.h @@ -194,10 +194,6 @@ class DummyPeerConnection : public PeerConnectionInterface { return RTCError(RTCErrorType::UNSUPPORTED_OPERATION, "Not implemented"); } - RTCError SetBitrate(const BitrateParameters& bitrate_parameters) override { - return RTCError(RTCErrorType::UNSUPPORTED_OPERATION, "Not implemented"); - } - void SetAudioPlayout(bool playout) override { FATAL() << "Not implemented"; } void SetAudioRecording(bool recording) override { FATAL() << "Not implemented"; diff --git a/api/test/mock_peerconnectioninterface.h b/api/test/mock_peerconnectioninterface.h index 6b247b7cee..be34df0b32 100644 --- a/api/test/mock_peerconnectioninterface.h +++ b/api/test/mock_peerconnectioninterface.h @@ -167,7 +167,6 @@ class MockPeerConnectionInterface (const std::vector<cricket::Candidate>&), (override)); MOCK_METHOD(RTCError, SetBitrate, (const BitrateSettings&), (override)); - MOCK_METHOD(RTCError, SetBitrate, (const BitrateParameters&), (override)); MOCK_METHOD(void, SetAudioPlayout, (bool), (override)); MOCK_METHOD(void, SetAudioRecording, (bool), (override)); MOCK_METHOD(rtc::scoped_refptr<DtlsTransportInterface>, diff --git a/api/test/peerconnection_quality_test_fixture.h b/api/test/peerconnection_quality_test_fixture.h index 6dc119fb24..f370478956 100644 --- a/api/test/peerconnection_quality_test_fixture.h +++ b/api/test/peerconnection_quality_test_fixture.h @@ -40,7 +40,6 @@ #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/video_encoder_factory.h" #include "media/base/media_constants.h" -#include "rtc_base/deprecation.h" #include "rtc_base/network.h" #include "rtc_base/rtc_certificate_generator.h" #include "rtc_base/ssl_certificate.h" @@ -336,9 +335,6 @@ class PeerConnectionE2EQualityTestFixture { // applied to all summed RTP streams for this peer. virtual PeerConfigurer* SetBitrateSettings( BitrateSettings bitrate_settings) = 0; - RTC_DEPRECATED - virtual PeerConfigurer* SetBitrateParameters( - PeerConnectionInterface::BitrateParameters bitrate_params) = 0; }; // Contains configuration for echo emulator. |