Menu
Woocommerce Menu

webrtc是谷歌收购并开源的一个支持实时音视频对话的技术,在互联网寻找许久编译好的Webrtc源码

0 Comment


  1. 直白想看webrtc的源码,苦于FQ技术轻便且整个编译进度耗费时间宏大,故求助于互连网。在互连网搜寻许久编写翻译好的Webrtc源码,多数本子下载下来总是报种种错误,非常消沉。
  2. 有志者事竟成,终于寻得风流倜傥版可用的Web兰德酷路泽tc源码。具体从哪个网站找的已经记不起来了,但是依然感激分享者。
  3. 共享给大家: 链接:
    密码: u37i
  4. 简言之说一下:共享文件中多个文件,第三个depot_tools解压缩,然后增添到蒙受变量。然后解压缩开端编写翻译webrtc代码
  5. 说下自身的编写翻译情形:vs二零一五
  6. 图片 1
  7. 图片 2

  8. 时间不早了,下一步要起来讨论源码了。伊始布置从PeerConnectionClient和server
    demo跑起。

预备干活

豆蔻梢头经不希图匡正webrtc相关源码,建议不要去折腾编译这么些源码工程。
直白援用已经编写翻译好的宗旨库(Maven也许Gradle):

认准官方门路:(只示例Gradle方式的)

compile 'org.webrtc:google-webrtc:1.0.+'   // + 可以换成对应版本号

连锁版本能够在
https://bintray.com/google/webrtc/google-webrtc
这里询问,那一个相应会反复创新。
PS:+替换的本子号应当要去地点网站里面查询是还是不是留存该版本。

有历史的民间渠道:

compile 'io.pristine:libjingle:11139@aar'

连锁版本能够在
http://mvnrepository.com/artifact/io.pristine/libjingle
进行查询,当初修正挺频仍,近年来两八年没更新了,权当个怀想吧。

编写翻译最新版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

上图哈:

图片 3

注:
1.depot_tools的使用参照他事他说加以考察:
2.webrtc官方源码小编copy到github上了:
3.webrtc编译好的整整项目自己传到百度云了: (注:由于刚先生压缩幸亏上传中,有10多G,请稍等,等上传完结后再下载State of Qatar

 

———————— 二零一六-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:\path\to\depot_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的源码下载并编写翻译好了,今后想要将webrtc源码的peerconnection摘出来,引用的库和含有目录全都设置了,现在编写翻译就剩这一个“平素不可用的参数包”错误了,不明了是如何来头,webrtc的源码编译是一贯不难点的

android

android 版本只扶持在 linux 编写翻译, 不能在 mac 蒙受中编译.

Release版本

由于webrtc是持续在master分支开辟的,所以我们一次开垦webrtc最棒基于稳固的release版本。
查找库上的release版本

git branch -r

下一场checkout到相应的release版本

git checkout -b my_branch branch-heads/66  #切换到M66版本
gclient sync  #同步对应版本的代码

问题1:
假若寻找不到相应的release版本,那或许是本地源码历史太久远了(2016-3-24在先的版本)
供给进行

gclient sync --with_branch_heads
git fetch origin

接下来查看 .git/config

fetch = +refs/branch-heads/*:refs/remotes/branch-heads/*

则解决难题。

问题2:
设若checkout了相比较早的版本,例如branch-heads/5* 版本
施行 gclient sync 会报联手错误
是因为 depot_tools 的源码太新,引致与webrtc源码不合作,能够将
depot_tools 工程恢复生机到与
webrtc目的release版本附近来期的工程源码来進展联合编写翻译。

图片 4

ios

// todo install

切换成支行:

git checkout -b local_branch branch_heads/$branch

gclient sync

./tools_webrtc/ios/build_ios_libs.sh

并发报错:

../../third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:1734:15: error: taking address of packed member 'time_entered' of class or structure 'sctp_state_cookie' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
                                                              &cookie->time_entered,
                                                               ^~~~~~~~~~~~~~~~~~~~
../../third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:2486:10: error: taking address of packed member 'time_entered' of class or structure 'sctp_state_cookie' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]

急需打个补丁,Pacth
[https://codereview.chromium.org/2833833002\]

cd build

patch -p2 -i /path/to/downloaded/issue2833833002_1.diff

其余部供给要依照不一样 xcode 版本 如 8.3.3 则扩大 xcode_version == “0833” 到
build/config/compiler/BUILD.gn 文件中( 搜索 xcode_version, 增加 || 条件
)

执行 ./tools_webrtc/ios/build_ios_libs.sh

提取 src/out_ios_libs/WebRTC.framework

种类构造

鉴于变化的gradle工程的源码实际不是投身叁个岗位,并且发散在webrtc各样文件夹中,能够将种种对应文件夹下的源码文件整合到一块儿。
java源码目录如下:

#android端demo工程源码
examples/androidapp/src  
#lib源码
modules/audio_device/android/java/src  
base/android/java/src  
rtc_base/java/src  
sdk/android/api 
sdk/android/src/java 
#so库,位于编译目录下
libjingle_peerconnection_so.so

PS:能够团结通过gradle文件的信任解析查看源码文件夹的引用路径。

切换分支代码

由于 master 分支更新度频仍, 不平价自己 patch 维护,
须要切换成钦点版本分支.

cd src
gclient sync --with_branch_heads
git fetch
git checkout -b local_branch branch_heads/$branch
gclient sync

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章

网站地图xml地图