Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573
Change-Id: If953f874018904826af361aeb7b4c3b35735b96b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299601
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39740}
diff --git a/test/peer_scenario/BUILD.gn b/test/peer_scenario/BUILD.gn
index 00492a1..80a0ad9 100644
--- a/test/peer_scenario/BUILD.gn
+++ b/test/peer_scenario/BUILD.gn
@@ -37,8 +37,16 @@
"../../api/rtc_event_log:rtc_event_log_factory",
"../../api/task_queue:default_task_queue_factory",
"../../api/transport:field_trial_based_config",
- "../../api/video_codecs:builtin_video_decoder_factory",
- "../../api/video_codecs:builtin_video_encoder_factory",
+ "../../api/video_codecs:video_decoder_factory_template",
+ "../../api/video_codecs:video_decoder_factory_template_dav1d_adapter",
+ "../../api/video_codecs:video_decoder_factory_template_libvpx_vp8_adapter",
+ "../../api/video_codecs:video_decoder_factory_template_libvpx_vp9_adapter",
+ "../../api/video_codecs:video_decoder_factory_template_open_h264_adapter",
+ "../../api/video_codecs:video_encoder_factory_template",
+ "../../api/video_codecs:video_encoder_factory_template_libaom_av1_adapter",
+ "../../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter",
+ "../../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter",
+ "../../api/video_codecs:video_encoder_factory_template_open_h264_adapter",
"../../media:rtc_audio_video",
"../../media:rtc_media_base",
"../../media:rtp_utils",
diff --git a/test/peer_scenario/peer_scenario_client.cc b/test/peer_scenario/peer_scenario_client.cc
index 907bac3..15c2321 100644
--- a/test/peer_scenario/peer_scenario_client.cc
+++ b/test/peer_scenario/peer_scenario_client.cc
@@ -20,8 +20,16 @@
#include "api/task_queue/default_task_queue_factory.h"
#include "api/test/create_time_controller.h"
#include "api/transport/field_trial_based_config.h"
-#include "api/video_codecs/builtin_video_decoder_factory.h"
-#include "api/video_codecs/builtin_video_encoder_factory.h"
+#include "api/video_codecs/video_decoder_factory_template.h"
+#include "api/video_codecs/video_decoder_factory_template_dav1d_adapter.h"
+#include "api/video_codecs/video_decoder_factory_template_libvpx_vp8_adapter.h"
+#include "api/video_codecs/video_decoder_factory_template_libvpx_vp9_adapter.h"
+#include "api/video_codecs/video_decoder_factory_template_open_h264_adapter.h"
+#include "api/video_codecs/video_encoder_factory_template.h"
+#include "api/video_codecs/video_encoder_factory_template_libaom_av1_adapter.h"
+#include "api/video_codecs/video_encoder_factory_template_libvpx_vp8_adapter.h"
+#include "api/video_codecs/video_encoder_factory_template_libvpx_vp9_adapter.h"
+#include "api/video_codecs/video_encoder_factory_template_open_h264_adapter.h"
#include "media/engine/webrtc_media_engine.h"
#include "modules/audio_device/include/test_audio_device.h"
#include "p2p/client/basic_port_allocator.h"
@@ -263,8 +271,14 @@
media_deps.video_decoder_factory =
std::make_unique<FakeVideoDecoderFactory>();
} else {
- media_deps.video_encoder_factory = CreateBuiltinVideoEncoderFactory();
- media_deps.video_decoder_factory = CreateBuiltinVideoDecoderFactory();
+ media_deps.video_encoder_factory =
+ std::make_unique<VideoEncoderFactoryTemplate<
+ LibvpxVp8EncoderTemplateAdapter, LibvpxVp9EncoderTemplateAdapter,
+ OpenH264EncoderTemplateAdapter, LibaomAv1EncoderTemplateAdapter>>();
+ media_deps.video_decoder_factory =
+ std::make_unique<VideoDecoderFactoryTemplate<
+ LibvpxVp8DecoderTemplateAdapter, LibvpxVp9DecoderTemplateAdapter,
+ OpenH264DecoderTemplateAdapter, Dav1dDecoderTemplateAdapter>>();
}
media_deps.audio_encoder_factory = CreateBuiltinAudioEncoderFactory();
media_deps.audio_decoder_factory = CreateBuiltinAudioDecoderFactory();