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.

89 lines
2.3 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. # Copyright (c) 2018 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. rtc_library("task_queue") {
  10. visibility = [ "*" ]
  11. public = [
  12. "queued_task.h",
  13. "task_queue_base.h",
  14. "task_queue_factory.h",
  15. ]
  16. sources = [
  17. "task_queue_base.cc",
  18. ]
  19. deps = [
  20. "../../rtc_base:checks",
  21. "../../rtc_base:macromagic",
  22. "//third_party/abseil-cpp/absl/base:config",
  23. "//third_party/abseil-cpp/absl/base:core_headers",
  24. "//third_party/abseil-cpp/absl/strings",
  25. ]
  26. }
  27. rtc_library("task_queue_test") {
  28. visibility = [ "*" ]
  29. testonly = true
  30. sources = [
  31. "task_queue_test.cc",
  32. "task_queue_test.h",
  33. ]
  34. deps = [
  35. ":task_queue",
  36. "../../rtc_base:refcount",
  37. "../../rtc_base:rtc_event",
  38. "../../rtc_base:timeutils",
  39. "../../rtc_base/task_utils:to_queued_task",
  40. "../../test:test_support",
  41. "//third_party/abseil-cpp/absl/memory",
  42. "//third_party/abseil-cpp/absl/strings",
  43. ]
  44. }
  45. rtc_library("default_task_queue_factory") {
  46. visibility = [ "*" ]
  47. if (!is_ios && !is_android) {
  48. poisonous = [ "default_task_queue" ]
  49. }
  50. sources = [
  51. "default_task_queue_factory.h",
  52. ]
  53. deps = [
  54. ":task_queue",
  55. ]
  56. if (rtc_enable_libevent) {
  57. sources += [ "default_task_queue_factory_libevent.cc" ]
  58. deps += [ "../../rtc_base:rtc_task_queue_libevent" ]
  59. } else if (is_mac || is_ios) {
  60. sources += [ "default_task_queue_factory_gcd.cc" ]
  61. deps += [ "../../rtc_base:rtc_task_queue_gcd" ]
  62. } else if (is_win && current_os != "winuwp") {
  63. sources += [ "default_task_queue_factory_win.cc" ]
  64. deps += [ "../../rtc_base:rtc_task_queue_win" ]
  65. } else {
  66. sources += [ "default_task_queue_factory_stdlib.cc" ]
  67. deps += [ "../../rtc_base:rtc_task_queue_stdlib" ]
  68. }
  69. }
  70. if (rtc_include_tests) {
  71. rtc_library("task_queue_default_factory_unittests") {
  72. testonly = true
  73. sources = [
  74. "default_task_queue_factory_unittest.cc",
  75. ]
  76. deps = [
  77. ":default_task_queue_factory",
  78. ":task_queue_test",
  79. "../../test:test_support",
  80. ]
  81. }
  82. }