Stop using public_deps in modules/rtp_rtcp.

TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: I86830df23db3f33a1a26098e639596bd3b86485a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/29780
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21108}
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index 91bde7f..c579997 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -1090,6 +1090,7 @@
     "../../rtc_base:rtc_base_tests_utils",
     "../../test:rtp_test_utils",
     "../rtp_rtcp",
+    "../rtp_rtcp:rtp_rtcp_format",
   ]
 
   public_deps = [
@@ -1134,6 +1135,7 @@
     "../../api/audio_codecs:audio_codecs_api",
     "../../rtc_base:rtc_base_approved",
     "../rtp_rtcp",
+    "../rtp_rtcp:rtp_rtcp_format",
   ]
 
   public_deps = [
@@ -1175,6 +1177,7 @@
       ":neteq_tools_minimal",
       "../../logging:rtc_event_log_parser",
       "../../rtc_base:rtc_base_approved",
+      "../rtp_rtcp:rtp_rtcp_format",
     ]
     public_deps = [
       "../../logging:rtc_event_log_proto",
diff --git a/modules/congestion_controller/BUILD.gn b/modules/congestion_controller/BUILD.gn
index c53f073..d1a8653 100644
--- a/modules/congestion_controller/BUILD.gn
+++ b/modules/congestion_controller/BUILD.gn
@@ -58,7 +58,7 @@
     "../bitrate_controller",
     "../pacing",
     "../remote_bitrate_estimator",
-    "../rtp_rtcp",
+    "../rtp_rtcp:rtp_rtcp_format",
     "../utility",
   ]
 }
@@ -95,7 +95,7 @@
       "../pacing:mock_paced_sender",
       "../pacing:pacing",
       "../remote_bitrate_estimator:remote_bitrate_estimator",
-      "../rtp_rtcp:rtp_rtcp",
+      "../rtp_rtcp:rtp_rtcp_format",
       "//testing/gmock",
     ]
     if (!build_with_chromium && is_clang) {
diff --git a/modules/pacing/BUILD.gn b/modules/pacing/BUILD.gn
index 2364432..02abf63 100644
--- a/modules/pacing/BUILD.gn
+++ b/modules/pacing/BUILD.gn
@@ -41,6 +41,7 @@
     "../../system_wrappers",
     "../remote_bitrate_estimator",
     "../rtp_rtcp",
+    "../rtp_rtcp:rtp_rtcp_format",
     "../utility",
   ]
 }
@@ -65,6 +66,7 @@
       "../../test:test_support",
       "../rtp_rtcp",
       "../rtp_rtcp:mock_rtp_rtcp",
+      "../rtp_rtcp:rtp_rtcp_format",
       "//testing/gmock",
     ]
 
diff --git a/modules/remote_bitrate_estimator/BUILD.gn b/modules/remote_bitrate_estimator/BUILD.gn
index 73ad176..b9bf792 100644
--- a/modules/remote_bitrate_estimator/BUILD.gn
+++ b/modules/remote_bitrate_estimator/BUILD.gn
@@ -65,7 +65,7 @@
       ":remote_bitrate_estimator",
       "../../rtc_base:rtc_base_approved",
       "../../test:rtp_test_utils",
-      "../rtp_rtcp:rtp_rtcp",
+      "../rtp_rtcp",
     ]
     if (is_clang) {
       # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
@@ -149,6 +149,7 @@
       "../congestion_controller",
       "../pacing",
       "../rtp_rtcp",
+      "../rtp_rtcp:rtp_rtcp_format",
       "../video_coding:video_coding_utility",
       "//testing/gmock",
       "//testing/gtest",
@@ -205,7 +206,7 @@
       "../../test:field_trial",
       "../../test:test_support",
       "../pacing:pacing",
-      "../rtp_rtcp:rtp_rtcp",
+      "../rtp_rtcp:rtp_rtcp_format",
       "//testing/gmock",
     ]
     if (is_win) {
diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn
index 71e174e..0879ab0 100644
--- a/modules/rtp_rtcp/BUILD.gn
+++ b/modules/rtp_rtcp/BUILD.gn
@@ -188,6 +188,7 @@
   }
 
   deps = [
+    ":rtp_rtcp_format",
     "..:module_api",
     "../..:webrtc_common",
     "../../api:array_view",
@@ -206,10 +207,6 @@
     "../remote_bitrate_estimator",
   ]
 
-  public_deps = [
-    ":rtp_rtcp_format",
-  ]
-
   # TODO(jschuh): Bug 1348: fix this warning.
   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
 
@@ -234,6 +231,7 @@
   ]
   deps = [
     ":rtp_rtcp",
+    ":rtp_rtcp_format",
     "../../api:array_view",
     "../../api:optional",
     "../../api:transport_api",
@@ -252,6 +250,7 @@
   ]
   deps = [
     ":rtp_rtcp",
+    ":rtp_rtcp_format",
     "..:module_api",
     "../../rtc_base:rtc_base_approved",
   ]
@@ -273,6 +272,7 @@
   ]
   deps = [
     ":rtp_rtcp",
+    ":rtp_rtcp_format",
     "..:module_api",
     "../../api:optional",
     "../../rtc_base:rtc_base_approved",
@@ -304,6 +304,7 @@
     ]
     deps = [
       ":rtp_rtcp",
+      ":rtp_rtcp_format",
       "../../rtc_base:rtc_base_approved",
       "../../test:test_support",
     ]
@@ -385,6 +386,7 @@
       ":mock_rtp_rtcp",
       ":rtcp_transceiver",
       ":rtp_rtcp",
+      ":rtp_rtcp_format",
       "..:module_api",
       "../..:webrtc_common",
       "../../api:array_view",
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 3e3cedc..19b0501 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -110,7 +110,7 @@
     "../../rtc_base:sequenced_task_checker",
     "../../system_wrappers",
     "../pacing",
-    "../rtp_rtcp:rtp_rtcp",
+    "../rtp_rtcp:rtp_rtcp_format",
     "../utility:utility",
   ]
 }
@@ -169,12 +169,13 @@
     "../../api:optional",
     "../../api/video_codecs:video_codecs_api",
     "../../common_video",
-    "../../modules/rtp_rtcp:rtp_rtcp",
+    "../../modules/rtp_rtcp",
     "../../rtc_base:rtc_base_approved",
     "../../rtc_base:rtc_numerics",
     "../../rtc_base:rtc_task_queue",
     "../../rtc_base:sequenced_task_checker",
     "../../system_wrappers",
+    "../rtp_rtcp:rtp_rtcp_format",
   ]
 }
 
@@ -599,7 +600,7 @@
       "../../test:test_support",
       "../../test:video_test_common",
       "../../test:video_test_support",
-      "../rtp_rtcp:rtp_rtcp",
+      "../rtp_rtcp:rtp_rtcp_format",
       "//testing/gmock",
     ]
     if (rtc_build_libvpx) {