Commit a12a832e by xiongziliang

Merge remote-tracking branch 'origin/master'

parents 113b7842 64350a5b
......@@ -117,7 +117,12 @@
- Apple OSX(Darwin), both 32 and 64bits.
- All hardware with x86/x86_64/arm/mips cpu.
- Windows.
- **You must use git to clone the complete code. Do not download the source code by downloading zip package. Otherwise, the sub-module code will not be downloaded by default.**
- **You must use git to clone the complete code. Do not download the source code by downloading zip package. Otherwise, the sub-module code will not be downloaded by default.You can do it like this:**
```
git clone https://github.com/zlmediakit/ZLMediaKit.git
cd ZLMediaKit
git submodule update --init
```
......@@ -232,7 +237,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
## Usage
- As server:
```
```cpp
TcpServer::Ptr rtspSrv(new TcpServer());
TcpServer::Ptr rtmpSrv(new TcpServer());
TcpServer::Ptr httpSrv(new TcpServer());
......@@ -245,7 +250,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
```
- As player:
```
```cpp
MediaPlayer::Ptr player(new MediaPlayer());
weak_ptr<MediaPlayer> weakPlayer = player;
player->setOnPlayResult([weakPlayer](const SockException &ex) {
......@@ -274,7 +279,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
player->play("rtsp://admin:jzan123456@192.168.0.122/");
```
- As proxy server:
```
```cpp
//support rtmp and rtsp url
//just support H264+AAC
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
......@@ -289,7 +294,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
```
- As puser:
```
```cpp
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
player->play("rtmp://live.hkstv.hk.lxdns.com/live/hks");
......
......@@ -128,7 +128,12 @@
## 编译要求
- 编译器支持C++11,GCC4.8/Clang3.3/VC2015或以上
- cmake3.2或以上
- **必须使用git下载完整的代码,不要使用下载zip包的方式下载源码,否则子模块代码默认不下载!**
- **必须使用git下载完整的代码,不要使用下载zip包的方式下载源码,否则子模块代码默认不下载!你可以像以下这样操作:**
```
git clone https://github.com/zlmediakit/ZLMediaKit.git
cd ZLMediaKit
git submodule update --init
```
## 编译(Linux)
- 我的编译环境
......@@ -220,7 +225,7 @@
```
## 使用方法
- 作为服务器:
```
```cpp
TcpServer::Ptr rtspSrv(new TcpServer());
TcpServer::Ptr rtmpSrv(new TcpServer());
TcpServer::Ptr httpSrv(new TcpServer());
......@@ -233,7 +238,7 @@
```
- 作为播放器:
```
```cpp
MediaPlayer::Ptr player(new MediaPlayer());
weak_ptr<MediaPlayer> weakPlayer = player;
player->setOnPlayResult([weakPlayer](const SockException &ex) {
......@@ -262,7 +267,7 @@
player->play("rtsp://admin:jzan123456@192.168.0.122/");
```
- 作为代理服务器:
```
```cpp
//support rtmp and rtsp url
//just support H264+AAC
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
......@@ -286,7 +291,7 @@
```
- 作为推流客户端器:
```
```cpp
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
//拉一个流,生成一个RtmpMediaSource,源的名称是"app/stream"
//你也可以以其他方式生成RtmpMediaSource,比如说MP4文件(请研读MediaReader代码)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论