Skip to content

Commit

Permalink
Merge ce24020 into adb12d5
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jul 21, 2018
2 parents adb12d5 + ce24020 commit e789cf9
Show file tree
Hide file tree
Showing 50 changed files with 29,000 additions and 1,083 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ testing/data
*.so

# Misc (?)
m4/*
configure
configure_aux
!m4/pkg.m4
aclocal.m4
config.h*
config.log
config.status
Expand All @@ -62,7 +57,6 @@ libtool
.deps
.libs
.dirstamp
build/

#kdevelop
.kdev/
Expand All @@ -83,3 +77,4 @@ cscope.files

# rpm
tox.spec

32 changes: 30 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ if(BUILD_TOXAV)
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library VPX was not found.")
set(BUILD_TOXAV OFF)
endif()
if(NOT X264_FOUND)
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library X264 was not found.")
set(BUILD_TOXAV OFF)
endif()
if(NOT LIBAVCODEC_FOUND)
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library LIBAVCODEC was not found.")
set(BUILD_TOXAV OFF)
endif()
if(NOT LIBAVUTIL_FOUND)
message(${NO_TOXAV_ERROR_TYPE} "Option BUILD_TOXAV is enabled but required library LIBAVUTIL was not found.")
set(BUILD_TOXAV OFF)
endif()
endif()

################################################################################
Expand Down Expand Up @@ -258,10 +270,14 @@ set(toxcore_API_HEADERS ${toxcore_API_HEADERS} ${toxcore_SOURCE_DIR}/toxcore/tox
if(BUILD_TOXAV)
apidsl(toxav/toxav.api.h)
set(toxcore_SOURCES ${toxcore_SOURCES}
toxav/codecs/h264/codec.c
toxav/codecs/vpx/codec.c
toxav/audio.c
toxav/audio.h
toxav/bwcontroller.c
toxav/bwcontroller.h
toxav/dummy_ntp.c
toxav/dummy_ntp.h
toxav/groupav.c
toxav/groupav.h
toxav/msi.c
Expand All @@ -274,10 +290,22 @@ if(BUILD_TOXAV)
toxav/toxav.c
toxav/toxav.h
toxav/toxav_old.c
toxav/ts_buffer.c
toxav/ts_buffer.h
toxav/video.c
toxav/video.h)
set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES} ${OPUS_LIBRARIES} ${VPX_LIBRARIES})
set(toxcore_PKGCONFIG_REQUIRES ${toxcore_PKGCONFIG_REQUIRES} opus vpx)
set(toxcore_LINK_MODULES ${toxcore_LINK_MODULES}
${OPUS_LIBRARIES}
${VPX_LIBRARIES}
${X264_LIBRARIES}
${LIBAVCODEC_LIBRARIES}
${LIBAVUTIL_LIBRARIES})
set(toxcore_PKGCONFIG_REQUIRES ${toxcore_PKGCONFIG_REQUIRES}
opus
vpx
x264
libavcodec
libavutil)

set(toxcore_API_HEADERS ${toxcore_API_HEADERS} ${toxcore_SOURCE_DIR}/toxav/toxav.h^toxav)
endif()
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

**IRC Channels:** Users: [#tox@freenode](https://webchat.freenode.net/?channels=tox), Developers: [#toktok@freenode](https://webchat.freenode.net/?channels=toktok)


download latest astyle correction patch from CircleCI, [here](https://circleci.com/api/v1/project/zoff99/c-toxcore/latest/artifacts/0/$CIRCLE_ARTIFACTS/astyle_check.patch?filter=successful&branch=zoff99%2F_0.1.10_2017_video_fix_07a)


## What is Tox

Tox is a peer to peer (serverless) instant messenger aimed at making security
Expand Down
258 changes: 258 additions & 0 deletions __debug__/_compile_loop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
#! /bin/bash


cd # goto current users home directory



sudo apt-get update
sudo apt-get --yes --force-yes install git


# totally disable swap ---------------
sudo service dphys-swapfile stop
sudo systemctl disable dphys-swapfile
sudo apt-get --yes --force-yes purge dphys-swapfile
# totally disable swap ---------------

# ------------- install packages -------------
sudo apt-get --yes --force-yes install libjpeg-dev libpng-dev imagemagick htop mc fbset cmake qrencode
sudo apt-get --yes --force-yes install libqrencode-dev vim nano wget git make
sudo apt-get --yes --force-yes install autotools-dev libtool bc libv4l-dev libv4lconvert0 v4l-conf v4l-utils
sudo apt-get --yes --force-yes install libopus-dev libvpx-dev pkg-config libjpeg-dev libpulse-dev libconfig-dev
sudo apt-get --yes --force-yes install automake checkinstall check yasm
sudo apt-get --yes --force-yes install libao-dev libasound2-dev speedometer

sudo apt-get --yes --force-yes install imagemagick qrencode tor tor-arm
# ------------- install packages -------------



export CF2=" -O3 -g -marm -march=armv8-a+crc -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -ftree-vectorize "
export CF3=" -funsafe-math-optimizations "
export VV1=" VERBOSE=1 V=1 "

## ---- settings ----
## ---- settings ----
export FULL=1
export FASTER=0
## ---- settings ----
## ---- settings ----


export ASAN=0

export _HOME_=$(pwd)
echo $_HOME_


if [ "$FULL""x" == "1x" ]; then
# check out TBW aswell
cd $_HOME_
git clone https://github.com/zoff99/ToxBlinkenwall
fi

cd $_HOME_/ToxBlinkenwall/toxblinkenwall/

./initscript.sh stop

cat /dev/zero > /dev/fb0
sleep 1

export _SRC_=$_HOME_/src/
export _INST_=$_HOME_/inst/

mkdir -p $_SRC_
mkdir -p $_INST_

export LD_LIBRARY_PATH=$_INST_/lib/
export PKG_CONFIG_PATH=$_INST_/lib/pkgconfig







if [ "$FULL""x" == "1x" ]; then



cd $_SRC_
# rm -Rf libav
git clone https://github.com/libav/libav
cd libav
git checkout v12.3
./configure --prefix=$_INST_ --disable-devices --disable-programs \
--disable-doc --disable-avdevice --disable-avformat \
--disable-swscale \
--disable-avfilter --disable-network --disable-everything \
--disable-bzlib \
--disable-libxcb-shm \
--disable-libxcb-xfixes \
--enable-parser=h264 \
--enable-runtime-cpudetect \
--enable-omx-rpi --enable-mmal \
--enable-omx \
--enable-decoder=h264_mmal \
--enable-decoder=h264_vdpau \
--enable-vdpau \
--enable-gpl --enable-decoder=h264
make clean
make -j4
make install




cd $_SRC_
# rm -Rf x264
git clone git://git.videolan.org/x264.git
cd x264
git checkout stable
./configure --prefix=$_INST_ --disable-opencl --enable-shared --enable-static \
--disable-avs --disable-cli
make clean
make -j4
make install



cd $_SRC_
git clone --depth=1 --branch=1.0.13 https://github.com/jedisct1/libsodium.git
cd libsodium
make clean
./autogen.sh
export CFLAGS=" $CF2 "
./configure --prefix=$_INST_ --disable-shared --disable-soname-versions # --enable-minimal
make -j 4
make install


cd $_SRC_
git clone --depth=1 --branch=v1.7.0 https://github.com/webmproject/libvpx.git
cd libvpx
make clean
export CFLAGS=" $CF2 $CF3 "
export CXXLAGS=" $CF2 $CF3 "
./configure --prefix=$_INST_ --disable-examples \
--disable-unit-tests --enable-shared \
--size-limit=16384x16384 \
--enable-onthefly-bitpacking \
--enable-error-concealment \
--enable-runtime-cpu-detect \
--enable-multi-res-encoding \
--enable-postproc \
--enable-vp9-postproc \
--enable-temporal-denoising \
--enable-vp9-temporal-denoising

# --enable-better-hw-compatibility \

make -j 4
make install


cd $_SRC_
git clone --depth=1 --branch=v1.2.1 https://github.com/xiph/opus.git
cd opus
make clean
./autogen.sh
export CFLAGS=" $CF2 $CF3 "
export CXXLAGS=" $CF2 $CF3 "
./configure --prefix=$_INST_ --disable-shared
make -j 4
make install

fi



cd $_SRC_

if [ "$FULL""x" == "1x" ]; then
git clone https://github.com/zoff99/c-toxcore_team c-toxcore
cd c-toxcore
git checkout zoff99/toxcore_v1.0.10__toxav_h264_001
## ** ## git pull
else
cd c-toxcore
fi


export CFLAGS=" $CF2 -D_GNU_SOURCE -I$_INST_/include/ -O3 -g -fstack-protector-all "
export LDFLAGS=-L$_INST_/lib

if [ "$FASTER""x" == "0x" ]; then
./autogen.sh

./configure \
--prefix=$_INST_ \
--disable-soname-versions --disable-testing --disable-shared --enable-raspi
make clean
fi

make -j 4 && make install
res=$?


if [ $res -eq 0 ]; then

cd $_HOME_/ToxBlinkenwall/toxblinkenwall/

_OO_=" -g "

if [ "$ASAN""x" == "1x" ]; then
CF2="$CF2 -fsanitize=address"
LL1="" # "-lasan" # "-static-libasan"
_OO_=" -g "
fi

gcc $_OO_ \
-DRASPBERRY_PI -DOMX_SKIP64BIT -DUSE_VCHIQ_ARM \
-I/opt/vc/include -I/opt/vc/interface/vmcs_host/linux -I/opt/vc/interface/vcos/pthreads \
$CF2 $CF3 \
$LL1 \
-fstack-protector-all \
-Wno-unused-variable \
-fPIC -export-dynamic -I$_INST_/include -o toxblinkenwall -lm \
toxblinkenwall.c openGL/esUtil.c openGL/esShader.c rb.c \
-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads \
-I/opt/vc/include/interface/vmcs_host/linux -lbrcmEGL -lbrcmGLESv2 \
-lbcm_host -L/opt/vc/lib \
-std=gnu99 \
-L$_INST_/lib \
$_INST_/lib/libtoxcore.a \
$_INST_/lib/libtoxav.a \
-lrt \
$_INST_/lib/libopus.a \
$_INST_/lib/libvpx.a \
$_INST_/lib/libx264.a \
$_INST_/lib/libavcodec.a \
$_INST_/lib/libavutil.a \
$_INST_/lib/libsodium.a \
-lasound \
-lpthread -lv4lconvert \
-lmmal -lmmal_core -lmmal_vc_client -lmmal_components -lmmal_util \
-L/opt/vc/lib -lbcm_host -lvcos -lopenmaxil

res2=$?

cd $_HOME_

if [ $res2 -eq 0 ]; then
$_HOME_/ToxBlinkenwall/toxblinkenwall/initscript.sh start
else
echo "ERROR !!"
# cat /dev/urandom > /dev/fb0
$_HOME_/fill_fb.sh "1 1 1 1 1"
fi

else
echo "ERROR !!"
cat /dev/urandom > /dev/fb0
fi


rm -f $_HOME_/compile_me.txt

Loading

0 comments on commit e789cf9

Please sign in to comment.