BUILD.gn (3637B)
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("//chromium/build/config/android/config.gni") 12 import("//chromium/build/config/android/rules.gni") 13 } 14 15 rtc_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 "..:ref_count", 36 "..:scoped_refptr", 37 "../../api:rtp_parameters", 38 "../../api/audio:audio_frame_api", 39 "../../rtc_base:buffer", 40 "../../rtc_base:checks", 41 "../../rtc_base:event_tracer", 42 "../../rtc_base:refcount", 43 "../../rtc_base:sanitizer", 44 "../../rtc_base:stringutils", 45 "../../rtc_base/system:rtc_export", 46 "../environment", 47 "../units:data_rate", 48 "../units:time_delta", 49 "//third_party/abseil-cpp/absl/base:core_headers", 50 "//third_party/abseil-cpp/absl/base:nullability", 51 "//third_party/abseil-cpp/absl/strings", 52 "//third_party/abseil-cpp/absl/strings:string_view", 53 ] 54 } 55 56 rtc_library("builtin_audio_decoder_factory") { 57 visibility = [ "*" ] 58 allow_poison = [ "audio_codecs" ] 59 sources = [ 60 "builtin_audio_decoder_factory.cc", 61 "builtin_audio_decoder_factory.h", 62 ] 63 deps = [ 64 ":audio_codecs_api", 65 "..:scoped_refptr", 66 "L16:audio_decoder_L16", 67 "g711:audio_decoder_g711", 68 "g722:audio_decoder_g722", 69 ] 70 defines = [] 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 82 rtc_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 "..:field_trials_view", 92 "..:scoped_refptr", 93 "L16:audio_encoder_L16", 94 "g711:audio_encoder_g711", 95 "g722:audio_encoder_g722", 96 ] 97 defines = [] 98 if (rtc_include_opus) { 99 deps += [ 100 "..:field_trials_view", 101 "opus:audio_encoder_multiopus", 102 "opus:audio_encoder_opus", 103 ] 104 defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ] 105 } else { 106 defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ] 107 } 108 } 109 110 rtc_library("opus_audio_decoder_factory") { 111 visibility = [ "*" ] 112 allow_poison = [ "audio_codecs" ] 113 sources = [ 114 "opus_audio_decoder_factory.cc", 115 "opus_audio_decoder_factory.h", 116 ] 117 deps = [ 118 ":audio_codecs_api", 119 "..:scoped_refptr", 120 "opus:audio_decoder_multiopus", 121 "opus:audio_decoder_opus", 122 ] 123 } 124 125 rtc_library("opus_audio_encoder_factory") { 126 visibility = [ "*" ] 127 allow_poison = [ "audio_codecs" ] 128 sources = [ 129 "opus_audio_encoder_factory.cc", 130 "opus_audio_encoder_factory.h", 131 ] 132 deps = [ 133 ":audio_codecs_api", 134 "..:field_trials_view", 135 "..:scoped_refptr", 136 "opus:audio_encoder_multiopus", 137 "opus:audio_encoder_opus", 138 ] 139 }