• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9import("../../webrtc.gni")
10if (is_android) {
11  import("//build/config/android/config.gni")
12  import("//build/config/android/rules.gni")
13}
14
15rtc_library("audio_codecs_api") {
16  visibility = [ "*" ]
17  sources = [
18    "audio_codec_pair_id.cc",
19    "audio_codec_pair_id.h",
20    "audio_decoder.cc",
21    "audio_decoder.h",
22    "audio_decoder_factory.h",
23    "audio_decoder_factory_template.h",
24    "audio_encoder.cc",
25    "audio_encoder.h",
26    "audio_encoder_factory.h",
27    "audio_encoder_factory_template.h",
28    "audio_format.cc",
29    "audio_format.h",
30  ]
31  deps = [
32    "..:array_view",
33    "..:bitrate_allocation",
34    "..:scoped_refptr",
35    "../../rtc_base:checks",
36    "../../rtc_base:deprecation",
37    "../../rtc_base:rtc_base_approved",
38    "../../rtc_base:sanitizer",
39    "../../rtc_base/system:rtc_export",
40    "../units:time_delta",
41  ]
42  absl_deps = [
43    "//third_party/abseil-cpp/absl/strings",
44    "//third_party/abseil-cpp/absl/types:optional",
45  ]
46}
47
48rtc_library("builtin_audio_decoder_factory") {
49  visibility = [ "*" ]
50  allow_poison = [ "audio_codecs" ]
51  sources = [
52    "builtin_audio_decoder_factory.cc",
53    "builtin_audio_decoder_factory.h",
54  ]
55  deps = [
56    ":audio_codecs_api",
57    "..:scoped_refptr",
58    "../../rtc_base:rtc_base_approved",
59    "L16:audio_decoder_L16",
60    "g711:audio_decoder_g711",
61    "g722:audio_decoder_g722",
62    "isac:audio_decoder_isac",
63  ]
64  defines = []
65  if (rtc_include_ilbc) {
66    deps += [ "ilbc:audio_decoder_ilbc" ]
67    defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
68  } else {
69    defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
70  }
71  if (rtc_include_opus) {
72    deps += [
73      "opus:audio_decoder_multiopus",
74      "opus:audio_decoder_opus",
75    ]
76    defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
77  } else {
78    defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
79  }
80}
81
82rtc_library("builtin_audio_encoder_factory") {
83  visibility = [ "*" ]
84  allow_poison = [ "audio_codecs" ]
85  sources = [
86    "builtin_audio_encoder_factory.cc",
87    "builtin_audio_encoder_factory.h",
88  ]
89  deps = [
90    ":audio_codecs_api",
91    "..:scoped_refptr",
92    "../../rtc_base:rtc_base_approved",
93    "L16:audio_encoder_L16",
94    "g711:audio_encoder_g711",
95    "g722:audio_encoder_g722",
96    "isac:audio_encoder_isac",
97  ]
98  defines = []
99  if (rtc_include_ilbc) {
100    deps += [ "ilbc:audio_encoder_ilbc" ]
101    defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
102  } else {
103    defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
104  }
105  if (rtc_include_opus) {
106    deps += [
107      "opus:audio_encoder_multiopus",
108      "opus:audio_encoder_opus",
109    ]
110    defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
111  } else {
112    defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
113  }
114}
115
116rtc_library("opus_audio_decoder_factory") {
117  visibility = [ "*" ]
118  allow_poison = [ "audio_codecs" ]
119  sources = [
120    "opus_audio_decoder_factory.cc",
121    "opus_audio_decoder_factory.h",
122  ]
123  deps = [
124    ":audio_codecs_api",
125    "..:scoped_refptr",
126    "../../rtc_base:rtc_base_approved",
127    "opus:audio_decoder_multiopus",
128    "opus:audio_decoder_opus",
129  ]
130}
131
132rtc_library("opus_audio_encoder_factory") {
133  visibility = [ "*" ]
134  allow_poison = [ "audio_codecs" ]
135  sources = [
136    "opus_audio_encoder_factory.cc",
137    "opus_audio_encoder_factory.h",
138  ]
139  deps = [
140    ":audio_codecs_api",
141    "..:scoped_refptr",
142    "../../rtc_base:rtc_base_approved",
143    "opus:audio_encoder_multiopus",
144    "opus:audio_encoder_opus",
145  ]
146}
147