Set WEBRTC_USE_H264 in common_config

Bug: none
Change-Id: I3dce8fdc409c88cdd771ea57eca3ea375e6e82c9
Reviewed-on: https://webrtc-review.googlesource.com/c/121948
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26603}
diff --git a/BUILD.gn b/BUILD.gn
index 96210fd..1cb920e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -242,6 +242,10 @@
     defines += [ "ENABLE_EXTERNAL_AUTH" ]
   }
 
+  if (rtc_use_h264) {
+    defines += [ "WEBRTC_USE_H264" ]
+  }
+
   if (build_with_chromium) {
     defines += [
       # NOTICE: Since common_inherited_config is used in public_configs for our
diff --git a/media/BUILD.gn b/media/BUILD.gn
index c05a6ae..2cb0afc 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -481,10 +481,6 @@
       suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
     }
 
-    if (rtc_use_h264) {
-      defines += [ "WEBRTC_USE_H264" ]
-    }
-
     deps += [
       ":rtc_internal_video_codecs",
       ":rtc_media",
@@ -587,10 +583,6 @@
       sources += [ "sctp/sctp_transport_unittest.cc" ]
     }
 
-    if (rtc_use_h264) {
-      defines += [ "WEBRTC_USE_H264" ]
-    }
-
     if (rtc_opus_support_120ms_ptime) {
       defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=1" ]
     } else {
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index aded529..adf9255 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -336,7 +336,6 @@
 
   if (rtc_use_h264) {
     assert(!(is_win && !is_clang), "See: bugs.webrtc.org/9213#c13.")
-    defines += [ "WEBRTC_USE_H264" ]
     sources += [
       "codecs/h264/h264_color_space.cc",
       "codecs/h264/h264_color_space.h",
@@ -761,9 +760,6 @@
   rtc_source_set("video_coding_modules_tests") {
     testonly = true
     defines = []
-    if (rtc_use_h264) {
-      defines += [ "WEBRTC_USE_H264" ]
-    }
 
     sources = [
       "codecs/h264/test/h264_impl_unittest.cc",
diff --git a/video/BUILD.gn b/video/BUILD.gn
index 610a2fd..67d9d4b 100644
--- a/video/BUILD.gn
+++ b/video/BUILD.gn
@@ -322,9 +322,6 @@
       # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
       suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
     }
-    if (rtc_use_h264) {
-      defines = [ "WEBRTC_USE_H264" ]
-    }
   }
 
   rtc_executable("video_loopback") {
@@ -584,9 +581,6 @@
       # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
       suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
     }
-    if (rtc_use_h264) {
-      defines += [ "WEBRTC_USE_H264" ]
-    }
     if (!build_with_mozilla) {
       deps += [ "../media:rtc_media_base" ]
     }