Skip to content

Commit

Permalink
compile readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Jan 23, 2022
1 parent a16c147 commit e577794
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@
1. make clean && make
2. make RELEASE=1 (make release library, default debug)
3. make PLATFORM=arm-hisiv100nptl-linux (cross compile)

#### (编译说明)[compile.cn.md]
69 changes: 69 additions & 0 deletions compile.cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# 一、下载代码

```markdown
#主仓库
git clone https://github.com/ireader/media-server.git
#依赖仓库
git clone https://github.com/ireader/sdk.git
git clone https://github.com/ireader/avcodec.git
git clone https://github.com/ireader/3rd.git
```

请将上述仓库放在同一级目录下。为了行文方便,假设都放在src目录下。

# 二、**编译和运行**

## linux系统

推荐gcc 版本 >= 4.8

1、先分别在sdk目录和avcodec目录执行make,编译media-server的依赖库

```markdown
cd src/sdk
make clean && make
cd src/avcodec
make clean && make
```

2、在media-server目录下执行make

```markdown
cd src/media-server
make clean && make
```

3、运行,在media-server的test目录下集合了各种不同的使用demo

```markdown
cd src/media-server/test
make clean && make

#func name 为你想要测试的列子,具体的请查看test.cpp支持的测试用例或者直接./debug.linux/test查看输出支持的函数
./debug.linux/test -c <func name>
#rtsp server
eg: ./debug.linux/test -c rtsp_example
```

执行可能会报错 “error while loading shared libraries: [libaio.so](http://libaio.so/): cannot open shared object file: No such file or directory”

请执行 “export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../sdk/libaio/debug.linux”

4、make选项

1. make RELEASE=1 (make release library, default debug)
2. make PLATFORM=arm-hisiv100nptl-linux (cross compile)

## win系统

推荐visual stuido版本 >= 2015

直接打开media-server文件夹下的media-server.sln即可

## mac系统

直接打开media-server文件夹下的media-server.xcworkspace即可。


# 致谢:
文档作者:[Dw](https://github.com/Dw9)

0 comments on commit e577794

Please sign in to comment.