02 2024 档案

编码层判断帧类型H264
摘要:由于靠起始码判断帧类型无法严谨区分I,P,B;所以需要到slice层去判断;以下是代码(转载) /*仅用于精准判断帧类型*/ /* https://blog.csdn.net/zhuweigangzwg/article/details/44152239 */ #include <stdio.h> # 阅读全文

posted @ 2024-02-28 14:47 邗影 阅读(69) 评论(0) 推荐(0)

设置CPU亲和性
摘要:即,某个线程固定跑在某个CPU的(某个)核上 /** * 设置当前线程cpu亲和性 * @param i cpu索引,如果为-1,那么取消cpu亲和性 * @return 是否成功,目前只支持linux 代码块来自ZLtookit */bool setThreadAffinity(int i) { 阅读全文

posted @ 2024-02-28 10:48 邗影 阅读(254) 评论(0) 推荐(0)

解压压缩包后运行无权限说明
摘要:window解压ZIP后,重新压缩,发现Linux服务器运行时候显示.sh ,.exe执行权限不够???? 后来改成linux : unzip ***.zip -d /abc 修改替换更新(需要执行权限的,chmod +x ***) zip -r -y ***.zip /abc 可以了; 原因是:W 阅读全文

posted @ 2024-02-28 09:37 邗影 阅读(190) 评论(0) 推荐(0)

linux查询磁盘使用情况
摘要:df -h 检测磁盘空间-Linux #if defined(__linux__) || defined(__linux) struct statvfs st; if (::statvfs(_path.data(), &st) != 0) { do warning } auto freeSize = 阅读全文

posted @ 2024-02-26 14:02 邗影 阅读(22) 评论(0) 推荐(0)

const与mutable关键字
摘要:1 异步操作,使用lambda表达式,参数采用传值方式; window直接修改传输参数的值,并打印使用正常; linux报错:error passing const ** as this argument of ** discards qualifier [-fpermissive] const 关 阅读全文

posted @ 2024-02-23 13:12 邗影 阅读(9) 评论(0) 推荐(0)

ZLmediakit的TCP主动接收RTP数据
摘要:当我们使用openRtpServer接口的时候,一般都是别人主动向port或者默认端口(默认1000)上推数据;这种属于ZLM的socket被动接收连接(TCP),ZLM的RTP server作为服务端,监听端口,有别人过来链接之后,握手建立连接,传输数据; 如果我们想主动去链接对方,告诉对方给我发 阅读全文

posted @ 2024-02-18 10:57 邗影 阅读(1127) 评论(0) 推荐(0)

导航