WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 12/inf
rename WebRtcKeyValueConfig to FieldTrialsView Bug: webrtc:10335 Change-Id: If725bd498c4c3daf144bee638230fa089fdde833 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256965 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Jonas Oreland <jonaso@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36365}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
bddfa1d9de
commit
e62c2f2c77
@ -15,8 +15,8 @@
|
||||
#include <vector>
|
||||
|
||||
#include "api/audio_codecs/audio_encoder_factory.h"
|
||||
#include "api/field_trials_view.h"
|
||||
#include "api/scoped_refptr.h"
|
||||
#include "api/webrtc_key_value_config.h"
|
||||
#include "rtc_base/ref_counted_object.h"
|
||||
|
||||
namespace webrtc {
|
||||
@ -38,7 +38,7 @@ struct Helper<> {
|
||||
int payload_type,
|
||||
const SdpAudioFormat& format,
|
||||
absl::optional<AudioCodecPairId> codec_pair_id,
|
||||
const WebRtcKeyValueConfig* field_trials) {
|
||||
const FieldTrialsView* field_trials) {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
@ -66,7 +66,7 @@ struct Helper<T, Ts...> {
|
||||
int payload_type,
|
||||
const SdpAudioFormat& format,
|
||||
absl::optional<AudioCodecPairId> codec_pair_id,
|
||||
const WebRtcKeyValueConfig* field_trials) {
|
||||
const FieldTrialsView* field_trials) {
|
||||
auto opt_config = T::SdpToConfig(format);
|
||||
if (opt_config) {
|
||||
return T::MakeAudioEncoder(*opt_config, payload_type, codec_pair_id);
|
||||
@ -80,7 +80,7 @@ struct Helper<T, Ts...> {
|
||||
template <typename... Ts>
|
||||
class AudioEncoderFactoryT : public AudioEncoderFactory {
|
||||
public:
|
||||
explicit AudioEncoderFactoryT(const WebRtcKeyValueConfig* field_trials) {
|
||||
explicit AudioEncoderFactoryT(const FieldTrialsView* field_trials) {
|
||||
field_trials_ = field_trials;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ class AudioEncoderFactoryT : public AudioEncoderFactory {
|
||||
field_trials_);
|
||||
}
|
||||
|
||||
const WebRtcKeyValueConfig* field_trials_;
|
||||
const FieldTrialsView* field_trials_;
|
||||
};
|
||||
|
||||
} // namespace audio_encoder_factory_template_impl
|
||||
@ -145,7 +145,7 @@ class AudioEncoderFactoryT : public AudioEncoderFactory {
|
||||
// how it is used.
|
||||
template <typename... Ts>
|
||||
rtc::scoped_refptr<AudioEncoderFactory> CreateAudioEncoderFactory(
|
||||
const WebRtcKeyValueConfig* field_trials = nullptr) {
|
||||
const FieldTrialsView* field_trials = nullptr) {
|
||||
// There's no technical reason we couldn't allow zero template parameters,
|
||||
// but such a factory couldn't create any encoders, and callers can do this
|
||||
// by mistake by simply forgetting the <> altogether. So we forbid it in
|
||||
|
||||
Reference in New Issue
Block a user