-
Notifications
You must be signed in to change notification settings - Fork 76
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
Update to branch-head/58 and add ARM support. #61
Changes from all commits
0332a3c
cb8837d
2a99506
7f90cb5
9f2b8bc
ea7fd51
3ac4942
80d52ab
d986101
46f5c6f
720cbfd
e4d7c38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ DEPOT_TOOLS_DIR="$THIRD_PARTY_DIR/depot_tools" | |
OS=$(go env GOOS) | ||
ARCH=$(go env GOARCH) | ||
CONFIG="Release" | ||
COMMIT="f33698296719f956497d2dbff81b5080864a8804" # branch-heads/52 | ||
COMMIT="c279861207c5b15fc51069e96595782350e0ac12" # branch-heads/58 | ||
|
||
INCLUDE_DIR="$PROJECT_DIR/include" | ||
LIB_DIR="$PROJECT_DIR/lib" | ||
|
@@ -57,6 +57,13 @@ else | |
popd | ||
fi | ||
|
||
if [ "$ARCH" = "arm" ]; then | ||
echo "Manually fetching arm sysroot" | ||
pushd $WEBRTC_SRC || exit 1 | ||
./build/linux/sysroot_scripts/install-sysroot.py --arch=arm || exit 1 | ||
popd | ||
fi | ||
|
||
echo "Checking out latest tested / compatible version of webrtc ..." | ||
pushd $WEBRTC_SRC | ||
git checkout $COMMIT | ||
|
@@ -67,19 +74,15 @@ pushd $WEBRTC_SRC || exit 1 | |
rm -rf out/$CONFIG | ||
popd | ||
|
||
echo "Applying webrtc patches ..." | ||
pushd $WEBRTC_SRC || exit 1 | ||
for PATCH in build_at_webrtc_branch_heads_52.patch; do | ||
git apply --check ${PROJECT_DIR}/webrtc_patches/${PATCH} || exit 1 | ||
git am < ${PROJECT_DIR}/webrtc_patches/${PATCH} || exit 1 | ||
done | ||
popd | ||
|
||
echo "Building webrtc ..." | ||
pushd $WEBRTC_SRC | ||
export GYP_DEFINES="include_tests=0 include_examples=0" | ||
python webrtc/build/gyp_webrtc webrtc/api/api.gyp || exit 1 | ||
ninja -C out/$CONFIG || exit 1 | ||
if [ "$ARCH" = "arm" ]; then | ||
gn gen out/$CONFIG --args='target_os="linux" target_cpu="arm" is_debug=false' || exit 1 | ||
else | ||
gn gen out/$CONFIG --args='is_debug=false' || exit 1 | ||
fi | ||
ninja -C out/$CONFIG webrtc webrtc/test webrtc/pc:pc_test_utils || exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. s/fake_audio_device/pc_test_utils/ |
||
popd | ||
|
||
echo "Copying headers ..." | ||
|
@@ -92,15 +95,17 @@ do | |
done | ||
popd | ||
pushd $PROJECT_DIR || exit 1 | ||
git clean -fdx "$INCLUDE_DIR" | ||
git clean -fd "$INCLUDE_DIR" | ||
popd | ||
|
||
echo "Concatenating libraries ..." | ||
pushd $WEBRTC_SRC/out/$CONFIG | ||
if [ "$OS" = "darwin" ]; then | ||
ls *.a > filelist | ||
find . -name '*.o' > filelist | ||
libtool -static -o libwebrtc-magic.a -filelist filelist | ||
strip -S -x -o libwebrtc-magic.a libwebrtc-magic.a | ||
elif [ "$ARCH" = "arm" ]; then | ||
arm-linux-gnueabihf-ar crs libwebrtc-magic.a $(find . -name '*.o' -not -name '*.main.o') | ||
else | ||
ar crs libwebrtc-magic.a $(find . -name '*.o' -not -name '*.main.o') | ||
fi | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by a BSD-style license | ||
* that can be found in the LICENSE file in the root of the source | ||
* tree. An additional intellectual property rights grant can be found | ||
* in the file PATENTS. All contributing project authors may | ||
* be found in the AUTHORS file in the root of the source tree. | ||
*/ | ||
|
||
#ifndef WEBRTC_API_AUDIO_AUDIO_MIXER_H_ | ||
#define WEBRTC_API_AUDIO_AUDIO_MIXER_H_ | ||
|
||
#include <memory> | ||
|
||
#include "webrtc/base/refcount.h" | ||
#include "webrtc/modules/include/module_common_types.h" | ||
|
||
namespace webrtc { | ||
|
||
// WORK IN PROGRESS | ||
// This class is under development and is not yet intended for for use outside | ||
// of WebRtc/Libjingle. | ||
class AudioMixer : public rtc::RefCountInterface { | ||
public: | ||
// A callback class that all mixer participants must inherit from/implement. | ||
class Source { | ||
public: | ||
enum class AudioFrameInfo { | ||
kNormal, // The samples in audio_frame are valid and should be used. | ||
kMuted, // The samples in audio_frame should not be used, but | ||
// should be implicitly interpreted as zero. Other | ||
// fields in audio_frame may be read and should | ||
// contain meaningful values. | ||
kError, // The audio_frame will not be used. | ||
}; | ||
|
||
// Overwrites |audio_frame|. The data_ field is overwritten with | ||
// 10 ms of new audio (either 1 or 2 interleaved channels) at | ||
// |sample_rate_hz|. All fields in |audio_frame| must be updated. | ||
virtual AudioFrameInfo GetAudioFrameWithInfo(int sample_rate_hz, | ||
AudioFrame* audio_frame) = 0; | ||
|
||
// A way for a mixer implementation to distinguish participants. | ||
virtual int Ssrc() const = 0; | ||
|
||
// A way for this source to say that GetAudioFrameWithInfo called | ||
// with this sample rate or higher will not cause quality loss. | ||
virtual int PreferredSampleRate() const = 0; | ||
|
||
virtual ~Source() {} | ||
}; | ||
|
||
// Returns true if adding was successful. A source is never added | ||
// twice. Addition and removal can happen on different threads. | ||
virtual bool AddSource(Source* audio_source) = 0; | ||
|
||
// Removal is never attempted if a source has not been successfully | ||
// added to the mixer. | ||
virtual void RemoveSource(Source* audio_source) = 0; | ||
|
||
// Performs mixing by asking registered audio sources for audio. The | ||
// mixed result is placed in the provided AudioFrame. This method | ||
// will only be called from a single thread. The channels argument | ||
// specifies the number of channels of the mix result. The mixer | ||
// should mix at a rate that doesn't cause quality loss of the | ||
// sources' audio. The mixing rate is one of the rates listed in | ||
// AudioProcessing::NativeRate. All fields in | ||
// |audio_frame_for_mixing| must be updated. | ||
virtual void Mix(size_t number_of_channels, | ||
AudioFrame* audio_frame_for_mixing) = 0; | ||
|
||
protected: | ||
// Since the mixer is reference counted, the destructor may be | ||
// called from any thread. | ||
~AudioMixer() override {} | ||
}; | ||
} // namespace webrtc | ||
|
||
#endif // WEBRTC_API_AUDIO_AUDIO_MIXER_H_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was doing this manually necessary?
gclient sync
seems to do,There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah, sorry, nevermind. I see you're cross-compiling.