Add field-trial parameter to enable tests simulating a slow decoder

This CL adds a field trial parameter WebRTC-SlowDownDecoder that is
used to simulate a slow decoder. The parameter specifies how many
extra ms it takes to decode each video frame. This must only be used
in manual testing.

Bug: None
Change-Id: Iad4079100d67b95c224277aaeaf572e38068717f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151911
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29153}
diff --git a/modules/video_coding/generic_decoder.h b/modules/video_coding/generic_decoder.h
index 43ca23c..d51ff48 100644
--- a/modules/video_coding/generic_decoder.h
+++ b/modules/video_coding/generic_decoder.h
@@ -13,12 +13,14 @@
 
 #include <memory>
 
+#include "api/units/time_delta.h"
 #include "modules/include/module_common_types.h"
 #include "modules/video_coding/encoded_frame.h"
 #include "modules/video_coding/include/video_codec_interface.h"
 #include "modules/video_coding/timestamp_map.h"
 #include "modules/video_coding/timing.h"
 #include "rtc_base/critical_section.h"
+#include "rtc_base/experiments/field_trial_parser.h"
 #include "rtc_base/thread_checker.h"
 
 namespace webrtc {
@@ -71,6 +73,8 @@
   rtc::CriticalSection lock_;
   VCMTimestampMap _timestampMap RTC_GUARDED_BY(lock_);
   int64_t ntp_offset_;
+  // Set by the field trial WebRTC-SlowDownDecoder to simulate a slow decoder.
+  FieldTrialOptional<TimeDelta> _extra_decode_time;
 };
 
 class VCMGenericDecoder {