Thursday, September 10, 2015

WebRTC related

http://www.webrtc.org/architecture
http://w3c.github.io/webrtc-pc/



Implementations

https://www.webrtc-experiment.com

http://webrtc.github.io/samples/

https://dvcs.w3.org/hg/audio/raw-file/tip/streams/StreamProcessing.html
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html

Capture
http://www.html5rocks.com/en/tutorials/getusermedia/intro/

================
on Ubuntu
sudo apt-get install git
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=$PATH:/home/XXX/bin/depot_tools
add to ~/.bashrc

23GB source code!!!
================
http://www.webrtc.org/native-code/ios
http://ninjanetic.com/how-to-get-started-with-webrtc-and-ios-without-wasting-10-hours-of-your-life/
https://tech.appear.in/2015/05/25/Getting-started-with-WebRTC-on-iOS/
https://apprtc.appspot.com/

Get depot_tools
1
2
cd ~/bin
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

Add path to .bash_profile
1
export PATH=$PATH:~/bin/deport_tools

Fetch code
1
2
3
4
mkdir ~/webrtc
cd ~/webrtc
export GYP_DEFINES="OS=ios"
fetch webrtc_ios

================
build script
For armv7, target_arch=arm arm_verion=7
TODO: combine_libs x86_64

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
function build_iossim() {
  echo "-- building WebRTC for the iOS simulator"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=ia32"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_iossim"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_iossim/Release-iphonesimulator iossim AppRTCDemo
  popd
}
 
function build_iosdevice() {
  echo "-- building WebRTC for iOS 32 devices"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=arm arm_verion=7"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios32"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_ios32/Release-iphoneos AppRTCDemo
  popd
}

function build_iosdevice64() {
  echo "-- building WebRTC for iOS 64 devices"
  export GYP_GENERATORS="ninja"
  export GYP_DEFINES="build_with_libjingle=1 build_with_chromium=0 libjingle_objc=1 OS=ios target_arch=arm64"
  export GYP_GENERATOR_FLAGS="$GYP_GENERATOR_FLAGS output_dir=out_ios64"
  export GYP_CROSSCOMPILE=1
  pushd src
  gclient runhooks
  ninja -C out_ios64/Release-iphoneos AppRTCDemo
  popd
}
 
function combine_libs() {
  echo "-- combining libraries"
  libtool -static -o src/out_ios/Release-iphonesimulator/libWebRTC-sim.a src/out_ios/Release-iphonesimulator/*.a
  strip -S -x -o src/out_ios/Release-iphonesimulator/libWebRTC-sim-min.a -r src/out_ios/Release-iphonesimulator/libWebRTC-sim.a
  libtool -static -o src/out_ios/Release-iphoneos/libWebRTC-ios.a src/out_ios/Release-iphoneos/*.a
  strip -S -x -o src/out_ios/Release-iphoneos/libWebRTC-ios-min.a -r src/out_ios/Release-iphoneos/libWebRTC-ios.a
  lipo -create src/out_ios/Release-iphonesimulator/libWebRTC-sim-min.a src/out_ios/Release-iphoneos/libWebRTC-ios-min.a -output libWebRTC.a
  echo "The public headers are located in ./src/talk/app/webrtc/objc/public/*.h"
}
 
function build_all() {
  build_iossim && build_iosdevice32 && build_iosdevice64 && combine_libs
}
 
function run_simulator() {
  echo "-- running webrtc appdemo on iOS simulator"
  src/out_iossim/Release-iphonesimulator/iossim src/out_ios/Release-iphonesimulator/AppRTCDemo.app
}
 
function run_on_device32() {
  echo "-- launching on device"
  ideviceinstaller -i src/out_ios32/Release-iphoneos/AppRTCDemo.app
  echo "-- launch complete"
}
 
function run_on_device64() {
  echo "-- launching on device"
  ideviceinstaller -i src/out_ios64/Release-iphoneos/AppRTCDemo.app
  echo "-- launch complete"
}
 
# Run the function specified by the first parameter on the command line
$@

No comments:

Post a Comment