Skip to content

Commit

Permalink
Release 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
JULIAN SPITTKA authored and lucendio committed Jun 7, 2021
1 parent c149729 commit 9f2024b
Show file tree
Hide file tree
Showing 41 changed files with 402 additions and 120 deletions.
16 changes: 16 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
ChangeLog for AVS -- latest on top!

==============================================================================
AVS Release 7.1

Date: April 29, 2021
GIT: https://github.com/wearezeta/avs/tree/release-7.1
Android: Android NDK r14b
iOS: iOS SDK 12.2
OSX: MacOS SDK 10.14
Linux: Ubuntu x86_64 18.04 (LTS)

Summary: - Include SSRC/CSRC in frame header
- Experimental: CBR always on for conference calls

Hotfixes: - Improvements to active speaker detection
- Android: Memory leak for video fixed

==============================================================================
AVS Release 7.0

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
# Master version number
#
VER_MAJOR := 7
VER_MINOR := 0
VER_MINOR := 1

ifeq ($(BUILD_NUMBER),)
VER_PATCH := local
Expand Down
7 changes: 6 additions & 1 deletion android/java/com/waz/avs/VideoRenderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,13 @@ else if (configsCount[0] > 0) {
}

private void destroyGL() {
if (mEgl != null)
if (mEgl != null) {
if (mEglSurface != null
&& mEglSurface != EGL10.EGL_NO_SURFACE) {
mEgl.eglDestroySurface(mEglDisplay, mEglSurface);
}
mEgl.eglDestroyContext(mEglDisplay, mEglContext);
}
mGl = null;
}

Expand Down
70 changes: 70 additions & 0 deletions contrib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#
# .gitignore
#

*.o
*.a
*.lo
*.la
*.pc
.*.swp
*.dep
*.deps
zcontrib.*.tar.bz2
build/*
.DS_Store
.dirstamp
config.log
config.h
config.status
stamp-h1
.libs

re/build*
re/libre.dylib
re/libre.so

rem/build*
rem/librem.dylib
rem/librem.so

ogg/Makefile.in
ogg/aclocal.m4
ogg/autom4te.cache/
ogg/compile
ogg/config.guess
ogg/config.h.in
ogg/config.sub
ogg/configure
ogg/depcomp
ogg/doc/Makefile.in
ogg/doc/libogg/Makefile.in
ogg/include/Makefile.in
ogg/include/ogg/Makefile.in
ogg/install-sh
ogg/ltmain.sh
ogg/missing
ogg/src/Makefile.in

opus/INSTALL
opus/Makefile.in
opus/aclocal.m4
opus/autom4te.cache/
opus/compile
opus/config.guess
opus/config.h.in
opus/config.sub
opus/configure
opus/depcomp
opus/doc/Makefile.in
opus/install-sh
opus/ltmain.sh
opus/m4/libtool.m4
opus/m4/ltoptions.m4
opus/m4/ltsugar.m4
opus/m4/ltversion.m4
opus/m4/lt~obsolete.m4
opus/missing
opus/package_version
opus/test-driver

2 changes: 1 addition & 1 deletion contrib/cryptobox-c
1 change: 1 addition & 0 deletions contrib/openssl
Submodule openssl added at e2e09d
2 changes: 1 addition & 1 deletion contrib/re
2 changes: 1 addition & 1 deletion contrib/rew
2 changes: 1 addition & 1 deletion contrib/sodium
Submodule sodium updated 352 files
1 change: 0 additions & 1 deletion docs/api/api_changes_5.1.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 5.1
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_5.2.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 5.2
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_5.3.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 5.3
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_5.6.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 5.6
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_6.0.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 6.0
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_6.2.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 6.2
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_6.6.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 6.6
=============================

Expand Down
1 change: 1 addition & 0 deletions docs/api/api_changes_6.7.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Changes introduced in AVS 6.7
=============================

Expand Down
1 change: 0 additions & 1 deletion docs/api/api_changes_7.0.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


Changes introduced in AVS 7.0
=============================

Expand Down
1 change: 1 addition & 0 deletions include/avs_conf_member.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ struct conf_member {

uint8_t audio_level;
uint8_t audio_level_smooth;
uint64_t last_ts;
};

int conf_member_alloc(struct conf_member **cmp,
Expand Down
1 change: 1 addition & 0 deletions include/avs_frame_encryptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ int frame_encryptor_set_keystore(struct frame_encryptor *enc,
struct keystore *keystore);

int frame_encryptor_encrypt(struct frame_encryptor *enc,
uint32_t ssrc,
const uint8_t *src,
size_t srcsz,
uint8_t *dst,
Expand Down
8 changes: 6 additions & 2 deletions include/avs_frame_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@
size_t frame_hdr_max_size(void);

size_t frame_hdr_write(uint8_t *buf,
size_t bsz,
uint64_t frame,
uint64_t key);
uint64_t key,
uint32_t csrc);

size_t frame_hdr_read(const uint8_t *buf,
size_t bsz,
uint64_t *frame,
uint64_t *key);
uint64_t *key,
uint32_t *csrc);

#endif // FRAME_HDR_H_

7 changes: 0 additions & 7 deletions mk/avs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
# For information on argument variables, see mk/target.mk.
#


#--- AVS Core Modules ---

AVS_MODULES += base
Expand Down Expand Up @@ -83,9 +82,7 @@ AVS_MODULES += icall
AVS_MODULES += iflow
AVS_MODULES += egcall
AVS_MODULES += audio_level
ifeq ($(ENABLE_CONFERENCE_CALLS),1)
AVS_MODULES += ccall
endif
AVS_MODULES += zapi
AVS_MODULES += ztime

Expand Down Expand Up @@ -172,10 +169,6 @@ ifeq ($(AVS_OS),android)
AVS_LIBS += $(CONTRIB_AND_IFADDRS_LIBS)
endif

ifeq ($(ENABLE_CONFERENCE_CALLS),1)
AVS_CPPFLAGS += -DENABLE_CONFERENCE_CALLS=1
endif

AVS_LIB_FILES += $(CONTRIB_LIBRE_LIB_FILES) \
$(CONTRIB_LIBREW_LIB_FILES) \
$(CONTRIB_SODIUM_LIB_FILES)
Expand Down
47 changes: 47 additions & 0 deletions scripts/get_webrtc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#! /usr/bin/env python3

import json
import os
import re
import subprocess
import sys

github_base = 'https://api.github.com/repos'
repo = 'wireapp/prebuilt-webrtc-binaries'
dest_dir = 'contrib/webrtc'

release = sys.argv[1]
token = os.environ.get('GITHUB_TOKEN')

print('Repo: {}'.format(repo))
print('Release: {}'.format(release))
#print('Token: {}'.format(token))

cmd = ['curl', '-X', 'GET', '-u', '{}:x-oauth-basic'.format(token),
'{}/{}/releases'.format(github_base, repo)]
releases = json.loads(subprocess.check_output(cmd))

if not isinstance(releases, list):
print('Error {}'.format(releases))
exit(-1)

if len(releases) < 1:
print('Couldnt find release {}'.format(release))
exit(-1)

found = None
for r in releases:
if r['tag_name'] == release:
found = r
break

if not found:
print('Couldnt find release {}'.format(release))
exit(-1)

print('Getting assets for {}'.format(release))
for a in found['assets']:
print(a['name'])
cmd = ['curl', '-L', '-u', '{}:x-oauth-basic'.format(token),
'-H', 'Accept: application/octet-stream', a['url'], '-o', '{}/{}'.format(dest_dir, a['name'])]
subprocess.check_output(cmd)
11 changes: 10 additions & 1 deletion src/ccall/ccall.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@

#endif

#define CCALL_CBR_ALWAYS_ON 1

struct join_elem {
struct ccall *ccall;
enum icall_call_type call_type;
Expand Down Expand Up @@ -882,6 +884,13 @@ static void ecall_setup_handler(struct icall *icall,
void *arg)
{
struct ccall *ccall = arg;
bool audio_cbr;

#ifdef CCALL_CBR_ALWAYS_ON
audio_cbr = true;
#else
audio_cbr = false;
#endif

(void)msg_time;
(void)icall; /* not really used, revise code below and use directly */
Expand All @@ -890,7 +899,7 @@ static void ecall_setup_handler(struct icall *icall,

ecall_answer(ccall->ecall,
ccall->call_type,
false);
audio_cbr);
}

static void ecall_setup_resp_handler(struct icall *icall, void *arg)
Expand Down
8 changes: 8 additions & 0 deletions src/ccall/mod.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
# mod.mk
#


AVS_SRCS += \
ccall/ccall.c

23 changes: 21 additions & 2 deletions src/conf_member/conf_member.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
#include <avs.h>
#include <avs_audio_level.h>

#define TIMEOUT_UPDATE 1000


static void cm_destructor(void *arg)
{
struct conf_member *cm = (struct conf_member *)arg;
Expand Down Expand Up @@ -164,12 +167,28 @@ struct conf_member *conf_member_find_by_ssrcv(struct list *membl,

void conf_member_set_audio_level(struct conf_member *cm, int level)
{
uint64_t now;
uint64_t tsdiff;

if (!cm)
return;

now = tmr_jiffies();
tsdiff = now - cm->last_ts;
if (tsdiff < TIMEOUT_UPDATE)
return;

cm->last_ts = now;
cm->audio_level = level > AUDIO_LEVEL_FLOOR ? level : 0;
if (level > AUDIO_LEVEL_FLOOR)
cm->audio_level_smooth = AUDIO_LEVEL_CEIL;
else if (cm->audio_level_smooth > 0)
cm->audio_level_smooth--;
else if (cm->audio_level_smooth > 0) {
/* we want to count down by the number of elapsed seconds */
uint64_t n = tsdiff / 1000;

if (n > (uint64_t)cm->audio_level_smooth)
cm->audio_level_smooth = 0;
else
cm->audio_level_smooth -= n;
}
}
Loading

0 comments on commit 9f2024b

Please sign in to comment.