Separate i420 and i444 implementations to separate targets.

This means we can properly declare the dependency between
libjingle_peerconnection_api and video_frame_api. i420
pulls in system_wrappers, which can't be a dependency of
the public API.

Plan:
1) Land this CL + send out PSA
2) Make all direct users of i420_buffer depend on the
   new video_frame_api_i420 target
3) Move i420_buffer.cc to the new target
4) Make libjingle_peerconnection_api depend on
   video_frame_api, since it no longer contains i420 code

Bug: webrtc:7504
Change-Id: I30d90f2ac7af53748859bbde8aed92386d5501f9
Reviewed-on: https://webrtc-review.googlesource.com/9382
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20656}
diff --git a/api/BUILD.gn b/api/BUILD.gn
index bad3a51..05b8902 100644
--- a/api/BUILD.gn
+++ b/api/BUILD.gn
@@ -81,15 +81,16 @@
   ]
 
   deps = [
-    # Basically, don't add stuff here. You might break sensitive downstream
-    # targets like pnacl. API should not depend on anything, really. All these
-    # should go away, in time.
     ":optional",
     ":rtc_stats_api",
+    "audio_codecs:audio_codecs_api",
+
+    # Basically, don't add stuff here. You might break sensitive downstream
+    # targets like pnacl. API should not depend on anything outside of this
+    # file, really. All these should arguably go away in time.
     "..:webrtc_common",
     "../rtc_base:rtc_base",
     "../rtc_base:rtc_base_approved",
-    "audio_codecs:audio_codecs_api",
   ]
 
   # This is needed until bugs.webrtc.org/7504 is removed so this target can
@@ -214,6 +215,8 @@
 
 rtc_source_set("video_frame_api") {
   sources = [
+    # TODO(phoglund): move i420 files to video_frame_api_i420 after updating
+    # downstream. See bugs.webrtc.org/7504.
     "video/i420_buffer.cc",
     "video/i420_buffer.h",
     "video/video_content_type.cc",
@@ -245,6 +248,17 @@
   }
 }
 
+rtc_source_set("video_frame_api_i420") {
+  sources = [
+    "video/i420_buffer.h",
+  ]
+  deps = [
+    ":video_frame_api",
+    "../rtc_base:rtc_base_approved",
+    "../system_wrappers",
+  ]
+}
+
 rtc_source_set("array_view") {
   sources = [
     "array_view.h",