您的位置:首页 > 运维架构 > Linux

LIVE555再学习 -- Linux 下编译

2017-09-14 10:19 183 查看

现在我们来看一下 LIVE555 在Linux下的编译

一、下载源码

下载:Index of /liveMedia/public参看:LIVE555 Streaming Media
选择下载 live555-latest.tar.gz

二、文件介绍

我的开发环境为 Ubuntu 12.04将上面下载的 live555-latest.tar.gz 解压tar -zxvf live555-latest.tar.gz



包括上述四个库和mediaServer服务器程序,以及其他的测试代码。这几个文件在官网是有介绍的:参看:live555 Description

三、配置编译

参看:How to configure and build the code on Unix
The source code package can be found (as a ".tar.gz" file) here. Use "tar -x" and "gunzip" (or "tar -xz", if available) to extract the package; then cd to the "live" directory. Then run
./genMakefiles <os-platform>
where <os-platform> is your target platform - e.g., "linux" or "solaris" - defined by a "config.<os-platform>" file. This will generate a Makefile in the "live" directory and each subdirectory. Then run "make".If the "make" fails, you may need to make small modifications to the appropriate "config.<os-platform>" file, and then re-run "genMakefiles <os-platform>". (E.g., you may need to add another "-I<dir>" flag to the COMPILE_OPTS definition.)
Some people (in particular, FreeBSD users) have reported that the GNU version of "make" - often called "gmake" - works better than their default, pre-installed version of "make". (In particular, you should try using "gmake" if you encounter linking problems with the "ar" command.)
If you're using "gcc" version 3.0 or greater: You may also wish to add the -Wno-deprecated flag to CPLUSPLUS_FLAGS.
If no "config.<os-platform>" file exists for your target platform, then try using one of the existing files as a template.
If you wish, you can also 'install' the headers, libraries, and applications by running "make install".翻译一下:解压 live555-latest.tar.gz tar -zxvf live555-latest.tar.gz进入 live 目录cd live然后执行./genMakefiles <os-platform>
其中<os-platform>是您的目标平台,例如由“config.<os-platform>”文件定义的“linux”或“solaris”。因此可知,应执行 ./genMakefiles linux


这将在“live”目录和每个子目录中生成一个Makefile。然后运行“make”。
如果“make”失败,您可能需要对相应的“config.<os-platform>”文件进行小修改,然后重新行“genMakefiles <os-platform>”。 (例如,您可能需要在COMPILE_OPTS定义中添加另一个“-I <dir>”标志。)
有些人(特别是FreeBSD用户)已经报告说,“make”的GNU版本(通常称为“gmake”)比默认的预装版本“make”更好。 (特别是,如果遇到与“ar”命令的连接问题,您应该尝试使用“gmake”。)
如果您使用的是“gcc”3.0或更高版本:您也可以将-Wno-deprecated标志添加到CPLUSPLUS_FLAGS。
如果您的目标平台没有“config.<os-platform>”文件,请尝试使用其中一个现有文件作为模板。
如果您愿意,还可以通过运行“make install”来安装头文件,库和应用程序。然后可以看到 mediaServer 目录下生成文件 live555MediaServer


四、测试

执行 live555MediaServer


然后找一个视频文件,放在和 live555MediaServer同一目录。注意视频格式,要是上面所支持的。然后打开 VLC,媒体->打开网络串流,输入网络URL。 rtsp://电脑IP地址/<filename>




五、源码下载

下载:linux 下 LIVE555 项目工程

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: