# Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS.  All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.

import("../../build/webrtc.gni")

source_set("bitrate_controller") {
  sources = [
    "bitrate_allocator.cc",
    "bitrate_controller_impl.cc",
    "bitrate_controller_impl.h",
    "include/bitrate_allocator.h",
    "include/bitrate_controller.h",
    "send_side_bandwidth_estimation.cc",
    "send_side_bandwidth_estimation.h",
    "send_time_history.cc",
    "send_time_history.h",
  ]

  if (is_win) {
    cflags = [
      # TODO(jschuh): Bug 1348: fix this warning.
      "/wd4267",  # size_t to int truncations
    ]
  }

  configs += [ "../..:common_config" ]
  public_configs = [ "../..:common_inherited_config" ]

  if (is_clang) {
    # Suppress warnings from Chrome's Clang plugins.
    # See http://code.google.com/p/webrtc/issues/detail?id=163 for details.
    configs -= [ "//build/config/clang:find_bad_constructs" ]
  }

  deps = [
    "../../system_wrappers",
  ]
}
