You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. import("../../webrtc.gni")
  9. if (is_android) {
  10. import("//build/config/android/config.gni")
  11. import("//build/config/android/rules.gni")
  12. }
  13. rtc_library("audio_codecs_api") {
  14. visibility = [ "*" ]
  15. sources = [
  16. "audio_codec_pair_id.cc",
  17. "audio_codec_pair_id.h",
  18. "audio_decoder.cc",
  19. "audio_decoder.h",
  20. "audio_decoder_factory.h",
  21. "audio_decoder_factory_template.h",
  22. "audio_encoder.cc",
  23. "audio_encoder.h",
  24. "audio_encoder_factory.h",
  25. "audio_encoder_factory_template.h",
  26. "audio_format.cc",
  27. "audio_format.h",
  28. ]
  29. deps = [
  30. "..:array_view",
  31. "..:bitrate_allocation",
  32. "..:scoped_refptr",
  33. "../../rtc_base:checks",
  34. "../../rtc_base:deprecation",
  35. "../../rtc_base:rtc_base_approved",
  36. "../../rtc_base:sanitizer",
  37. "../../rtc_base/system:rtc_export",
  38. "../units:time_delta",
  39. "//third_party/abseil-cpp/absl/strings",
  40. "//third_party/abseil-cpp/absl/types:optional",
  41. ]
  42. }
  43. rtc_library("builtin_audio_decoder_factory") {
  44. visibility = [ "*" ]
  45. allow_poison = [ "audio_codecs" ]
  46. sources = [
  47. "builtin_audio_decoder_factory.cc",
  48. "builtin_audio_decoder_factory.h",
  49. ]
  50. deps = [
  51. ":audio_codecs_api",
  52. "..:scoped_refptr",
  53. "../../rtc_base:rtc_base_approved",
  54. "L16:audio_decoder_L16",
  55. "g711:audio_decoder_g711",
  56. "g722:audio_decoder_g722",
  57. "isac:audio_decoder_isac",
  58. ]
  59. defines = []
  60. if (rtc_include_ilbc) {
  61. deps += [ "ilbc:audio_decoder_ilbc" ]
  62. defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
  63. } else {
  64. defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
  65. }
  66. if (rtc_include_opus) {
  67. deps += [
  68. "opus:audio_decoder_multiopus",
  69. "opus:audio_decoder_opus",
  70. ]
  71. defines += [ "WEBRTC_USE_BUILTIN_OPUS=1" ]
  72. } else {
  73. defines += [ "WEBRTC_USE_BUILTIN_OPUS=0" ]
  74. }
  75. }
  76. rtc_library("builtin_audio_encoder_factory") {
  77. visibility = [ "*" ]
  78. allow_poison = [ "audio_codecs" ]
  79. sources = [
  80. "builtin_audio_encoder_factory.cc",
  81. "builtin_audio_encoder_factory.h",
  82. ]
  83. deps = [
  84. ":audio_codecs_api",
  85. "..:scoped_refptr",
  86. "../../rtc_base:rtc_base_approved",
  87. "L16:audio_encoder_L16",
  88. "g711:audio_encoder_g711",
  89. "g722:audio_encoder_g722",
  90. "isac:audio_encoder_isac",
  91. ]
  92. defines = []
  93. if (rtc_include_ilbc) {
  94. deps += [ "ilbc:audio_encoder_ilbc" ]
  95. defines += [ "WEBRTC_USE_BUILTIN_ILBC=1" ]
  96. } else {
  97. defines += [ "WEBRTC_USE_BUILTIN_ILBC=0" ]
  98. }
  99. if (rtc_include_opus) {
  100. deps += [
  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. }