資源簡(jiǎn)介
基于RK3399平臺(tái),利用MPP實(shí)現(xiàn)RTSP視頻流的硬件解碼,輸入視頻流格式為H.264
代碼片段和文件信息
#include?
#include?
#include?
#include?
#include?“tools.h“
#include?“rtspprotocolutil.h“
#include?“mppdecoder.h“
#include?“rkdrm.h“
#if?0
//?將一個(gè)YUV幀存入文件,便于使用外部解碼器來(lái)檢驗(yàn)解碼的正確性
static?void?save_frame(frame_st*?frame)?
{
????static?d?=?0;
????if?(d++?>?10)?return;
????char?fn[256];
????sprintf(fn?“frame-%04d.yuv“?d);
????FILE*?fp?=?fopen(fn?“wb“);
????uint32_t?i;
????uint8_t?*base_y?=?frame->data;
????uint8_t?*base_c?=?frame->data?+?frame->h_stride?*?frame->v_stride;
????for?(i?=?0;?i?ame->height;?i++?base_y?+=?frame->h_stride)?{
????????fwrite(base_y?1?frame->width?fp);
????}
????for?(i?=?0;?i?ame->height?/?2;?i++?base_c?+=?frame->h_stride)?{
????????fwrite(base_c?1?frame->width?fp);
????}
????fclose(fp);
}
static?void?_copy_frame(fr
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-05-07?09:44??mpp_rtsp_pla
?????文件??????????27??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????481??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????181??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????3742??2018-05-07?09:44??mpp_rtsp_pla
?????文件???????12529??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????789??2018-05-07?09:44??mpp_rtsp_pla
?????目錄???????????0??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????4655??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????1719??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????6733??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????1337??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????6900??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????776??2018-05-07?09:44??mpp_rtsp_pla
?????文件????????3781??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????151??2018-05-07?09:44??mpp_rtsp_pla
?????文件???????18138??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????421??2018-05-07?09:44??mpp_rtsp_pla
?????文件?????????403??2018-05-07?09:44??mpp_rtsp_pla
評(píng)論
共有 條評(píng)論