博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
crtmpserver 在VS2010下的build
阅读量:5330 次
发布时间:2019-06-14

本文共 2908 字,大约阅读时间需要 9 分钟。

Make sure that you have administrative privileges before doing the following steps.


1. 下载并安装(Microsoft Visual C++ 2008 Redistributable Package)

链接:
http://www.microsoft.com/en-us/download/details.aspx?id=29


下载并安装

Download and install “Visual C++ 2008 Redistributables”

2. 下载并安装OpenSSL

链接:
http://slproweb.com/products/Win32OpenSSL.html


下载并安装:Win32 OpenSSL v1.0.1e 

If you install OpenSSL to another place than “C:\OpenSSL-Win32”, 

change OpenSSL include and lib path (in project's properties)

Compile the solution using Microsoft Visual C++.



3. 下载并编译crtmpserver

可以使用TortoiseSVN下载,配置如下:

URL of repository:  https://svn.rtmpd.com/crtmpserver/branches/1.0

Checkout directory: <Your desired checkout folder>

Checkout Depth: Fully recursive

Revision: Head revision

Username: anonymous

Password: <Leave this blank>


下载完成后build

When source code has been checked out successfully, 

go to <checkout folder>/builders/VS2010 folder. 

Inside that folder, double click the VS2010.sln file.



4. 编译出错的解决:

A.  error C2593: 'operator =' is ambiguous

错误提示

crtmpserver\sources\thelib\src\protocols\liveflv\innetliveflvstream.cpp(111): error C2593: 'operator =' is ambiguous

...

crtmpserver\sources\thelib\src\protocols\liveflv\innetliveflvstream.cpp(114): error C2593: 'operator =' is ambiguous


原因:

VS2010在C++的隐式类型转换方面的bug



解决:

crtmpserver\sources\thelib\src\protocols\liveflv\innetliveflvstream.cpp由

info["audio"]["droppedPacketsCount"] = 0;

info["video"]["bytesCount"] = _videoBytesCount;

info["video"]["packetsCount"] = _videoPacketsCount;

info["video"]["droppedPacketsCount"] = 0;

改成

info["audio"]["droppedPacketsCount"] = (uint64_t)0;

info["video"]["bytesCount"] = _videoBytesCount;

info["video"]["packetsCount"] = _videoPacketsCount;

info["video"]["droppedPacketsCount"] = (uint64_t)0;

B.error LNK2019: unresolved external symbol "public: __thiscall

错误提示:

defaultprotocolfactory.obj : error LNK2019: unresolved external symbol "public: __thiscall NATTraversalProtocol::NATTraversalProtocol(void)"


原因:

thelib工程漏了这个文件:

sources\thelib\src \protocols\rtp\nattraversalprotocol.cpp


解决:

将这个文件添加到工程的

thelib->protocols->Source Files->rtp下;

重新编译工程,链接通过,OK搞定


C. 启动程序时提示

"The procedure entry point WSASendMsg could not be located in the 

dynamic link library WS2_32.dll" 

原因:

是系统的原因


解决:

WSASendMsg requires Vista or Server 2008, assuming Windows 7 is also 

okay since it works on my tests.


具体可看链接:

https://groups.google.com/forum/?fromgroups#!searchin/c-rtmp-server/WSASendMsg|sort:relevance/c-rtmp-server/BeC4zB_wems/m6utIOP6fJAJ

附加:

5. VS2010 Debug调试问题

1.crtmpserver Debug运行时调用的applications路径为.\builders\VS2010\crtmpserver\applications,而工程中application编译输出路径在.\builders\VS2010\Debug目录,所以咱们可以将applications输出到.\builders\VS2010\crtmpserver\目录下,或者其他方式.

2.在.\builders\VS2010\crtmpserver\目录下建一个logs文件夹.

------------------------------------------------------------

本文转自,更多开源流媒体解决方案,请关注我们的微信:EasyDarwin 

转载于:https://www.cnblogs.com/babosa/p/5904715.html

你可能感兴趣的文章
arcgis api 4.x for js 结合 Echarts4 实现散点图效果(附源码下载)
查看>>
YTU 2625: B 构造函数和析构函数
查看>>
apache自带压力测试工具ab的使用及解析
查看>>
加固linux
查看>>
Hyper-V虚拟机上安装一个图形界面的Linux系统
查看>>
js千分位处理
查看>>
字符串类型的相互转换
查看>>
基础学习:C#中float的取值范围和精度
查看>>
web前端面试题2017
查看>>
【Crash Course Psychology】2. Research & Experimentation笔记
查看>>
关于 linux 的 limit 的设置
查看>>
MTK笔记
查看>>
ERROR: duplicate key value violates unique constraint "xxx"
查看>>
激活office 365 的启动文件
查看>>
无法根据中文查找
查看>>
[简讯]phpMyAdmin项目已迁移至GitHub
查看>>
转载 python多重继承C3算法
查看>>
【题解】 bzoj1597: [Usaco2008 Mar]土地购买 (动态规划+斜率优化)
查看>>
css文本溢出显示省略号
查看>>
git安装和简单配置
查看>>