kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 1 | # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | import("../../../webrtc.gni") |
| 10 | if (is_android) { |
| 11 | import("//build/config/android/config.gni") |
| 12 | import("//build/config/android/rules.gni") |
| 13 | } |
| 14 | |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 15 | # The targets with _fix and _float suffixes unconditionally use the |
| 16 | # fixed-point and floating-point iSAC implementations, respectively. |
| 17 | # The targets without suffixes pick one of the implementations based |
| 18 | # on cleverly chosen criteria. |
| 19 | |
| 20 | rtc_source_set("audio_encoder_isac") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 21 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 22 | poisonous = [ "audio_codecs" ] |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 23 | public = [ |
| 24 | "audio_encoder_isac.h", |
| 25 | ] |
| 26 | public_configs = [ ":isac_config" ] |
| 27 | if (current_cpu == "arm") { |
| 28 | deps = [ |
| 29 | ":audio_encoder_isac_fix", |
| 30 | ] |
| 31 | } else { |
| 32 | deps = [ |
| 33 | ":audio_encoder_isac_float", |
| 34 | ] |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | rtc_source_set("audio_decoder_isac") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 39 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 40 | poisonous = [ "audio_codecs" ] |
Karl Wiberg | 735a838 | 2017-10-05 11:00:38 +0200 | [diff] [blame] | 41 | public = [ |
| 42 | "audio_decoder_isac.h", |
| 43 | ] |
| 44 | public_configs = [ ":isac_config" ] |
| 45 | if (current_cpu == "arm") { |
| 46 | deps = [ |
| 47 | ":audio_decoder_isac_fix", |
| 48 | ] |
| 49 | } else { |
| 50 | deps = [ |
| 51 | ":audio_decoder_isac_float", |
| 52 | ] |
| 53 | } |
| 54 | } |
| 55 | |
| 56 | config("isac_config") { |
| 57 | visibility = [ ":*" ] |
| 58 | if (current_cpu == "arm") { |
| 59 | defines = [ |
| 60 | "WEBRTC_USE_BUILTIN_ISAC_FIX=1", |
| 61 | "WEBRTC_USE_BUILTIN_ISAC_FLOAT=0", |
| 62 | ] |
| 63 | } else { |
| 64 | defines = [ |
| 65 | "WEBRTC_USE_BUILTIN_ISAC_FIX=0", |
| 66 | "WEBRTC_USE_BUILTIN_ISAC_FLOAT=1", |
| 67 | ] |
| 68 | } |
| 69 | } |
| 70 | |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 71 | rtc_static_library("audio_encoder_isac_fix") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 72 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 73 | poisonous = [ "audio_codecs" ] |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 74 | sources = [ |
| 75 | "audio_encoder_isac_fix.cc", |
| 76 | "audio_encoder_isac_fix.h", |
| 77 | ] |
| 78 | deps = [ |
| 79 | "..:audio_codecs_api", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 80 | "../../../modules/audio_coding:isac_fix", |
| 81 | "../../../rtc_base:rtc_base_approved", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 82 | "//third_party/abseil-cpp/absl/memory", |
Niels Möller | 2edab4c | 2018-10-22 09:48:08 +0200 | [diff] [blame^] | 83 | "//third_party/abseil-cpp/absl/strings", |
Danil Chapovalov | 0bc58cf | 2018-06-21 13:32:56 +0200 | [diff] [blame] | 84 | "//third_party/abseil-cpp/absl/types:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 85 | ] |
| 86 | } |
| 87 | |
| 88 | rtc_static_library("audio_decoder_isac_fix") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 89 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 90 | poisonous = [ "audio_codecs" ] |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 91 | sources = [ |
| 92 | "audio_decoder_isac_fix.cc", |
| 93 | "audio_decoder_isac_fix.h", |
| 94 | ] |
| 95 | deps = [ |
| 96 | "..:audio_codecs_api", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 97 | "../../../modules/audio_coding:isac_fix", |
| 98 | "../../../rtc_base:rtc_base_approved", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 99 | "//third_party/abseil-cpp/absl/memory", |
Niels Möller | 2edab4c | 2018-10-22 09:48:08 +0200 | [diff] [blame^] | 100 | "//third_party/abseil-cpp/absl/strings", |
Danil Chapovalov | 0bc58cf | 2018-06-21 13:32:56 +0200 | [diff] [blame] | 101 | "//third_party/abseil-cpp/absl/types:optional", |
kwiberg | 327af33 | 2017-08-18 04:09:40 -0700 | [diff] [blame] | 102 | ] |
| 103 | } |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 104 | |
| 105 | rtc_static_library("audio_encoder_isac_float") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 106 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 107 | poisonous = [ "audio_codecs" ] |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 108 | sources = [ |
| 109 | "audio_encoder_isac_float.cc", |
| 110 | "audio_encoder_isac_float.h", |
| 111 | ] |
| 112 | deps = [ |
| 113 | "..:audio_codecs_api", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 114 | "../../../modules/audio_coding:isac", |
| 115 | "../../../rtc_base:rtc_base_approved", |
Mirko Bonadei | 276827c | 2018-10-16 14:13:50 +0200 | [diff] [blame] | 116 | "../../../rtc_base/system:rtc_export", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 117 | "//third_party/abseil-cpp/absl/memory", |
Niels Möller | 2edab4c | 2018-10-22 09:48:08 +0200 | [diff] [blame^] | 118 | "//third_party/abseil-cpp/absl/strings", |
Danil Chapovalov | 0bc58cf | 2018-06-21 13:32:56 +0200 | [diff] [blame] | 119 | "//third_party/abseil-cpp/absl/types:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 120 | ] |
| 121 | } |
| 122 | |
| 123 | rtc_static_library("audio_decoder_isac_float") { |
Per Kjellander | a7f2d84 | 2018-01-10 15:54:53 +0000 | [diff] [blame] | 124 | visibility = [ "*" ] |
Karl Wiberg | bb23c83 | 2018-04-22 19:55:00 +0200 | [diff] [blame] | 125 | poisonous = [ "audio_codecs" ] |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 126 | sources = [ |
| 127 | "audio_decoder_isac_float.cc", |
| 128 | "audio_decoder_isac_float.h", |
| 129 | ] |
| 130 | deps = [ |
| 131 | "..:audio_codecs_api", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 132 | "../../../modules/audio_coding:isac", |
| 133 | "../../../rtc_base:rtc_base_approved", |
Mirko Bonadei | 3d25530 | 2018-10-11 10:50:45 +0200 | [diff] [blame] | 134 | "../../../rtc_base/system:rtc_export", |
Karl Wiberg | 918f50c | 2018-07-05 11:40:33 +0200 | [diff] [blame] | 135 | "//third_party/abseil-cpp/absl/memory", |
Niels Möller | 2edab4c | 2018-10-22 09:48:08 +0200 | [diff] [blame^] | 136 | "//third_party/abseil-cpp/absl/strings", |
Danil Chapovalov | 0bc58cf | 2018-06-21 13:32:56 +0200 | [diff] [blame] | 137 | "//third_party/abseil-cpp/absl/types:optional", |
kwiberg | e57556c | 2017-08-21 06:11:18 -0700 | [diff] [blame] | 138 | ] |
| 139 | } |