load("@rules_cc//cc:cc_library.bzl", "cc_library")

package(
    default_visibility = [
        "//visibility:public",
    ],
)

cc_library(
    name = "webrtc_config",
    hdrs = [
        "webrtc/experiments/registered_field_trials.h",
        "webrtc/modules/audio_processing/debug.pb.h",
    ],
    includes = [
        "webrtc",
    ],
)

# These headers are needed because the libwebrtc code includes certain
# header from these paths instead of the paths they're actually available at.
cc_library(
    name = "third_party",
    srcs = [
        "third_party/rnnoise/src/rnn_vad_weights.cc",
    ],
    hdrs = [
        "third_party/crc32c/src/include/crc32c/crc32c.h",
        "third_party/libaom/source/libaom/aom/aom_codec.h",
        "third_party/libaom/source/libaom/aom/aom_decoder.h",
        "third_party/libaom/source/libaom/aom/aom_encoder.h",
        "third_party/libaom/source/libaom/aom/aomcx.h",
        "third_party/libaom/source/libaom/aom/aomdx.h",
        "third_party/libevent/event.h",
        "third_party/libsrtp/crypto/include/auth.h",
        "third_party/libsrtp/crypto/include/crypto_types.h",
        "third_party/libsrtp/include/srtp.h",
        "third_party/libsrtp/include/srtp_priv.h",
        "third_party/opus/src/include/opus.h",
        "third_party/opus/src/include/opus_multistream.h",
        "third_party/pffft/src/pffft.h",
        "third_party/rnnoise/src/rnn_activations.h",
        "third_party/rnnoise/src/rnn_vad_weights.h",
    ],
    includes = ["."],
    linkopts = [
        "-lopus",
    ],
    deps = [
        "@crc32c",
        "@libevent//:event",
        "@libpffft",
        "@libsrtp2",
        "@libyuv",
    ],
)
