blob: f73026001541cdcae366308cc5f29be2f481e4b6 [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 = [
18 "audio_decoder.cc",
19 "audio_decoder.h",
20 "audio_decoder_factory.h",
kwiberg0eacd882017-06-17 15:45:28 -070021 "audio_decoder_factory_template.h",
ossueb1fde42017-05-02 06:46:30 -070022 "audio_encoder.cc",
23 "audio_encoder.h",
24 "audio_encoder_factory.h",
kwiberg65315832017-06-16 10:42:05 -070025 "audio_encoder_factory_template.h",
kwiberg087bd342017-02-10 08:15:44 -080026 "audio_format.cc",
27 "audio_format.h",
28 ]
29 deps = [
kwiberg529662a2017-09-04 05:43:17 -070030 "..:array_view",
kwiberg84f6a3f2017-09-05 08:43:13 -070031 "..:optional",
kwiberg087bd342017-02-10 08:15:44 -080032 "../..:webrtc_common",
Patrik Höglund3e113432017-12-15 14:40:10 +010033 "../../:typedefs",
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",
kwiberg087bd342017-02-10 08:15:44 -080038 ]
39}
40
41rtc_static_library("builtin_audio_decoder_factory") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000042 visibility = [ "*" ]
kwiberg087bd342017-02-10 08:15:44 -080043 sources = [
44 "builtin_audio_decoder_factory.cc",
45 "builtin_audio_decoder_factory.h",
46 ]
47 deps = [
48 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070049 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070050 "L16:audio_decoder_L16",
51 "g711:audio_decoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010052 "g722:audio_decoder_g722",
53 "isac:audio_decoder_isac",
kwiberg087bd342017-02-10 08:15:44 -080054 ]
kwiberge5eb7242017-08-25 03:10:50 -070055 defines = []
56 if (rtc_include_ilbc) {
57 deps += [ "ilbc:audio_decoder_ilbc" ]
58 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
59 } else {
60 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
61 }
62 if (rtc_include_opus) {
63 deps += [ "opus:audio_decoder_opus" ]
64 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
65 } else {
66 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
67 }
kwiberg087bd342017-02-10 08:15:44 -080068}
ossueb1fde42017-05-02 06:46:30 -070069
70rtc_static_library("builtin_audio_encoder_factory") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000071 visibility = [ "*" ]
ossueb1fde42017-05-02 06:46:30 -070072 sources = [
73 "builtin_audio_encoder_factory.cc",
74 "builtin_audio_encoder_factory.h",
75 ]
76 deps = [
77 ":audio_codecs_api",
ehmaldonadof6a861a2017-07-19 10:40:47 -070078 "../../rtc_base:rtc_base_approved",
kwiberge5eb7242017-08-25 03:10:50 -070079 "L16:audio_encoder_L16",
80 "g711:audio_encoder_g711",
Karl Wibergeb254b42017-11-01 15:08:12 +010081 "g722:audio_encoder_g722",
82 "isac:audio_encoder_isac",
ossueb1fde42017-05-02 06:46:30 -070083 ]
kwiberge5eb7242017-08-25 03:10:50 -070084 defines = []
85 if (rtc_include_ilbc) {
86 deps += [ "ilbc:audio_encoder_ilbc" ]
87 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
88 } else {
89 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
90 }
91 if (rtc_include_opus) {
92 deps += [ "opus:audio_encoder_opus" ]
93 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
94 } else {
95 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
96 }
ossueb1fde42017-05-02 06:46:30 -070097}