Skip to content

Update README with guides for GCC evaluation and docker-free compilations #104

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@
target/
src/
.gclient_entries
.gclient_previous_sync_commits
*.log
outaudio*
outvideo*
26 changes: 26 additions & 0 deletions BandwidthEstimator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

class Estimator(object):
def __init__(self):
self.cnt = 0
self.bandwidths = [1e6, 2e6]

def report_states(self, stats: dict):
'''
stats is a dict with the following items
{
"send_time_ms": uint,
"arrival_time_ms": uint,
"payload_type": int,
"sequence_number": uint,
"ssrc": int,
"padding_length": uint,
"header_length": uint,
"payload_size": uint
}
'''
pass

def get_estimated_bandwidth(self)->int:
bandwidth = self.bandwidths[self.cnt % len(self.bandwidths)]
self.cnt += 1
return bandwidth
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,24 @@ all: init sync app release
init:
docker build dockers --build-arg UID=$(shell id -u) --build-arg GUID=$(shell id -g) -f $(build_dockerfile) -t $(compile_docker)

release:
docker build $(target_dir) -f $(release_dockerfile) -t $(release_docker)

sync:
docker run $(docker_flags) $(compile_docker) \
make docker-$@ \
output_dir=$(output_dir) \
gn_flags=$(gn_flags)

app: peerconnection_serverless

peerconnection_serverless:
app:
docker run $(docker_flags) $(compile_docker) \
make docker-$@ \
output_dir=$(output_dir) \
target_lib_dir=$(target_lib_dir) \
target_bin_dir=$(target_bin_dir) \
target_pylib_dir=$(target_pylib_dir)

release:
docker build $(target_dir) -f $(release_dockerfile) -t $(release_docker)


# Docker internal command

docker-sync:
Expand All @@ -49,9 +48,7 @@ docker-sync:
rm -rf src
gn gen $(output_dir) $(gn_flags)

docker-app: docker-peerconnection_serverless

docker-peerconnection_serverless:
docker-app:
ninja -C $(output_dir) peerconnection_serverless

mkdir -p $(target_lib_dir)
Expand Down
Loading