WebRTC官方下載編譯說明

https://webrtc.org/native-code/development/

趁著能訪問先備份一下.

_____________________________________________________________________

The currently supported platforms are Windows, Mac OS X, Linux, Android and iOS. See the?Android?and?iOS?pages for build instructions and example applications specific to these mobile platforms.

Before You Start

First, be sure to install the?prerequisite software.

Getting the Code

For desktop development:

Create a working directory, enter it, and run?fetch webrtc:

mkdir webrtc-checkout

cd webrtc-checkout

fetch--nohookswebrtc

gclient sync

NOTICE: During your first sync, you’ll have to accept the license agreement of the Google Play Services SDK.

The checkout size is large due the use of the Chromium build toolchain and many dependencies. Estimated size:

Linux: 6.4 GB.

Linux (with Android): 16 GB (of which ~8 GB is Android SDK+NDK images).

Mac (with iOS support): 5.6GB

Optionally you can specify how new branches should be tracked:

git config branch.autosetupmerge always

git config branch.autosetuprebase always

Alternatively, you can create new local branches like this (recommended):

cd src

git checkout master

git new-branch your-branch-name

See?Android?and?iOS?pages for separate instructions.

NOTICE:?if you get?Remote: Daily bandwidth rate limit exceeded for , make sure?you’re logged in. The quota is much larger for logged in users.

Updating the Code

Update your current branch with:

git checkout master

git pull origin master

gclient sync

git checkout my-branch

git merge master

Building

Ninja?is the default build system for all platforms.

See?Android?and?iOS?for build instructions specific to those platforms.

Generating Ninja project files

Ninja?project files are generated using?GN. They’re put in a directory of your choice, like?out/Debug?or?out/Release, but you can use any directory for keeping multiple configurations handy.

To generate project files using the defaults (Debug build), run (standing in the src/ directory of your checkout):

gn gen out/Default

To generate ninja project files for a Release build instead:

gn gen out/Default--args='is_debug=false'

To clean all build artifacts in a directory but leave the current GN configuration untouched (stored in the args.gn file), do:

gn clean out/Default

See the?GN?documentation for all available options. There are also more platform specific tips on the?Android?and?iOS?pages.

Compiling

When you have Ninja project files generated (see previous section), compile (standing in?src/) using:

For?Ninja?project files generated in?out/Default:

ninja-Cout/Default

Using Another Build System

Other build systems are?not supported?(and may fail), such as Visual Studio on Windows or Xcode on OSX. GN supports a hybrid approach of using?Ninja?for building, but Visual Studio/Xcode for editing and driving compilation.

To generate IDE project files, pass the?--ide?flag to the?GN?command. See the?GN reference?for more details on the supported IDEs.

Working with Release Branches

To see available release branches, run:

git branch-r

To create a local branch tracking a remote release branch (in this example, the 43 branch):

git checkout-bmy_branch refs/remotes/branch-heads/43

gclient sync

NOTICE: depot_tools are not tracked with your checkout, so it’s possible gclient sync will break on sufficiently old branches. In that case, you can try using an older depot_tools:

which gclient

# cd to depot_tools dir

# edit update_depot_tools; add an exit command at the top of the file

git log # find a hash close to the date when the branch happened

git checkout <hash>

cd~/dev/webrtc/src

gclient sync

# When done, go back to depot_tools, git reset --hard, run gclient again and

# verify the current branch becomes REMOTE:origin/master

The above is untested and unsupported, but it might help.

Commit log for the branch:?https://webrtc.googlesource.com/src/+log/branch-heads/43

To browse it:?https://webrtc.googlesource.com/src/+/branch-heads/43

For more details, read Chromium’s?Working with Branches?and?Working with Release Branches?pages.

Contributing Patches

Please see?Contributing Fixes?for information on how to run?git cl upload, getting your patch reviewed, and getting it submitted.

Chromium Committers

Many WebRTC committers are also Chromium committers. To make sure to use the right account for pushing commits to WebRTC, use the?user.email?Git config setting. The recommended way is to have the chromium.org account set globally as described at the?depot tools setup page?and then set?user.emaillocally for the WebRTC repos using (change to your webrtc.org address):

cd/path/to/webrtc/src

git config user.email yourname@webrtc.org

Example Applications

WebRTC contains several example applications, which can be found under?src/webrtc/examples?and?src/talk/examples. Higher level applications are listed first.

Peerconnection

Peerconnection consist of two applications using the?WebRTC Native APIs:

A server application, with target name?peerconnection_server

A client application, with target name?peerconnection_client?(not currently supported on Mac/Android)

The client application has simple voice and video capabilities. The server enables client applications to initiate a call between clients by managing signaling messages generated by the clients.

Setting up P2P calls between peerconnection_clients

Start?peerconnection_server. You should see the following message indicating that it is running:

Server listening on port 8888

Start any number of?peerconnection_clients?and connect them to the server. The client UI consists of a few parts:

Connecting to a server:?When the application is started you must specify which machine (by IP address) the server application is running on. Once that is done you can press?Connect?or the return button.

Select a peer:?Once successfully connected to a server, you can connect to a peer by double-clicking or select+press return on a peer’s name.

Video chat:?When a peer has been successfully connected to, a video chat will be displayed in full window.

Ending chat session:?Press?Esc. You will now be back to selecting a peer.

Ending connection:?Press?Esc?and you will now be able to select which server to connect to.

Testing peerconnection_server

Start an instance of?peerconnection_server?application.

Open?src/webrtc/examples/peerconnection/server/server_test.html?in your browser. Click?Connect. Observe that the?peerconnection_serverannounces your connection. Open one more tab using the same page. Connect it too (with a different name). It is now possible to exchange messages between the connected peers.

Call App

Target name?call?(currently disabled). An application that establishes a call using libjingle. Call uses xmpp (as opposed to SDP used by WebRTC) to allow you to login using your gmail account and make audio/video calls with your gmail friends. It is built on top of libjingle to provide this functionality.

Further, you can specify input and output RTP dump for voice and video. It provides two samples of input RTP dump:?voice.rtpdump?which contains a stream of single channel, 16Khz voice encoded with G722, and?video.rtpdump?which contains a 320x240 video encoded with H264 AVC at 30 frames per second. The provided samples will interoperate with Google Talk Video. If you use other input RTP dump, you may need to change the codecs in?call_main.cc?(lines 215-222).

Relay Server

Target name?relayserver. Relays traffic when a direct peer-to-peer connection can’t be established. Can be used with the call application above.

STUN Server

Target name?stunserver. Implements the STUN protocol for Session Traversal Utilities for NAT as documented in?RFC 5389.

TURN Server

Target name?turnserver. In active development to reach compatibility with?RFC 5766.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市步咪,隨后出現(xiàn)的幾起案子双戳,更是在濱河造成了極大的恐慌,老刑警劉巖蹋凝,帶你破解...
    沈念sama閱讀 218,640評論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異总棵,居然都是意外死亡鳍寂,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,254評論 3 395
  • 文/潘曉璐 我一進店門情龄,熙熙樓的掌柜王于貴愁眉苦臉地迎上來迄汛,“玉大人,你說我怎么就攤上這事骤视“鞍” “怎么了?”我有些...
    開封第一講書人閱讀 165,011評論 0 355
  • 文/不壞的土叔 我叫張陵专酗,是天一觀的道長睹逃。 經(jīng)常有香客問我,道長祷肯,這世上最難降的妖魔是什么沉填? 我笑而不...
    開封第一講書人閱讀 58,755評論 1 294
  • 正文 為了忘掉前任庆锦,我火速辦了婚禮茉继,結(jié)果婚禮上寺滚,老公的妹妹穿的比我還像新娘喻圃。我一直安慰自己,他們只是感情好橄碾,可當我...
    茶點故事閱讀 67,774評論 6 392
  • 文/花漫 我一把揭開白布卵沉。 她就那樣靜靜地躺著,像睡著了一般法牲。 火紅的嫁衣襯著肌膚如雪史汗。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,610評論 1 305
  • 那天拒垃,我揣著相機與錄音停撞,去河邊找鬼。 笑死悼瓮,一個胖子當著我的面吹牛戈毒,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播横堡,決...
    沈念sama閱讀 40,352評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼埋市,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了命贴?” 一聲冷哼從身側(cè)響起道宅,我...
    開封第一講書人閱讀 39,257評論 0 276
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎胸蛛,沒想到半個月后污茵,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,717評論 1 315
  • 正文 獨居荒郊野嶺守林人離奇死亡葬项,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,894評論 3 336
  • 正文 我和宋清朗相戀三年泞当,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片民珍。...
    茶點故事閱讀 40,021評論 1 350
  • 序言:一個原本活蹦亂跳的男人離奇死亡襟士,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出嚷量,到底是詐尸還是另有隱情敌蜂,我是刑警寧澤,帶...
    沈念sama閱讀 35,735評論 5 346
  • 正文 年R本政府宣布津肛,位于F島的核電站,受9級特大地震影響汗贫,放射性物質(zhì)發(fā)生泄漏身坐。R本人自食惡果不足惜秸脱,卻給世界環(huán)境...
    茶點故事閱讀 41,354評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望部蛇。 院中可真熱鬧摊唇,春花似錦、人聲如沸涯鲁。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,936評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽抹腿。三九已至岛请,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間警绩,已是汗流浹背崇败。 一陣腳步聲響...
    開封第一講書人閱讀 33,054評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留肩祥,地道東北人后室。 一個月前我還...
    沈念sama閱讀 48,224評論 3 371
  • 正文 我出身青樓,卻偏偏與公主長得像混狠,于是被迫代替她去往敵國和親岸霹。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 44,974評論 2 355

推薦閱讀更多精彩內(nèi)容