【www.301.net】Webrtc 研商(风姿罗曼蒂克): Android编写翻译

www.301.net 3
  1. 直接想看webrtc的源码,苦于FQ技能有限且全体编写翻译进程耗时庞大,故求助于互连网。在互连网搜索许久编译好的Webrtc源码,繁多本子下载下来总是报种种不当,万分颓败。
  2. 皇天不辜负有心人,终于寻得黄金时代版可用的WebCRUISERtc源码。具体从哪些网址找的已经记不起来了,然而依然感激分享者。
  3. 分享给我们: 链接:
    密码: u37i
  4. 大约说一下:分享文件中几个文件,第三个depot_tools解压缩,然后增加到意况变量。然后解压缩起头编写翻译webrtc代码
  5. 说下自家的编写翻译情形:vs2016
  6. www.301.net 1
  7. www.301.net 2

  8. 时间不早了,下一步要最早探究源码了。初始布署从PeerConnectionClient和server
    demo跑起。

源码下载

若是想修改源码,恭喜你,你须求团结编写翻译源码。
webrtc编写翻译谈到来,编写翻译既费劲又容易;困难在源码规模太大,本国同步代码频仍出难点,简单在于Google早就将混乱的编写翻译过程整合成简单明了的编写翻译脚本命令。
强调一点:下边包车型客车编译操作是基于Linux遇到。

意气风发、安装编写翻译重视意况
webrtc的编译景况信赖于Google的编写翻译情形,也正是 depot_tools。
很简单,就三个clone源码到地头

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git

此地必要安装意况变量

export PATH=$PATH:/path/depot_tools  #在当前环境变量追加路径

注意:path是你depot_tools文件夹所在的地址,需求替换为科学的门径。

测量试验情形变量是不是布署成功:

which gn 或者 which gclient  #which指令会在环境变量设置的目录里查找执行文件

例如出口了前头配置的depot_tools文件夹地址,则是构形成功!

官方网站参照他事他说加以考察:http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up

二、下载项目源码

1、盘算干活
钦定多少个职位寄放webrtc源码,特别供给介意的是当下硬盘存款和储蓄空间须求不菲于20GB。

mkdir webrtc
cd webrtc

2、代码同步

fetch --nohooks webrtc_android
gclient sync

以此大致会15-20GB的公文必要下载(版本持续迭代),同步速度决定于你的VPN给不给力。
3、注重情况陈设(编写翻译意况只供给举行二回)

cd src
./build/install-build-deps.sh

当源码下载康健后,推行境遇安插脚本,会帮您检验并设置编写翻译所须要的重视库和工具。

编写翻译最新版webrtc源码和编写翻译好的所有事项目10多少个G【分享】

 

参考编写翻译最新版webrtc源码:

Git clone 

gclient
config  –name=src

set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION=2015
set GYP_GENERATORS=ninja,msvs-ninja
gclient sync
cd src
Python webrtc/build/gyp_webrtc.py

上图哈:

www.301.net 3

注:
1.depot_tools的行使仿效:
2.webrtc官方源码笔者copy到github上了:
3.webrtc编写翻译好的上上下下项目自己传到百度云了: (注:由于刚先生压缩幸好上传中,有10多G,请稍等,等上传实现后再下载卡塔尔国

 

———————— 2014-9-29进入安装depot_tools表明(深蓝字体:python和其他工具会在运营gclinet时自身下载安装卡塔尔国 —————————————–

Install depot_tools

Chromium and Chromium OS use a package of scripts called depot_tools to manage checkouts and code reviews.  
The depot_tools package includes gclientgclgit-clrepo, and others.

Installing on Linux and Mac

  1. Confirm git and python are installed. git 2.2.1+ recommended. python 2.7+ recommended.
  2. Fetch depot_tools: 
    $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
  3. Add depot_tools to your PATH:
    $ export PATH=`pwd`/depot_tools:"$PATH"

    • Yes, you want to put depot_tools ahead of everything else, otherwise gcl will refer to the GNU Common Lisp compiler.
    • You may want to add this to your .bashrc file or your shell’s equivalent so that you don’t need to reset your $PATH manually each time you open a new shell.

Installing on Windows

Preamble

Chromium is mostly designed to be run using the native Windows tools and the Msys (Git for Windows) toolchain. Cygwin is not recommended, and likely things will fail in cryptic ways.

Instructions

  1. Download depot_tools.zip and decompress it.
  • Do not use drag-n-drop or copy-n-paste extract from Explorer, this will not extract the hidden ".git" folder which is necessary for depot_tools to autoupdate itself. You can use "Extract all…" from the context menu though.
  • Do not extract to a path containing spaces. If you do, gclient will produce the error "update_depot_tools.bat was not expected at this time" or similar.

Add depot_tools to the start (not end!) of your PATH:
With Administrator access:

  • Control Panel > System and Security > System > Advanced system settings
  • Modify the PATH system variable to include depot_tools

Without Administrator access:

  • Control Panel > User Accounts > User Accounts > Change my environment variables
  • Add a PATH user variable: C:pathtodepot_tools;%PATH%

Run gclient from the cmd shell. The first time it is run, it will install its own copy of various tools. If you run gclient from a non-cmd shell, it may appear to run properly, but python, and other tools may not get installed correctly (while it should work fine from a msys bash shell, you may still trip over bugs from time to time).

  • If you see strange errors with the file system on the first run of gclient, you may want to disable Windows Indexing.
  • If you see errors like "The system cannot execute the specified program", try installing "Microsoft Visual C++ 2008 Redistributable Package".
  • If it complains that it can’t find python, make sure you don’t already have a .gclient file in the same directory.
  • After running gclient open a command prompt and type where python and confirm that the depot_tools python.bat comes ahead of any copies of python.exe. Failing to ensure this can lead to overbuilding when using gn – see crbug.com/611087

See also Howto: depot tools

————————2016-9-29加入安装depot_tools说明—————————————–

获取源码

前言

webrtc是Google收购并开源的三个扶助实时音录像对话的技能。
官网是:https://webrtc.org

OK,介绍就这么多。

android 编译

本着 armv7, armv8, x86, x64 都急需再一次编写翻译下

gn gen out/Default --args='target_os="android" target_cpu="arm64"'
ninja -C out/Default

本子编写翻译

生龙活虎、编写翻译参数钦赐

gn gen out/build --args='target_os="android" target_cpu="arm" is_debug=false'

out/build : 编写翻译生成文件的目录,随便钦命
target_os : 编写翻译目的平台 android ios 等
target_cpu : CPU结构平台 arm arm64 x86 x64等
is_debug : Release情势大概Debug情势

二、实践编写翻译
由于是全量编写翻译,所以时间有些有一点点长,看机器品质。

ninja -C out/build

生成Gradle项目文件

build/android/gradle/generate_gradle.py --output-directory $PWD/out/build 
--target "//examples:AppRTCMobile" --use-gradle-process-resources 
--split-projects --canary

施行达成,能够在out/build/目录下会变动多个gradle的文件夹,使用Android
studio该gradle目录就能够运营demo工程。

收获源码

开创源码目录 webrtc, fetch 实践之后就要 webrtc 目录中成立 src 目录, 而
src/webrtc 才是当真源码所在. 源码目录测度在 8G 左右大小.

mkdir webrtc && cd webrtc
linux : fetch --nohooks webrtc
android: fetch --nohooks webrtc_android
ios: fetch --nohooks webrtc_ios
gclient sync

相关文章

You can leave a response, or trackback from your own site.

Leave a Reply

网站地图xml地图