随笔分类 - ZLMedia
摘要:SRS流媒体简介 1.1 程序运行 1.1.1编译及运行 cd srs/trunk ./configure make ./objs/srs -c conf/srs.conf 1.1.2RTMP推、拉流 1.推流 Ffmpeg推流 e: cd e:\Demo\CGAvioRead\Debug ffmp
阅读全文
摘要:分析代码的准备1.1.编译及运行1.下载源码代码从git获取,如果没安装git,需要执行sudo apt-get install gitcd /opt#拉取项目代码git clone https://github.com/ZLMediaKit/ZLMediaKit.git#国内用户推荐从同步镜像网站
阅读全文
摘要:分析代码的准备1.1编译及运行1.编译完整的编译需要第三方库,可以查找相关内容,这里只是简单的修改代码后进行编译的步骤:cd /opt/ZLMediaKitmkdir buildcd buildcmake .. -DENABLE_WEBRTC=true -DOPENSSL_ROOT_DIR=/opt
阅读全文
摘要:《ZLToolKit源码学习笔记》(1)VS2019源码编译 《ZLToolKit源码学习笔记》(2)工具模块之日志功能分析 《ZLToolKit源码学习笔记》(3)工具模块之终端命令解析 《ZLToolKit源码学习笔记》(4)工具模块之消息广播器 《ZLToolKit源码学习笔记》(5)工具模块
阅读全文
摘要:将conf\config.ini中[rtsp ]directProxy=1。和AAC的流程基本相同。 还未搞明白直接代理和非直接代理在流程上有什么不同。 一.RtspSession::onRecv--RtspSession.cpp 从网络上得到一个包。对于H264包buf->data()[1]==0
阅读全文
摘要:将conf\config.ini中[rtsp ]directProxy=1。未搞明白直接代理和非直接代理在流程上有什么不同。 一.RtspSession::onRecv--RtspSession.cpp 从网络上得到一个包。对于ACC包buf->data()[1]==0x2。 b /opt/ZLMe
阅读全文
摘要:ZLMediaKit 服务器源码解读 RTSP推流拉流 ZLMediaKit中RTSP的创建过程
阅读全文
摘要:h264编码track的建立,从rtmp中sprop-parameter-sets中取出经过base64编码过后的sps和pps,经解码以后得到sps和pps,然后根据sps和pps建立track. 序列参数集(SPS)图像参数集(PPS) case CodecH264 : { //a=fmtp:9
阅读全文
摘要:ACC格式的建立,根据SDP中ftmp中的config建立,config为1408,代码如下: case CodecAAC : { string aac_cfg_str = FindField(track->_fmtp.data(), "config=", ";"); if (aac_cfg_str
阅读全文
摘要:class RtcpHeader { public: #if __BYTE_ORDER == __BIG_ENDIAN //版本号,固定为2 uint32_t version: 2; //padding,固定为0 uint32_t padding: 1; //reception report cou
阅读全文
摘要:与Sender Report相比,少了sender info。
阅读全文
摘要:class RtcpHeader { public: #if __BYTE_ORDER == __BIG_ENDIAN //版本号,固定为2 uint32_t version: 2; //padding,固定为0 uint32_t padding: 1; //reception report cou
阅读全文
摘要:推流数据开始前用record命令。回复的代码如下 void RtspSession::handleReq_RECORD(const Parser &parser){ if (_sdp_track.empty() || parser["Session"] != _sessionid) { send_S
阅读全文
摘要:setup要接收两次,指明流媒体的传输方式 。 代码如下 void RtspSession::handleReq_Setup(const Parser &parser) { //处理setup命令,该函数可能进入多次 int trackIdx = getTrackIndexByControlUrl(
阅读全文
摘要:ZLMedia 、sdp
阅读全文
摘要:将一个字符串string 通过分隔符存入到一个vector中。 vector<string> split(const string &s, const char *delim) { vector<string> ret; size_t last = 0; auto index = s.find(de
阅读全文
摘要:1.RTSP协议的处理在 RtspSplitter::onRecvHeader中进行。 2.RTSP协议中SDP的处理在RtspSplitter::onRecvContent中进行。 3.收到的RTSP数据在Parser类中Parse函数解析后存到和相关的成员变量中,各个key和value的值通过函
阅读全文
摘要:(1)代码 static string dateStr() { char buf[64] = {0}; time_t tt = time(NULL); strftime(buf, sizeof(buf), "%a, %b %d %Y %H:%M:%S GMT", gmtime(&tt)); retu
阅读全文