2020-03-12 20:20:54 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_test")
|
2018-01-22 00:58:32 +08:00
|
|
|
load("//tools:no_undefined.bzl", "cc_library")
|
|
|
|
|
2022-01-13 20:31:14 +08:00
|
|
|
exports_files(
|
2018-01-18 23:14:50 +08:00
|
|
|
srcs = ["toxav.h"],
|
2018-01-22 00:58:32 +08:00
|
|
|
visibility = ["//c-toxcore:__pkg__"],
|
2018-01-18 23:14:50 +08:00
|
|
|
)
|
|
|
|
|
2022-01-13 20:31:14 +08:00
|
|
|
# Private library with the public API header in it because in toxav, lots of
|
|
|
|
# things depend on the public API header.
|
2018-01-18 23:14:50 +08:00
|
|
|
cc_library(
|
2022-01-13 20:31:14 +08:00
|
|
|
name = "public_api",
|
|
|
|
hdrs = ["toxav.h"],
|
2018-01-22 00:58:32 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "ring_buffer",
|
|
|
|
srcs = ["ring_buffer.c"],
|
|
|
|
hdrs = ["ring_buffer.h"],
|
2018-01-29 05:30:39 +08:00
|
|
|
deps = ["//c-toxcore/toxcore:ccompat"],
|
2018-01-22 00:58:32 +08:00
|
|
|
)
|
|
|
|
|
2018-07-04 02:14:36 +08:00
|
|
|
cc_test(
|
|
|
|
name = "ring_buffer_test",
|
2018-09-23 06:53:35 +08:00
|
|
|
size = "small",
|
2018-07-04 02:14:36 +08:00
|
|
|
srcs = ["ring_buffer_test.cc"],
|
|
|
|
deps = [
|
|
|
|
":ring_buffer",
|
2022-01-11 23:26:32 +08:00
|
|
|
"@com_google_googletest//:gtest",
|
2018-07-04 02:14:36 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-07-17 09:18:04 +08:00
|
|
|
cc_library(
|
|
|
|
name = "ring_buffer_srcs",
|
|
|
|
hdrs = [
|
|
|
|
"ring_buffer.c",
|
|
|
|
"ring_buffer.h",
|
|
|
|
],
|
|
|
|
visibility = ["//c-toxcore/testing:__pkg__"],
|
|
|
|
deps = ["//c-toxcore/toxcore:ccompat"],
|
|
|
|
)
|
|
|
|
|
2018-01-22 00:58:32 +08:00
|
|
|
cc_library(
|
|
|
|
name = "bwcontroller",
|
|
|
|
srcs = ["bwcontroller.c"],
|
|
|
|
hdrs = ["bwcontroller.h"],
|
|
|
|
deps = [
|
|
|
|
":ring_buffer",
|
2020-04-10 07:56:19 +08:00
|
|
|
"//c-toxcore/toxcore",
|
2018-01-22 00:58:32 +08:00
|
|
|
"//c-toxcore/toxcore:Messenger",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2023-08-11 04:57:50 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2018-01-22 00:58:32 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "rtp",
|
|
|
|
srcs = ["rtp.c"],
|
|
|
|
hdrs = ["rtp.h"],
|
2022-01-11 23:26:32 +08:00
|
|
|
deps = [
|
|
|
|
":bwcontroller",
|
|
|
|
"//c-toxcore/toxcore:Messenger",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2023-08-11 04:57:50 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2022-01-11 23:26:32 +08:00
|
|
|
],
|
2018-01-22 00:58:32 +08:00
|
|
|
)
|
|
|
|
|
2018-01-22 06:38:08 +08:00
|
|
|
cc_test(
|
|
|
|
name = "rtp_test",
|
2018-09-23 06:53:35 +08:00
|
|
|
size = "small",
|
2018-06-23 20:32:41 +08:00
|
|
|
srcs = ["rtp_test.cc"],
|
2018-01-22 06:38:08 +08:00
|
|
|
deps = [
|
|
|
|
":rtp",
|
|
|
|
"//c-toxcore/toxcore:crypto_core",
|
2022-01-11 23:26:32 +08:00
|
|
|
"@com_google_googletest//:gtest",
|
2018-01-20 05:59:42 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
2018-01-22 06:38:08 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-01-22 00:58:32 +08:00
|
|
|
cc_library(
|
|
|
|
name = "audio",
|
|
|
|
srcs = ["audio.c"],
|
|
|
|
hdrs = ["audio.h"],
|
|
|
|
deps = [
|
2022-01-13 20:31:14 +08:00
|
|
|
":public_api",
|
2018-01-22 00:58:32 +08:00
|
|
|
":rtp",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2023-08-11 04:57:50 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2018-01-22 00:58:32 +08:00
|
|
|
"@opus",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "video",
|
2018-01-18 23:14:50 +08:00
|
|
|
srcs = [
|
|
|
|
"msi.c",
|
|
|
|
"video.c",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"msi.h",
|
|
|
|
"video.h",
|
|
|
|
],
|
2018-01-22 00:58:32 +08:00
|
|
|
deps = [
|
|
|
|
":audio",
|
2022-01-13 20:31:14 +08:00
|
|
|
":public_api",
|
2022-01-11 23:26:32 +08:00
|
|
|
":ring_buffer",
|
|
|
|
":rtp",
|
2023-08-11 04:57:50 +08:00
|
|
|
"//c-toxcore/toxcore:Messenger",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2018-01-22 00:58:32 +08:00
|
|
|
"//c-toxcore/toxcore:network",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2018-01-22 00:58:32 +08:00
|
|
|
"@libvpx",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "groupav",
|
|
|
|
srcs = ["groupav.c"],
|
|
|
|
hdrs = ["groupav.h"],
|
|
|
|
deps = [
|
2018-08-16 05:31:40 +08:00
|
|
|
"//c-toxcore/toxcore",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2023-08-11 04:57:50 +08:00
|
|
|
"//c-toxcore/toxcore:group",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2022-03-28 05:34:12 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2018-01-22 00:58:32 +08:00
|
|
|
"@opus",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "toxav",
|
|
|
|
srcs = [
|
|
|
|
"toxav.c",
|
|
|
|
"toxav_old.c",
|
|
|
|
],
|
|
|
|
hdrs = [
|
|
|
|
"toxav.h",
|
2018-01-19 05:51:45 +08:00
|
|
|
],
|
2018-01-23 03:34:52 +08:00
|
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
2018-01-18 23:14:50 +08:00
|
|
|
deps = [
|
2018-01-22 00:58:32 +08:00
|
|
|
":groupav",
|
2022-01-11 23:26:32 +08:00
|
|
|
":rtp",
|
2018-01-22 00:58:32 +08:00
|
|
|
":video",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:Messenger",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2022-03-16 06:01:17 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:util",
|
2018-01-18 23:14:50 +08:00
|
|
|
],
|
|
|
|
)
|
2020-03-02 23:06:12 +08:00
|
|
|
|
2021-12-13 23:36:50 +08:00
|
|
|
sh_library(
|
|
|
|
name = "cimple_files",
|
2021-12-20 02:38:47 +08:00
|
|
|
srcs = glob([
|
|
|
|
"*.c",
|
|
|
|
"*.h",
|
|
|
|
]),
|
2021-12-13 23:36:50 +08:00
|
|
|
visibility = ["//c-toxcore/testing:__pkg__"],
|
2020-03-02 23:06:12 +08:00
|
|
|
)
|