# Copyright (c) 2022 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("../../../webrtc.gni")

rtc_library("decode_time_percentile_filter") {
  sources = [
    "decode_time_percentile_filter.cc",
    "decode_time_percentile_filter.h",
  ]
  deps = [ "../../../rtc_base:rtc_numerics" ]
}

rtc_library("timing_module") {
  sources = [
    "timing.cc",
    "timing.h",
  ]
  deps = [
    ":decode_time_percentile_filter",
    "../../../api:sequence_checker",
    "../../../api/environment",
    "../../../api/units:time_delta",
    "../../../api/units:timestamp",
    "../../../api/video:video_frame",
    "../../../api/video:video_rtp_headers",
    "../../../api/video/timing:video_jitter_timing_interface",
    "../../../rtc_base:checks",
    "../../../rtc_base:logging",
    "../../../rtc_base:macromagic",
    "../../../rtc_base/synchronization:mutex",
    "../../../rtc_base/system:no_unique_address",
    "../../../video/timing:default_video_jitter_timing",
  ]
}

rtc_library("decode_time_percentile_filter_unittest") {
  testonly = true
  sources = [ "decode_time_percentile_filter_unittest.cc" ]
  deps = [
    ":decode_time_percentile_filter",
    "../../../test:test_support",
  ]
}

rtc_library("timing_unittest") {
  testonly = true
  sources = [ "timing_unittest.cc" ]
  deps = [
    ":timing_module",
    "../../../api/environment",
    "../../../api/units:data_size",
    "../../../api/units:frequency",
    "../../../api/units:time_delta",
    "../../../api/units:timestamp",
    "../../../api/video/timing:video_jitter_timing_interface",
    "../../../system_wrappers",
    "../../../test:create_test_environment",
    "../../../test:test_support",
  ]
}

rtc_library("timing_unittests") {
  testonly = true
  sources = []
  deps = [
    ":decode_time_percentile_filter_unittest",
    ":timing_unittest",
  ]
}
