Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tonarino/webrtc-audio-processing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 797e5a8368b7c8854d7984a1de58200a005f2b42
Choose a base ref
..
head repository: tonarino/webrtc-audio-processing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 330f6fe09ad1f23f91b0db1b22f5fa87342cb5a7
Choose a head ref
Showing with 16 additions and 4 deletions.
  1. +5 −3 README.md
  2. +11 −1 webrtc-audio-processing-sys/build.rs
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -34,12 +34,14 @@ sudo pacman -S webrtc-audio-processing # Arch

### Build from source

The webrtc source code is included as a git submodule. Be sure to clone this repo with the `--recursive` flag, or pull the submodule with `git submodule update --init`.

Building from source and static linking can be enabled with the `bundled` feature flag. You need the following tools to build from source:

* `clang` or `gcc`
* `autotools`
* `libtoolize` (typically `glibtoolize` on MacOS)
* `pkg-config`
* `autotools` (MacOS: `brew install automake`, `brew install autoconf`)
* `libtoolize` (typically `glibtoolize` on MacOS: `brew install libtool`)
* `pkg-config` (MacOS: `brew install pkg-config`)

## Contributing

12 changes: 11 additions & 1 deletion webrtc-audio-processing-sys/build.rs
Original file line number Diff line number Diff line change
@@ -53,7 +53,8 @@ mod webrtc {
#[cfg(feature = "bundled")]
mod webrtc {
use super::*;
use std::process::Command;
use failure::bail;
use std::{path::Path, process::Command};

const BUNDLED_SOURCE_PATH: &str = "./webrtc-audio-processing";
const BUNDLED_SOURCE_PATH_ABSEIL: &str = "./abseil-cpp";
@@ -65,6 +66,15 @@ mod webrtc {
}

pub(super) fn build_if_necessary() -> Result<(), Error> {
if Path::new(BUNDLED_SOURCE_PATH).read_dir()?.next().is_none()
|| Path::new(BUNDLED_SOURCE_PATH_ABSEIL).read_dir()?.next().is_none()
{
eprintln!("The webrtc-audio-processing or abseil-cpp source directory is empty.");
eprintln!("See the crate README for installation instructions.");
eprintln!("Remember to clone the repo recursively if building from source.");
bail!("Aborting compilation because bundled source directory is empty.");
}

let build_dir = out_dir();
let install_dir = out_dir();