chromium/chromecast/media/audio/capture_service/BUILD.gn

# Copyright 2019 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//chromecast/chromecast.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")

cast_source_set("common") {
  sources = [ "constants.h" ]
}

cast_source_set("packet_header") {
  sources = [ "packet_header.h" ]
}

cast_source_set("utils") {
  sources = [
    "message_parsing_utils.cc",
    "message_parsing_utils.h",
  ]

  public_deps = [ ":common" ]

  deps = [
    ":packet_header",
    "//base",
    "//media",
    "//net",
  ]
}

cast_source_set("receiver") {
  sources = [
    "capture_service_receiver.cc",
    "capture_service_receiver.h",
  ]

  public_deps = [ ":common" ]

  deps = [
    ":utils",
    "//base",
    "//chromecast/base",
    "//chromecast/media/audio/net:audio_socket_service",
    "//chromecast/net:small_message_socket",
    "//media",
    "//net",
  ]
}

cast_source_set("unittests") {
  testonly = true
  sources = [
    "capture_service_receiver_unittest.cc",
    "message_parsing_utils_unittest.cc",
  ]

  deps = [
    ":packet_header",
    ":receiver",
    ":utils",
    "//base",
    "//base/test:test_support",
    "//chromecast/media/audio:test_support",
    "//chromecast/net:test_support",
    "//net",
    "//testing/gtest",
  ]
}

fuzzer_test("message_parsing_fuzzer") {
  sources = [ "message_parsing_fuzzer.cc" ]
  deps = [
    ":utils",
    "//base",
  ]
}