摘要: typedef struct tagRect { int CX; int CY; int Width; int Height; }RECT; typedef struct tagRect_ex { RECT rects[12]; }RECT_EX; int test_nv12_2_jpeg(unsi 阅读全文
posted @ 2023-03-09 09:22 一夜梦想 阅读(447) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> class Temp { public: Temp() { printf("%s:构造函数\n", __FUNCTION__); } ~Temp() { printf("%s:析构函数\n", __FUNCTION__); 阅读全文
posted @ 2023-02-27 10:24 一夜梦想 阅读(7) 评论(0) 推荐(0) 编辑
摘要: FFHeader.h #ifndef __FFHeader_H__ #define __FFHeader_H__ extern "C" { #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" //#include "li 阅读全文
posted @ 2022-12-05 11:20 一夜梦想 阅读(186) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> extern "C" { #include "libavcodec/avcodec.h" #include "libavformat/avformat.h" //#include "libavfilter/avfilter.h" #include "libavu 阅读全文
posted @ 2022-12-03 10:08 一夜梦想 阅读(212) 评论(0) 推荐(1) 编辑
摘要: #include <stdio.h> // 首先定义C的共同体 union MyUnion { float f; char ch[4]; } mUion; int main(void) { // 使用 MyUnion my; //my.f = 15.52; my.ch[0] = 0xec; my.c 阅读全文
posted @ 2022-11-25 14:31 一夜梦想 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1、H264帧结构 NALU header描述 计算 0x67,0x47,0x27 SPS, 序列参数集,重要级别分别为11、10、01 SPS & 0x1F == 7 0x68,0x48,0x28 PPS,图像参数集,重要级别分别为11、10、01 PPS & 0x1F == 8 0x65,0x4 阅读全文
posted @ 2022-11-25 14:22 一夜梦想 阅读(919) 评论(0) 推荐(0) 编辑
摘要: 下面举个c++内部的字面量用的例子: unsigned int v1 = 20U; long v2 = 30L; unsigned long v3 = 40UL; 是不是很好奇数字后面 U、L、UL。 在举个栗子实现字面量方法: 在c++11引用了新的标准:用户自定义字面量,也交自定义后缀名操作符。 阅读全文
posted @ 2022-11-25 10:46 一夜梦想 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 数据类型对应的字节数: 数据类型说明32位字节数64位字节数取值范围 bool 布尔型 1 1 true, false char 字符型 1 1 -128~127 unsigned char 无符号字符型 1 1 0~255 short 短整型 2 2 -32768~32767 unsigned s 阅读全文
posted @ 2022-11-25 10:20 一夜梦想 阅读(21) 评论(0) 推荐(0) 编辑
摘要: if (m_url.indexOf("wss://") >= 0) { QSslConfiguration sslConfiguration = m_pWebSocket->sslConfiguration(); sslConfiguration.setPeerVerifyMode(QSslSock 阅读全文
posted @ 2021-06-10 17:05 一夜梦想 阅读(1175) 评论(0) 推荐(0) 编辑
摘要: 从websocket接收QString值,直接用QString::toStdString转成std::string会导致程序崩溃,如下图 解决办法: 使用 std::string str = std::string((const char *)msg.toLocal8Bit()); 进行转换 阅读全文
posted @ 2020-11-13 16:17 一夜梦想 阅读(2274) 评论(0) 推荐(0) 编辑