简介
RV1126是一款瑞芯微(RockChip)旗下的视频编解码芯片,本次项目中使用的这款芯片基于Linux系统,使用buildroot编译工具。项目中需要使用到IPC,因此不可避免的离不开OnVif协议,同时,在通过OnVif协议获取到IPC的RTSP流地址后,使用Ffmpeg拉流操作。
OnVif协议
OnVif协议部分具体就不介绍了,网上一大堆,此处不再赘述;下面直接贴上已经实现的代码,大家可以直接拿来使用
测试demo
#include
#include
#include "IPCManager.h"
using namespace std;
extern "C" {
#include "libavcodec/avcodec.h"
#include "libavdevice/avdevice.h"
#include "libavformat/avformat.h"
#include "libavfilter/avfilter.h"
#include "libavutil/avutil.h"
#include "libswscale/swscale.h"
#include "libavutil/pixdesc.h"
#include "libavutil/log.h"
}
const char* ip = "192.168.1.108";
const char* username = "admin";
const char* password = "*******";
bool is_sps_pps_data(uint8_t *data) {
|