diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index 640d6626de..125a368972 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -544,6 +544,7 @@ rtc_library("webrtc_h264") { if (rtc_use_h264) { deps += [ "//third_party/ffmpeg", + "//third_party/openh264:buildflags", "//third_party/openh264:encoder", ] if (!build_with_mozilla) { diff --git a/modules/video_coding/codecs/h264/h264_encoder_impl.cc b/modules/video_coding/codecs/h264/h264_encoder_impl.cc index fc3fd195fb..5029dc9763 100644 --- a/modules/video_coding/codecs/h264/h264_encoder_impl.cc +++ b/modules/video_coding/codecs/h264/h264_encoder_impl.cc @@ -31,10 +31,19 @@ #include "system_wrappers/include/metrics.h" #include "third_party/libyuv/include/libyuv/convert.h" #include "third_party/libyuv/include/libyuv/scale.h" +// TODO(crbug.com/1218384): Remove after new openh264 is rolled. +#include "third_party/openh264/buildflags.h" +#if BUILDFLAG(OPENH264_API_WELS) +#include "third_party/openh264/src/codec/api/wels/codec_api.h" +#include "third_party/openh264/src/codec/api/wels/codec_app_def.h" +#include "third_party/openh264/src/codec/api/wels/codec_def.h" +#include "third_party/openh264/src/codec/api/wels/codec_ver.h" +#else #include "third_party/openh264/src/codec/api/svc/codec_api.h" #include "third_party/openh264/src/codec/api/svc/codec_app_def.h" #include "third_party/openh264/src/codec/api/svc/codec_def.h" #include "third_party/openh264/src/codec/api/svc/codec_ver.h" +#endif namespace webrtc { diff --git a/modules/video_coding/codecs/h264/h264_encoder_impl.h b/modules/video_coding/codecs/h264/h264_encoder_impl.h index 780781be23..c1d81915cf 100644 --- a/modules/video_coding/codecs/h264/h264_encoder_impl.h +++ b/modules/video_coding/codecs/h264/h264_encoder_impl.h @@ -30,7 +30,13 @@ #include "modules/video_coding/codecs/h264/include/h264.h" #include "modules/video_coding/svc/scalable_video_controller.h" #include "modules/video_coding/utility/quality_scaler.h" +// TODO(crbug.com/1218384): Remove after new openh264 is rolled. +#include "third_party/openh264/buildflags.h" +#if BUILDFLAG(OPENH264_API_WELS) +#include "third_party/openh264/src/codec/api/wels/codec_app_def.h" +#else #include "third_party/openh264/src/codec/api/svc/codec_app_def.h" +#endif class ISVCEncoder;