mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-29 14:45:55 +08:00
Update README.md
This commit is contained in:
parent
1fcb0f6284
commit
63caabf4f1
@ -237,7 +237,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
- As server:
|
- As server:
|
||||||
```
|
```cpp
|
||||||
TcpServer::Ptr rtspSrv(new TcpServer());
|
TcpServer::Ptr rtspSrv(new TcpServer());
|
||||||
TcpServer::Ptr rtmpSrv(new TcpServer());
|
TcpServer::Ptr rtmpSrv(new TcpServer());
|
||||||
TcpServer::Ptr httpSrv(new TcpServer());
|
TcpServer::Ptr httpSrv(new TcpServer());
|
||||||
@ -250,7 +250,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
|
|||||||
```
|
```
|
||||||
|
|
||||||
- As player:
|
- As player:
|
||||||
```
|
```cpp
|
||||||
MediaPlayer::Ptr player(new MediaPlayer());
|
MediaPlayer::Ptr player(new MediaPlayer());
|
||||||
weak_ptr<MediaPlayer> weakPlayer = player;
|
weak_ptr<MediaPlayer> weakPlayer = player;
|
||||||
player->setOnPlayResult([weakPlayer](const SockException &ex) {
|
player->setOnPlayResult([weakPlayer](const SockException &ex) {
|
||||||
@ -279,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/");
|
player->play("rtsp://admin:jzan123456@192.168.0.122/");
|
||||||
```
|
```
|
||||||
- As proxy server:
|
- As proxy server:
|
||||||
```
|
```cpp
|
||||||
//support rtmp and rtsp url
|
//support rtmp and rtsp url
|
||||||
//just support H264+AAC
|
//just support H264+AAC
|
||||||
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
|
auto urlList = {"rtmp://live.hkstv.hk.lxdns.com/live/hks",
|
||||||
@ -294,7 +294,7 @@ It is recommended to compile on Ubuntu or MacOS,compiling on windows is cumber
|
|||||||
```
|
```
|
||||||
|
|
||||||
- As puser:
|
- As puser:
|
||||||
```
|
```cpp
|
||||||
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
|
PlayerProxy::Ptr player(new PlayerProxy("app","stream"));
|
||||||
player->play("rtmp://live.hkstv.hk.lxdns.com/live/hks");
|
player->play("rtmp://live.hkstv.hk.lxdns.com/live/hks");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user