Remove api/bitrate_constraints.h.
Bug: webrtc:8733 Change-Id: Iaeb26e07d399f25dc18b0c4af38ed400577a5d3a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153220 Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29217}
This commit is contained in:
parent
c128df14ee
commit
738bfa7bab
@ -108,7 +108,6 @@ rtc_static_library("libjingle_peerconnection_api") {
|
||||
visibility = [ "*" ]
|
||||
cflags = []
|
||||
sources = [
|
||||
"bitrate_constraints.h",
|
||||
"candidate.cc",
|
||||
"candidate.h",
|
||||
"congestion_control_interface.h",
|
||||
@ -255,6 +254,7 @@ rtc_source_set("video_quality_test_fixture_api") {
|
||||
"../call:rtp_interfaces",
|
||||
"../test:test_common",
|
||||
"../test:video_test_common",
|
||||
"transport:bitrate_settings",
|
||||
"transport:network_control",
|
||||
"transport/media:media_transport_interface",
|
||||
"video_codecs:video_codecs_api",
|
||||
|
||||
@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef API_BITRATE_CONSTRAINTS_H_
|
||||
#define API_BITRATE_CONSTRAINTS_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace webrtc {
|
||||
// TODO(srte): BitrateConstraints and BitrateSettings should be merged.
|
||||
// Both represent the same kind data, but are using different default
|
||||
// initializer and representation of unset values.
|
||||
struct BitrateConstraints {
|
||||
int min_bitrate_bps = 0;
|
||||
int start_bitrate_bps = kDefaultStartBitrateBps;
|
||||
int max_bitrate_bps = -1;
|
||||
|
||||
private:
|
||||
static constexpr int kDefaultStartBitrateBps = 300000;
|
||||
};
|
||||
|
||||
// Like std::min, but considers non-positive values to be unset.
|
||||
template <typename T>
|
||||
static T MinPositive(T a, T b) {
|
||||
if (a <= 0) {
|
||||
return b;
|
||||
}
|
||||
if (b <= 0) {
|
||||
return a;
|
||||
}
|
||||
return std::min(a, b);
|
||||
}
|
||||
} // namespace webrtc
|
||||
#endif // API_BITRATE_CONSTRAINTS_H_
|
||||
@ -16,11 +16,11 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/fec_controller.h"
|
||||
#include "api/media_types.h"
|
||||
#include "api/network_state_predictor.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/transport/network_control.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder_config.h"
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
#ifndef API_TRANSPORT_BITRATE_SETTINGS_H_
|
||||
#define API_TRANSPORT_BITRATE_SETTINGS_H_
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "rtc_base/system/rtc_export.h"
|
||||
|
||||
@ -31,6 +33,30 @@ struct RTC_EXPORT BitrateSettings {
|
||||
absl::optional<int> max_bitrate_bps;
|
||||
};
|
||||
|
||||
// TODO(srte): BitrateConstraints and BitrateSettings should be merged.
|
||||
// Both represent the same kind data, but are using different default
|
||||
// initializer and representation of unset values.
|
||||
struct BitrateConstraints {
|
||||
int min_bitrate_bps = 0;
|
||||
int start_bitrate_bps = kDefaultStartBitrateBps;
|
||||
int max_bitrate_bps = -1;
|
||||
|
||||
private:
|
||||
static constexpr int kDefaultStartBitrateBps = 300000;
|
||||
};
|
||||
|
||||
// Like std::min, but considers non-positive values to be unset.
|
||||
template <typename T>
|
||||
static T MinPositive(T a, T b) {
|
||||
if (a <= 0) {
|
||||
return b;
|
||||
}
|
||||
if (b <= 0) {
|
||||
return a;
|
||||
}
|
||||
return std::min(a, b);
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
#endif // API_TRANSPORT_BITRATE_SETTINGS_H_
|
||||
|
||||
@ -31,7 +31,6 @@ rtc_source_set("call_interfaces") {
|
||||
":rtp_interfaces",
|
||||
":video_stream_api",
|
||||
"../api:fec_controller_api",
|
||||
"../api:libjingle_peerconnection_api", # For api/bitrate_constraints.h
|
||||
"../api:network_state_predictor_api",
|
||||
"../api:rtc_error",
|
||||
"../api:rtp_headers",
|
||||
@ -44,6 +43,7 @@ rtc_source_set("call_interfaces") {
|
||||
"../api/crypto:frame_encryptor_interface",
|
||||
"../api/crypto:options",
|
||||
"../api/task_queue",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/transport:network_control",
|
||||
"../api/transport/media:media_transport_interface",
|
||||
"../api/transport/rtp:rtp_source",
|
||||
@ -81,7 +81,6 @@ rtc_source_set("rtp_interfaces") {
|
||||
deps = [
|
||||
"../api:array_view",
|
||||
"../api:fec_controller_api",
|
||||
"../api:libjingle_peerconnection_api", # For api/bitrate_constraints.h
|
||||
"../api:rtp_headers",
|
||||
"../api:rtp_parameters",
|
||||
"../api/crypto:options",
|
||||
@ -487,6 +486,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api/crypto:frame_encryptor_interface",
|
||||
"../api/crypto:options",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../modules/pacing",
|
||||
"../rtc_base",
|
||||
"../rtc_base:rate_limiter",
|
||||
|
||||
@ -10,11 +10,11 @@
|
||||
#ifndef CALL_CALL_CONFIG_H_
|
||||
#define CALL_CALL_CONFIG_H_
|
||||
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/fec_controller.h"
|
||||
#include "api/network_state_predictor.h"
|
||||
#include "api/rtc_error.h"
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/transport/network_control.h"
|
||||
#include "call/audio_state.h"
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#define CALL_RTP_BITRATE_CONFIGURATOR_H_
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "rtc_base/constructor_magic.h"
|
||||
|
||||
|
||||
@ -19,7 +19,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/crypto/crypto_options.h"
|
||||
#include "api/fec_controller.h"
|
||||
#include "api/rtc_event_log/rtc_event_log.h"
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/crypto/crypto_options.h"
|
||||
#include "api/crypto/frame_encryptor_interface.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "call/rtp_transport_controller_send_interface.h"
|
||||
#include "modules/pacing/packet_router.h"
|
||||
#include "rtc_base/network/sent_packet.h"
|
||||
|
||||
@ -269,6 +269,7 @@ rtc_static_library("rtc_audio_video") {
|
||||
"../api/audio:audio_mixer_api",
|
||||
"../api/audio_codecs:audio_codecs_api",
|
||||
"../api/task_queue",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/transport:datagram_transport_interface",
|
||||
"../api/transport/media:media_transport_interface",
|
||||
"../api/transport/rtp:rtp_source",
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
#include "api/audio/audio_mixer.h"
|
||||
#include "api/audio_codecs/audio_decoder_factory.h"
|
||||
#include "api/audio_codecs/audio_encoder_factory.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/rtp_parameters.h"
|
||||
#include "api/task_queue/task_queue_factory.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/video_codecs/video_decoder_factory.h"
|
||||
#include "api/video_codecs/video_encoder_factory.h"
|
||||
#include "media/base/codec.h"
|
||||
|
||||
@ -375,6 +375,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:simulated_network_api",
|
||||
"../api:video_quality_test_fixture_api",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:logging",
|
||||
@ -425,6 +426,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:simulated_network_api",
|
||||
"../api:video_quality_test_fixture_api",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:logging",
|
||||
@ -452,6 +454,7 @@ if (rtc_include_tests) {
|
||||
"../api:libjingle_peerconnection_api",
|
||||
"../api:simulated_network_api",
|
||||
"../api:video_quality_test_fixture_api",
|
||||
"../api/transport:bitrate_settings",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../rtc_base:checks",
|
||||
"../rtc_base:logging",
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video_quality_test_fixture.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/video_codecs/video_codec.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
@ -17,9 +17,9 @@
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video_quality_test_fixture.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/video_codecs/video_codec.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/bitrate_constraints.h"
|
||||
#include "api/test/simulated_network.h"
|
||||
#include "api/test/video_quality_test_fixture.h"
|
||||
#include "api/transport/bitrate_settings.h"
|
||||
#include "api/video_codecs/video_codec.h"
|
||||
#include "rtc_base/checks.h"
|
||||
#include "rtc_base/logging.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user