blob: 8e6a0f35225feae18f54d510101b230575bb9964 [file] [log] [blame]
kwiberg087bd342017-02-10 08:15:44 -08001# 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
9import("../../webrtc.gni")
10if (is_android) {
11 import("//build/config/android/config.gni")
12 import("//build/config/android/rules.gni")
13}
14
15rtc_source_set("audio_codecs_api") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000016 visibility = [ "*" ]
kwiberg087bd342017-02-10 08:15:44 -080017 sources = [
Karl Wiberg98900742018-03-01 12:03:49 +010018 "audio_codec_pair_id.cc",
19 "audio_codec_pair_id.h",
kwiberg087bd342017-02-10 08:15:44 -080020 "audio_decoder.cc",
21 "audio_decoder.h",
22 "audio_decoder_factory.h",
kwiberg0eacd882017-06-17 15:45:28 -070023 "audio_decoder_factory_template.h",
ossueb1fde42017-05-02 06:46:30 -070024 "audio_encoder.cc",
25 "audio_encoder.h",
26 "audio_encoder_factory.h",
kwiberg65315832017-06-16 10:42:05 -070027 "audio_encoder_factory_template.h",
kwiberg087bd342017-02-10 08:15:44 -080028 "audio_format.cc",
29 "audio_format.h",
30 ]
31 deps = [
kwiberg529662a2017-09-04 05:43:17 -070032 "..:array_view",
kwiberg087bd342017-02-10 08:15:44 -080033 "../..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010034 "../../rtc_base:checks",
Patrik Höglund3e113432017-12-15 14:40:10 +010035 "../../rtc_base:deprecation",
ehmaldonadof6a861a2017-07-19 10:40:47 -070036 "../../rtc_base:rtc_base_approved",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010037 "../../rtc_base:sanitizer",
Danil Chapovalov0bc58cf2018-06-21 13:32:56 +020038 "//third_party/abseil-cpp/absl/types:optional",
kwiberg087bd342017-02-10 08:15:44 -080039 ]
40}
41
42rtc_static_library("builtin_audio_decoder_factory") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000043 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020044 allow_poison = [ "audio_codecs" ]
kwiberg087bd342017-02-10 08:15:44 -080045 sources = [
46 "builtin_audio_decoder_factory.cc",
47 "builtin_audio_decoder_factory.h",
48 ]
49 deps = [
50 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070051 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070052 "L16:audio_decoder_L16",
53 "g711:audio_decoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010054 "g722:audio_decoder_g722",
55 "isac:audio_decoder_isac",
kwiberg087bd342017-02-10 08:15:44 -080056 ]
kwiberge5eb7242017-08-25 03:10:50 -070057 defines = []
58 if (rtc_include_ilbc) {
59 deps += [ "ilbc:audio_decoder_ilbc" ]
60 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
61 } else {
62 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
63 }
64 if (rtc_include_opus) {
65 deps += [ "opus:audio_decoder_opus" ]
66 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
67 } else {
68 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
69 }
kwiberg087bd342017-02-10 08:15:44 -080070}
ossueb1fde42017-05-02 06:46:30 -070071
72rtc_static_library("builtin_audio_encoder_factory") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000073 visibility = [ "*" ]
Karl Wibergbb23c832018-04-22 19:55:00 +020074 allow_poison = [ "audio_codecs" ]
ossueb1fde42017-05-02 06:46:30 -070075 sources = [
76 "builtin_audio_encoder_factory.cc",
77 "builtin_audio_encoder_factory.h",
78 ]
79 deps = [
80 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070081 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070082 "L16:audio_encoder_L16",
83 "g711:audio_encoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010084 "g722:audio_encoder_g722",
85 "isac:audio_encoder_isac",
ossueb1fde42017-05-02 06:46:30 -070086 ]
kwiberge5eb7242017-08-25 03:10:50 -070087 defines = []
88 if (rtc_include_ilbc) {
89 deps += [ "ilbc:audio_encoder_ilbc" ]
90 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
91 } else {
92 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
93 }
94 if (rtc_include_opus) {
95 deps += [ "opus:audio_encoder_opus" ]
96 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
97 } else {
98 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
99 }
ossueb1fde42017-05-02 06:46:30 -0700100}