Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle refactor: Make ToxAV independent of toxcore internals. #1512

Closed
wants to merge 46 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
ca22a58
make ToxAV independent of toxcore internals.
zoff99 Apr 16, 2020
f471624
format with astyle and run apidsl.
zoff99 Apr 16, 2020
cc0bc50
fix logging in ToxAV.
zoff99 Apr 17, 2020
f8cdf4b
astyle formatting.
zoff99 Apr 17, 2020
bbec6ae
changes requested by review.
zoff99 Apr 17, 2020
525197d
fix unused var warning.
zoff99 Apr 18, 2020
51e73f3
fix clang sanitizer error.
zoff99 Apr 18, 2020
cb32e4c
add fixes from review.
zoff99 Apr 19, 2020
6ad54d4
turn "switch" into "if".
zoff99 Apr 19, 2020
7cce759
fix more toktok style errors.
zoff99 Apr 19, 2020
f6a589e
put more function defs into toxav_hacks.h.
zoff99 Apr 19, 2020
4c85cf3
make function static.
zoff99 Apr 19, 2020
52b8e14
make function static.
zoff99 Apr 19, 2020
8dbcf79
include missing toxav_hacks header.
zoff99 Apr 19, 2020
c11d5e4
fix some definitions.
zoff99 Apr 19, 2020
665b993
fix bazel config.
zoff99 Apr 19, 2020
f5053ce
fix bazel.
zoff99 Apr 19, 2020
dce93f5
fixes requested by review.
zoff99 May 1, 2020
3c276e7
fix more toktok style errors.
zoff99 May 1, 2020
22d5854
sort includes
zoff99 May 1, 2020
81efe1c
Fix a bug in savedata loading when malloc fails.
iphydf May 3, 2020
78d4a13
Merge branch 'master' into zoff99/toxav_public_api_part_009_big_change
iphydf May 3, 2020
f6aab45
Merge the whole toxav library into one.
iphydf May 3, 2020
4d14ddd
Merge branch 'mallocfail' into zoff99/toxav_public_api_part_009_big_c…
iphydf May 3, 2020
62f930e
Ignore api headers for restyler
iphydf May 3, 2020
e339330
new toktok stack
iphydf May 3, 2020
4b79c5c
remove newline char from logtexts.
zoff99 May 3, 2020
5f6131e
assign value straight away.
zoff99 May 3, 2020
d05dc04
log errors.
zoff99 May 3, 2020
13a4f8c
define type.
zoff99 May 3, 2020
652b2ac
remove undef.
zoff99 May 3, 2020
4e51f81
remove undef.
zoff99 May 3, 2020
2c84fa3
use ToxAVCall instead of void.
zoff99 May 3, 2020
f185306
sync with define.
zoff99 May 3, 2020
e533f4c
assign value right away.
zoff99 May 3, 2020
0718cf7
Merge branch 'master' into zoff99/toxav_public_api_part_009_big_change
iphydf May 3, 2020
053060d
Merge branch 'zoff99/toxav_public_api_part_009_big_change' of https:/…
zoff99 May 3, 2020
0734988
apply fixes.
zoff99 May 3, 2020
92d76d6
remove linefeeds from logtext.
zoff99 May 3, 2020
7517ce5
make function static.
zoff99 May 3, 2020
275b753
add void in function definition.
zoff99 May 3, 2020
d639396
fix logger.c and logger.h and remove debug stuff.
zoff99 May 3, 2020
62c44ff
fixes
iphydf May 5, 2020
280484c
apply fixes.
zoff99 May 5, 2020
154c263
Restyled by shellharden
restyled-commits May 5, 2020
d7f34ee
Restyled by shfmt
restyled-commits May 5, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ cirrus-ci_task:
configure_script:
- /src/workspace/tools/inject-repo c-toxcore
test_all_script:
- bazel test -k
- TEST="bazel test -k
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_download_minimal
--config=ci
--config=release
//c-toxcore/...
//c-toxcore/..."
- $TEST || $TEST || $TEST || $TEST
3 changes: 3 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
---
exclude:
- "**/*.api.h"

restylers:
- astyle:
arguments: ["--options=other/astyle/astylerc"]
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ if(BUILD_TOXAV)
toxav/rtp.h
toxav/toxav.c
toxav/toxav.h
toxav/toxav_hacks.h
toxav/toxav_old.c
toxav/video.c
toxav/video.h)
Expand Down
41 changes: 21 additions & 20 deletions other/analysis/run-clang
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
. other/analysis/gen-file.sh

echo "Running Clang compiler"
clang++ -o /dev/null amalgamation.cc \
$CPPFLAGS \
$LDFLAGS \
-std=c++11 \
-Werror \
-Weverything \
-Wno-c++98-compat-pedantic \
-Wno-c99-extensions \
-Wno-cast-align \
-Wno-conversion \
-Wno-covered-switch-default \
-Wno-disabled-macro-expansion \
-Wno-documentation-deprecated-sync \
-Wno-missing-field-initializers \
-Wno-old-style-cast \
-Wno-padded \
-Wno-sign-compare \
-Wno-unreachable-code-return \
-Wno-unused-parameter \
-Wno-used-but-marked-unused \
clang++ -o /dev/null amalgamation.cc \
"$CPPFLAGS" \
"$LDFLAGS" \
-std=c++11 \
-Werror \
-Weverything \
-Wno-c++98-compat-pedantic \
-Wno-c99-extensions \
-Wno-cast-align \
-Wno-conversion \
-Wno-covered-switch-default \
-Wno-disabled-macro-expansion \
-Wno-documentation-deprecated-sync \
-Wno-missing-field-initializers \
-Wno-old-style-cast \
-Wno-padded \
-Wno-sign-compare \
-Wno-unreachable-code-return \
-Wno-unused-parameter \
-Wno-used-but-marked-unused \
-fdiagnostics-color=always
89 changes: 18 additions & 71 deletions toxav/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,99 +29,46 @@ cc_test(
],
)

cc_library(
name = "ring_buffer_srcs",
hdrs = [
"ring_buffer.c",
"ring_buffer.h",
],
visibility = ["//c-toxcore/testing:__pkg__"],
deps = ["//c-toxcore/toxcore:ccompat"],
)

cc_library(
name = "bwcontroller",
srcs = ["bwcontroller.c"],
hdrs = ["bwcontroller.h"],
deps = [
":ring_buffer",
"//c-toxcore/toxcore",
"//c-toxcore/toxcore:Messenger",
],
)

cc_library(
name = "rtp",
srcs = ["rtp.c"],
hdrs = ["rtp.h"],
deps = [":bwcontroller"],
)

cc_test(
name = "rtp_test",
size = "small",
srcs = ["rtp_test.cc"],
deps = [
":rtp",
":toxav",
"//c-toxcore/toxcore:crypto_core",
"@com_google_googletest//:gtest_main",
],
)

cc_library(
name = "audio",
srcs = ["audio.c"],
hdrs = ["audio.h"],
deps = [
":public",
":rtp",
"//c-toxcore/toxcore:network",
"@opus",
],
)

cc_library(
name = "video",
srcs = [
"msi.c",
"video.c",
],
hdrs = [
"msi.h",
"video.h",
],
deps = [
":audio",
":public",
"//c-toxcore/toxcore:network",
"@libvpx",
],
)

cc_library(
name = "groupav",
srcs = ["groupav.c"],
hdrs = ["groupav.h"],
deps = [
"//c-toxcore/toxcore",
"@opus",
],
)

cc_library(
name = "toxav",
srcs = [
"audio.c",
"bwcontroller.c",
"groupav.c",
"msi.c",
"rtp.c",
"toxav.c",
"toxav_old.c",
"video.c",
],
hdrs = [
"audio.h",
"bwcontroller.h",
"groupav.h",
"msi.h",
"rtp.h",
"toxav.api.h",
"toxav.h",
"toxav_hacks.h",
"video.h",
],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
":groupav",
":video",
":ring_buffer",
"//c-toxcore/toxcore",
"@libvpx",
"@opus",
],
)

Expand Down
1 change: 1 addition & 0 deletions toxav/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ libtoxav_la_SOURCES = ../toxav/rtp.h \
../toxav/ring_buffer.h \
../toxav/ring_buffer.c \
../toxav/toxav.h \
../toxav/toxav_hacks.h \
../toxav/toxav.c \
../toxav/toxav_old.c

Expand Down
Loading