Add --force_fieldtrials flag to video_replay.
Bug: webrtc:14508 Change-Id: I006d87f6200b965583d6d05c0bd88aab2a99e6ed Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/277761 Commit-Queue: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38279}
This commit is contained in:
parent
22d32f1a6c
commit
525891a778
@ -247,6 +247,7 @@ if (!is_component_build) {
|
||||
testonly = true
|
||||
sources = [ "video_replay.cc" ]
|
||||
deps = [
|
||||
"../api:field_trials",
|
||||
"../api/rtc_event_log",
|
||||
"../api/task_queue:default_task_queue_factory",
|
||||
"../api/test/video:function_video_factory",
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
#include "absl/flags/flag.h"
|
||||
#include "absl/flags/parse.h"
|
||||
#include "api/field_trials.h"
|
||||
#include "api/rtc_event_log/rtc_event_log.h"
|
||||
#include "api/task_queue/default_task_queue_factory.h"
|
||||
#include "api/test/video/function_video_decoder_factory.h"
|
||||
@ -142,6 +143,15 @@ ABSL_FLAG(uint32_t,
|
||||
ABSL_FLAG(uint32_t, render_width, 640, "Width of render window");
|
||||
ABSL_FLAG(uint32_t, render_height, 480, "Height of render window");
|
||||
|
||||
ABSL_FLAG(
|
||||
std::string,
|
||||
force_fieldtrials,
|
||||
"",
|
||||
"Field trials control experimental feature code which can be forced. "
|
||||
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/"
|
||||
" will assign the group Enable to field trial WebRTC-FooFeature. Multiple "
|
||||
"trials are separated by \"/\"");
|
||||
|
||||
namespace {
|
||||
bool ValidatePayloadType(int32_t payload_type) {
|
||||
return payload_type > 0 && payload_type <= 127;
|
||||
@ -579,9 +589,9 @@ class RtpReplayer final {
|
||||
};
|
||||
|
||||
void RtpReplay() {
|
||||
RtpReplayer replayer(absl::GetFlag(FLAGS_config_file),
|
||||
absl::GetFlag(FLAGS_input_file),
|
||||
std::make_unique<FieldTrialBasedConfig>());
|
||||
RtpReplayer replayer(
|
||||
absl::GetFlag(FLAGS_config_file), absl::GetFlag(FLAGS_input_file),
|
||||
std::make_unique<FieldTrials>(absl::GetFlag(FLAGS_force_fieldtrials)));
|
||||
replayer.Run();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user