webrtc 编译运行官方文档http://www.webrtc.org/reference/getting-started
来源:互联网 发布:怎么样注册淘宝店铺 编辑:程序博客网 时间:2024/05/21 14:06
Before you start
First, be sure to install the prerequisite software.
The currently supported platforms are Windows, Mac OS X, and Linux.
Getting the code and building
Create a working directory, enter it, and run:
$ gclient config http://libjingle.googlecode.com/svn/trunk
$ gclient sync --force
If you instead want to get the latest trunk without the peerconnection and its sample client and server, use:
$ gclient config http://webrtc.googlecode.com/svn/trunk
If you're a committer, substitute https for http. On Windows, use gclient.bat instead (or prefix the commands by invoking python).
On Linux, ensure your dependencies are up to date, as described on the prerequisites page.
The sync will generate native build files for your environment using gyp (Linux: make, OS X: XCode, Windows: Visual Studio). This generation can also be forced manually:
$ gclient runhooks --force
On Windows, gyp will use the latest Visual Studio on your system by default. In order to specify a particular Visual Studio version, there are a few options. You can set an environment variable
GYP_MSVS_VERSION=<version>
before runhooks, or manually run the gyp command triggered by runhooks. From the trunk/ directory:$ build/gyp_chromium --depth=. -G msvs_version=<version> talk/libjingle_all.gyp
where <version> is, for example, 2008.
You should now be able to build the sample programs peerconnection_client (Windows and Linux only) and peerconnection_server (Windows, Linux, Mac).
Sample Application
The sample application creates a simple video chat client and server, using the WebRTC Native APIs.
How to Build
On Linux:
$ cd trunk
$ make peerconnection_server
$ make peerconnection_client
On Windows:
Use Visual Studio to open and build the trunk/talk/libjingle_all.sln solution file. This will build both
On Mac:
This will open XCode. You can build the
It is also possible to use regular Make to build. To do this, set the environment variable
How to Run
Use Visual Studio to open and build the trunk/talk/libjingle_all.sln solution file. This will build both
peerconnection_server.exe
and peerconnection_client.exe
.On Mac:
$ cd trunk
$ open talk/libjingle_all.xcodeproj/
This will open XCode. You can build the
peerconnection_server
target using XCode. Note that currently we don't have the peerconnection_client for Mac.It is also possible to use regular Make to build. To do this, set the environment variable
GYP_GENERATORS
to make
(in bash, type GYP_GENERATORS=make
) and then run gclient sync
. With this, you can for instance import the project into Eclipse as a makefile project and use that instead of XCode.How to Run
The resulting binaries appear in
xcodebuild/Debug/
on Mac, out/Debug/
on Linux and build/Debug/
on Windows. Once built, start the
peerconnection_server
application. This is a simple web server that's built to exchange signaling messages between instances of peerconnection_client
(Note: the client for Windows and Linux only).You can also use the test HTML page (trunk/talk/examples/peerconnection/server/server_test.html) to connect to the server and enable loopback when you've only got one instance of
peerconnection_client
running. Enabling loopback causes the client to set up a video/voice session with itself.When the server is running, you'll see a message indicating that it is running:
Server listening on port 8888
On Windows, Linux
Next, start
peerconnection_client
. This is a client application that uses the PeerConnection C++ API for setting up a video+voice session with a remote peer. The application uses the server to send signaling messages (messages generated by the API) between the peers.The UI of the application consists of these three parts:
- Connect to server. Here you specify the machine that is currently running the server. Hit "Connect" or press return.
- Select peer. When you've connected with the server, you'll see a list of other
peerconnection_client
instances (orserver_test.html
) that are currently connected. To connect with a peer, double click or select+press return. This will start the local capture components (mic+webcam) as well as exchange signaling messages with the peer via the server. You can verify this via the server console. - Video chat. When the signalling messages have been exchanged, the PeerConnection API creates channels for the voice and video streams and you will see the remote video in full window.
To end a chat session and go back to selecting a peer, press Esc. To disconnect from the server and go back to the initial UI, press Esc again.
On Mac, Linux
Open trunk/talk/examples/peerconnection/server/server_test.html
. Click connect. Observe that the peerconnection_server announces your connection. Now you can open one more tab with the page, connect that too (with a different name) and send messages between the peers.
Building for Android (on Linux)
1. Check out as usual:
gclient config https://webrtc.googlecode.com/svn/trunk
gclient sync
2. Generate makefiles:
source ./build/android/envsetup.sh
gclient runhooks
3. Build
make
4. Build WebRTCDemo
cd webrtc/video_engine/test/android/
ndk-build
ant debug install
gclient config https://webrtc.googlecode.com/svn/trunk
gclient sync
2. Generate makefiles:
source ./build/android/envsetup.sh
gclient runhooks
3. Build
make
4. Build WebRTCDemo
cd webrtc/video_engine/test/android/
ndk-build
ant debug install
- webrtc 编译运行官方文档http://www.webrtc.org/reference/getting-started
- Getting Started with WebRTC
- 《Getting Started with WebRTC》第一章 WebRTC介绍
- webrtc学习之旅Getting Started
- 《Getting Started with WebRTC》第二章 WebRTC技术介绍
- http://www.yunos.org/doc/getting-started.html
- webRTC Andriod 编译文档
- Webrtc IOS下载编译文档
- Android官方文档翻译 一 Getting Started
- JNI官方文档翻译2-Getting Started
- 组复制官方文档翻译(Getting Started)
- 官方标准版如何编译webrtc ( how to compile webrtc )
- 官方标准版如何编译webrtc ( how to compile webrtc )
- 官方标准版如何编译webrtc ( how to compile webrtc )
- WebRTC iOS编译错误 no mobile provisioning profile found for "org.webrtc.WebRTC".
- 编译WebRTC
- 编译WebRTC
- 编译WebRTC
- 国家德比
- Thrift使用指南 ---- 董的文章2
- ARM9学习笔记之——SDRAM实验
- Serfj中文参考手册(自学版)
- java反射1——反射源头
- webrtc 编译运行官方文档http://www.webrtc.org/reference/getting-started
- 使用Thrift RPC编写程序 ---- 董的文章3
- Android4.0 Toast显示问题分析
- 关于VB的感想
- 最长公共子序列(LCS)问题
- 为什么不能在WM_CREATE中绘制
- flex 个人总结
- java反射2——Class类实例化的三种方法
- hunnu 11082 The Minesweeper Game(BFS)