Migrated target RTPencode to GN

TBR=henrik.lundin@webrtc.org

BUG=6162

Review-Url: https://codereview.webrtc.org/2195353002
Cr-Commit-Position: refs/heads/master@{#13599}
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 047c036..98047fd 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -1250,6 +1250,61 @@
     }
   }
 
+  config("RTPencode_config") {
+    defines = [
+      "CODEC_ILBC",
+      "CODEC_PCM16B",
+      "CODEC_G711",
+      "CODEC_G722",
+      "CODEC_ISAC",
+      "CODEC_PCM16B_WB",
+      "CODEC_ISAC_SWB",
+      "CODEC_PCM16B_32KHZ",
+      "CODEC_PCM16B_48KHZ",
+      "CODEC_CNGCODEC8",
+      "CODEC_CNGCODEC16",
+      "CODEC_CNGCODEC32",
+      "CODEC_ATEVENT_DECODE",
+      "CODEC_RED",
+      "CODEC_OPUS",
+    ]
+  }
+
+  executable("RTPencode") {
+    testonly = true
+
+    deps = [
+      # TODO(hlundin): Make RTPencode use ACM to encode files.
+      ":cng",
+      ":g711",
+      ":g722",
+      ":ilbc",
+      ":isac",
+      ":neteq_test_tools",
+      ":pcm16b",
+      ":webrtc_opus",
+      "../../common_audio",
+    ]
+
+    configs += [ ":RTPencode_config" ]
+
+    sources = [
+      "neteq/test/RTPencode.cc",
+    ]
+
+    include_dirs = [
+      "neteq/include",
+      "neteq/test",
+    ]
+
+    if (is_win) {
+      cflags = [
+        # Disable warnings to enable Win64 build, issue 1323.
+        "/wd4267",  # size_t to int truncation
+      ]
+    }
+  }
+
   executable("rtp_analyze") {
     testonly = true
 
diff --git a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
index 149f282..4ccf4fb 100644
--- a/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
+++ b/webrtc/modules/audio_coding/neteq/test/RTPencode.cc
@@ -322,8 +322,9 @@
     printf("Application to encode speech into an RTP stream.\n");
     printf("The program reads a PCM file and encodes is using the specified "
            "codec.\n");
-    printf("The coded speech is packetized in RTP packest and written to the "
-           "output file.\n");
+    printf(
+        "The coded speech is packetized in RTP packets and written to the "
+        "output file.\n");
     printf("The format of the RTP stream file is simlilar to that of "
            "rtpplay,\n");
     printf("but with the receive time euqal to 0 for all packets.\n");