Replace BuiltinVideo{Encoder,Decoder}Factory with Video{Encoder,Decoder}FactoryTemplate.
Bug: webrtc:13573 Change-Id: Ie84498444ad6f56bba90d17e672838a1ea2f6a83 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299706 Commit-Queue: Philip Eliasson <philipel@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39735}
This commit is contained in:
parent
1f708ef2ff
commit
2b00c4e1af
17
BUILD.gn
17
BUILD.gn
@ -494,6 +494,16 @@ if (!build_with_chromium) {
|
|||||||
"api/task_queue",
|
"api/task_queue",
|
||||||
"api/task_queue:default_task_queue_factory",
|
"api/task_queue:default_task_queue_factory",
|
||||||
"api/test/metrics",
|
"api/test/metrics",
|
||||||
|
"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",
|
||||||
"audio",
|
"audio",
|
||||||
"call",
|
"call",
|
||||||
"common_audio",
|
"common_audio",
|
||||||
@ -516,13 +526,6 @@ if (!build_with_chromium) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_include_builtin_video_codecs) {
|
|
||||||
deps += [
|
|
||||||
"api/video_codecs:builtin_video_decoder_factory",
|
|
||||||
"api/video_codecs:builtin_video_encoder_factory",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (build_with_mozilla) {
|
if (build_with_mozilla) {
|
||||||
deps += [
|
deps += [
|
||||||
"api/video:video_frame",
|
"api/video:video_frame",
|
||||||
|
|||||||
@ -214,12 +214,6 @@ declare_args() {
|
|||||||
# WebRTC.framework)
|
# WebRTC.framework)
|
||||||
rtc_include_builtin_audio_codecs = true
|
rtc_include_builtin_audio_codecs = true
|
||||||
|
|
||||||
# When set to false, builtin video encoder/decoder factories and all the
|
|
||||||
# video codecs they depends on will not be included in libwebrtc.{a|lib}
|
|
||||||
# (they will still be included in libjingle_peerconnection_so.so and
|
|
||||||
# WebRTC.framework)
|
|
||||||
rtc_include_builtin_video_codecs = true
|
|
||||||
|
|
||||||
# When set to true and in a standalone build, it will undefine UNICODE and
|
# When set to true and in a standalone build, it will undefine UNICODE and
|
||||||
# _UNICODE (which are always defined globally by the Chromium Windows
|
# _UNICODE (which are always defined globally by the Chromium Windows
|
||||||
# toolchain).
|
# toolchain).
|
||||||
|
|||||||
@ -18,8 +18,16 @@
|
|||||||
#include "api/rtc_event_log/rtc_event_log_factory.h"
|
#include "api/rtc_event_log/rtc_event_log_factory.h"
|
||||||
#include "api/stats/rtcstats_objects.h"
|
#include "api/stats/rtcstats_objects.h"
|
||||||
#include "api/task_queue/default_task_queue_factory.h"
|
#include "api/task_queue/default_task_queue_factory.h"
|
||||||
#include "api/video_codecs/builtin_video_decoder_factory.h"
|
#include "api/video_codecs/video_decoder_factory_template.h"
|
||||||
#include "api/video_codecs/builtin_video_encoder_factory.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 "media/engine/webrtc_media_engine.h"
|
||||||
#include "modules/audio_device/include/audio_device.h"
|
#include "modules/audio_device/include/audio_device.h"
|
||||||
#include "modules/audio_processing/include/audio_processing.h"
|
#include "modules/audio_processing/include/audio_processing.h"
|
||||||
@ -36,8 +44,14 @@ cricket::MediaEngineDependencies CreateSomeMediaDeps(
|
|||||||
webrtc::CreateAudioEncoderFactory<webrtc::AudioEncoderOpus>();
|
webrtc::CreateAudioEncoderFactory<webrtc::AudioEncoderOpus>();
|
||||||
media_deps.audio_decoder_factory =
|
media_deps.audio_decoder_factory =
|
||||||
webrtc::CreateAudioDecoderFactory<webrtc::AudioDecoderOpus>();
|
webrtc::CreateAudioDecoderFactory<webrtc::AudioDecoderOpus>();
|
||||||
media_deps.video_encoder_factory = CreateBuiltinVideoEncoderFactory();
|
media_deps.video_encoder_factory =
|
||||||
media_deps.video_decoder_factory = webrtc::CreateBuiltinVideoDecoderFactory();
|
std::make_unique<VideoEncoderFactoryTemplate<
|
||||||
|
LibvpxVp8EncoderTemplateAdapter, LibvpxVp9EncoderTemplateAdapter,
|
||||||
|
OpenH264EncoderTemplateAdapter, LibaomAv1EncoderTemplateAdapter>>();
|
||||||
|
media_deps.video_decoder_factory =
|
||||||
|
std::make_unique<VideoDecoderFactoryTemplate<
|
||||||
|
LibvpxVp8DecoderTemplateAdapter, LibvpxVp9DecoderTemplateAdapter,
|
||||||
|
OpenH264DecoderTemplateAdapter, Dav1dDecoderTemplateAdapter>>();
|
||||||
media_deps.audio_processing = webrtc::AudioProcessingBuilder().Create();
|
media_deps.audio_processing = webrtc::AudioProcessingBuilder().Create();
|
||||||
return media_deps;
|
return media_deps;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user