BUILD.gn 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # Copyright 2015 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file.
  4. source_set("encoder") {
  5. sources = [
  6. "audio_encoder.h",
  7. "encoder_bitrate_filter.cc",
  8. "encoder_bitrate_filter.h",
  9. "video_encoder.cc",
  10. "video_encoder.h",
  11. "video_encoder_active_map.cc",
  12. "video_encoder_active_map.h",
  13. "video_encoder_helper.cc",
  14. "video_encoder_helper.h",
  15. "video_encoder_verbatim.cc",
  16. "video_encoder_verbatim.h",
  17. "video_encoder_vpx.cc",
  18. "video_encoder_vpx.h",
  19. "webrtc_video_encoder.cc",
  20. "webrtc_video_encoder_av1.cc",
  21. "webrtc_video_encoder_av1.h",
  22. "webrtc_video_encoder_vpx.cc",
  23. "webrtc_video_encoder_vpx.h",
  24. ]
  25. configs += [ "//build/config/compiler:wexit_time_destructors" ]
  26. deps = [
  27. ":vpx_codec",
  28. "//base/third_party/dynamic_annotations",
  29. "//build:chromeos_buildflags",
  30. "//remoting/base:base",
  31. "//remoting/proto",
  32. "//remoting/protocol:session_config",
  33. "//third_party/libaom",
  34. "//third_party/libvpx",
  35. "//third_party/libyuv",
  36. "//third_party/opus",
  37. "//third_party/webrtc_overrides:webrtc_component",
  38. "//ui/gfx:color_space",
  39. "//ui/gfx/geometry",
  40. ]
  41. # Currently, building WebrtcVideoEncoderGpu is only supported on Windows and
  42. # Linux, and encoding with WebrtcVideoEncoderGpu is only supported on Windows.
  43. if (is_win || is_linux || is_chromeos) {
  44. public_configs = [ "//skia:skia_config" ]
  45. sources += [
  46. "webrtc_video_encoder_gpu.cc",
  47. "webrtc_video_encoder_gpu.h",
  48. ]
  49. deps += [
  50. "//gpu/command_buffer/service",
  51. "//media/gpu",
  52. ]
  53. }
  54. # Opus depends on //media, which is not a supported include for iOS.
  55. # Also disabled it on Android, to avoid dependency on //media.
  56. # TODO(sergeyu): Cleanup host-only deps in client targets.
  57. if (!is_ios && !is_android) {
  58. sources += [
  59. "audio_encoder_opus.cc",
  60. "audio_encoder_opus.h",
  61. ]
  62. deps += [
  63. "//media",
  64. "//media:shared_memory_support",
  65. ]
  66. }
  67. }
  68. source_set("decoder") {
  69. sources = [
  70. "audio_decoder.cc",
  71. "audio_decoder.h",
  72. "audio_decoder_opus.cc",
  73. "audio_decoder_opus.h",
  74. "video_decoder.h",
  75. "video_decoder_verbatim.cc",
  76. "video_decoder_verbatim.h",
  77. "video_decoder_vpx.cc",
  78. "video_decoder_vpx.h",
  79. ]
  80. configs += [ "//build/config/compiler:wexit_time_destructors" ]
  81. deps = [
  82. ":vpx_codec",
  83. "//base:base",
  84. "//base/third_party/dynamic_annotations",
  85. "//remoting/base:base",
  86. "//remoting/proto",
  87. "//remoting/protocol:session_config",
  88. "//third_party/libvpx",
  89. "//third_party/libyuv",
  90. "//third_party/opus",
  91. "//third_party/webrtc_overrides:webrtc_component",
  92. ]
  93. }
  94. source_set("vpx_codec") {
  95. sources = [
  96. "scoped_vpx_codec.cc",
  97. "scoped_vpx_codec.h",
  98. ]
  99. configs += [ "//build/config/compiler:wexit_time_destructors" ]
  100. public_deps = [ "//third_party/libvpx" ]
  101. deps = [
  102. "//base:base",
  103. "//base/third_party/dynamic_annotations",
  104. "//remoting/proto",
  105. "//third_party/libyuv",
  106. "//third_party/webrtc_overrides:webrtc_component",
  107. ]
  108. }
  109. source_set("unit_tests") {
  110. testonly = true
  111. sources = [
  112. "audio_encoder_opus_unittest.cc",
  113. "codec_test.cc",
  114. "codec_test.h",
  115. "encoder_bitrate_filter_unittest.cc",
  116. "video_decoder_vpx_unittest.cc",
  117. "video_encoder_helper_unittest.cc",
  118. "video_encoder_verbatim_unittest.cc",
  119. "video_encoder_vpx_unittest.cc",
  120. ]
  121. deps = [
  122. ":decoder",
  123. ":encoder",
  124. "//base",
  125. "//remoting/base:base",
  126. "//remoting/proto",
  127. "//testing/gtest",
  128. "//third_party/webrtc_overrides:webrtc_component",
  129. "//ui/gfx:color_space",
  130. ]
  131. if (is_ios || is_android) {
  132. sources -= [ "audio_encoder_opus_unittest.cc" ]
  133. }
  134. }