WebRTC-DeprecateGlobalFieldTrialString/Enabled/ - part 10/inf

This patch takes a stab at modules/video_coding,
but reaches only about half.

Bug: webrtc:10335
Change-Id: I0d47d0468b818145470c51ae4e8e75ff58d499ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256112
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36335}
This commit is contained in:
Jonas Oreland
2022-03-25 12:43:14 +01:00
committed by WebRTC LUCI CQ
parent 2ff465f506
commit e02f9eedb3
55 changed files with 330 additions and 173 deletions

View File

@ -14,9 +14,12 @@
#include <memory>
#include "api/sequence_checker.h"
#include "api/transport/field_trial_based_config.h"
#include "api/video/encoded_image.h"
#include "api/webrtc_key_value_config.h"
#include "modules/video_coding/include/video_codec_interface.h"
#include "modules/video_coding/timing.h"
#include "rtc_base/memory/always_valid_pointer.h"
#include "system_wrappers/include/clock.h"
namespace webrtc {
@ -41,10 +44,12 @@ namespace {
class VideoCodingModuleImpl : public VideoCodingModule {
public:
explicit VideoCodingModuleImpl(Clock* clock)
explicit VideoCodingModuleImpl(Clock* clock,
const WebRtcKeyValueConfig* field_trials)
: VideoCodingModule(),
timing_(new VCMTiming(clock)),
receiver_(clock, timing_.get()) {}
field_trials_(field_trials),
timing_(new VCMTiming(clock, *field_trials_)),
receiver_(clock, timing_.get(), *field_trials_) {}
~VideoCodingModuleImpl() override {}
@ -104,6 +109,8 @@ class VideoCodingModuleImpl : public VideoCodingModule {
}
private:
AlwaysValidPointer<const WebRtcKeyValueConfig, FieldTrialBasedConfig>
field_trials_;
SequenceChecker construction_thread_;
const std::unique_ptr<VCMTiming> timing_;
vcm::VideoReceiver receiver_;
@ -112,9 +119,11 @@ class VideoCodingModuleImpl : public VideoCodingModule {
// DEPRECATED. Create method for current interface, will be removed when the
// new jitter buffer is in place.
VideoCodingModule* VideoCodingModule::Create(Clock* clock) {
VideoCodingModule* VideoCodingModule::Create(
Clock* clock,
const WebRtcKeyValueConfig* field_trials) {
RTC_DCHECK(clock);
return new VideoCodingModuleImpl(clock);
return new VideoCodingModuleImpl(clock, field_trials);
}
} // namespace webrtc