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 "..:make_ref_counted", 35 "..:scoped_refptr", 36 "../../api:field_trials_view", 37 "../../rtc_base:buffer", 38 "../../rtc_base:checks", 39 "../../rtc_base:event_tracer", 40 "../../rtc_base:refcount", 41 "../../rtc_base:sanitizer", 42 "../../rtc_base/system:rtc_export", 43 "../units:time_delta", 44 ] 45 absl_deps = [ 46 "//third_party/abseil-cpp/absl/base:core_headers", 47 "//third_party/abseil-cpp/absl/strings", 48 "//third_party/abseil-cpp/absl/types:optional", 49 ] 50} 51 52rtc_library("builtin_audio_decoder_factory") { 53 visibility = [ "*" ] 54 allow_poison = [ "audio_codecs" ] 55 sources = [ 56 "builtin_audio_decoder_factory.cc", 57 "builtin_audio_decoder_factory.h", 58 ] 59 deps = [ 60 ":audio_codecs_api", 61 "..:scoped_refptr", 62 "L16:audio_decoder_L16", 63 "g711:audio_decoder_g711", 64 "g722:audio_decoder_g722", 65 ] 66 defines = [] 67 if (rtc_include_ilbc) { 68 deps += [ "ilbc:audio_decoder_ilbc" ] 69 defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ] 70 } else { 71 defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ] 72 } 73 if (rtc_include_opus) { 74 deps += [ 75 "opus:audio_decoder_multiopus", 76 "opus:audio_decoder_opus", 77 ] 78 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ] 79 } else { 80 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ] 81 } 82} 83 84rtc_library("builtin_audio_encoder_factory") { 85 visibility = [ "*" ] 86 allow_poison = [ "audio_codecs" ] 87 sources = [ 88 "builtin_audio_encoder_factory.cc", 89 "builtin_audio_encoder_factory.h", 90 ] 91 deps = [ 92 ":audio_codecs_api", 93 "..:scoped_refptr", 94 "L16:audio_encoder_L16", 95 "g711:audio_encoder_g711", 96 "g722:audio_encoder_g722", 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 "opus:audio_decoder_multiopus", 127 "opus:audio_decoder_opus", 128 ] 129} 130 131rtc_library("opus_audio_encoder_factory") { 132 visibility = [ "*" ] 133 allow_poison = [ "audio_codecs" ] 134 sources = [ 135 "opus_audio_encoder_factory.cc", 136 "opus_audio_encoder_factory.h", 137 ] 138 deps = [ 139 ":audio_codecs_api", 140 "..:scoped_refptr", 141 "opus:audio_encoder_multiopus", 142 "opus:audio_encoder_opus", 143 ] 144} 145