mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
beeb9b4335
* Moved PAIR to toxav, where it's used (but really this should die). * Replace most MIN calls with typed `min_*` calls. Didn't replace the ones where the desired semantics are unclear. Moved the MIN macro to the one place where it's still used. * Avoid assignments in `while` loops. Instead, factored out the loop body into a separate `bool`-returning function. * Use named types for callbacks (`_cb` types). * Avoid assignments in `if` conditions. * Removed `MAKE_REALLOC` and expanded its two calls. We can't have templates in C, and this fake templating is ugly and hard to analyse and debug (it expands on a single line). * Moved epoll system include to the .c file, out of the .h file. * Avoid assignments in expressions (`a = b = c;`). * Avoid multiple declarators per struct member declaration. * Fix naming inconsistencies. * Replace `net_to_host` macro with function.
137 lines
2.2 KiB
Python
137 lines
2.2 KiB
Python
load("//tools:no_undefined.bzl", "cc_library")
|
|
|
|
filegroup(
|
|
name = "public_headers",
|
|
srcs = ["toxav.h"],
|
|
visibility = ["//c-toxcore:__pkg__"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "public",
|
|
hdrs = [":public_headers"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "ring_buffer",
|
|
srcs = ["ring_buffer.c"],
|
|
hdrs = ["ring_buffer.h"],
|
|
deps = ["//c-toxcore/toxcore:ccompat"],
|
|
)
|
|
|
|
cc_test(
|
|
name = "ring_buffer_test",
|
|
srcs = ["ring_buffer_test.cc"],
|
|
deps = [
|
|
":ring_buffer",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "bwcontroller",
|
|
srcs = ["bwcontroller.c"],
|
|
hdrs = ["bwcontroller.h"],
|
|
deps = [
|
|
":ring_buffer",
|
|
"//c-toxcore/toxcore:Messenger",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "rtp",
|
|
srcs = ["rtp.c"],
|
|
hdrs = ["rtp.h"],
|
|
deps = [":bwcontroller"],
|
|
)
|
|
|
|
cc_test(
|
|
name = "rtp_test",
|
|
srcs = ["rtp_test.cc"],
|
|
deps = [
|
|
":rtp",
|
|
"//c-toxcore/toxcore:crypto_core",
|
|
"@com_google_googletest//:gtest_main",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "pair",
|
|
hdrs = ["pair.h"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "audio",
|
|
srcs = ["audio.c"],
|
|
hdrs = ["audio.h"],
|
|
deps = [
|
|
":pair",
|
|
":public",
|
|
":rtp",
|
|
"//c-toxcore/toxcore:network",
|
|
"@opus",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "video",
|
|
srcs = [
|
|
"msi.c",
|
|
"video.c",
|
|
],
|
|
hdrs = [
|
|
"msi.h",
|
|
"video.h",
|
|
],
|
|
deps = [
|
|
":audio",
|
|
":pair",
|
|
":public",
|
|
"//c-toxcore/toxcore:network",
|
|
"@libvpx",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "groupav",
|
|
srcs = ["groupav.c"],
|
|
hdrs = ["groupav.h"],
|
|
deps = [
|
|
"//c-toxcore/toxcore:group",
|
|
"@opus",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "toxav",
|
|
srcs = [
|
|
"toxav.c",
|
|
"toxav_old.c",
|
|
],
|
|
hdrs = [
|
|
"toxav.api.h",
|
|
"toxav.h",
|
|
],
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
|
deps = [
|
|
":groupav",
|
|
":video",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "monolith",
|
|
hdrs = glob([
|
|
"*.c",
|
|
"*.h",
|
|
]),
|
|
visibility = [
|
|
"//c-toxcore/other:__pkg__",
|
|
"//c-toxcore/testing:__pkg__",
|
|
],
|
|
deps = [
|
|
"//c-toxcore/toxcore:group",
|
|
"@libvpx",
|
|
"@opus",
|
|
],
|
|
)
|