2449
- 收藏
- 点赞
- 分享
- 举报
hi3556v200 playback vpss不向后送图像
大家好,我在使用hi3556v200 1.0.1.0版本SDK reference层中的playback时,vout绑定vpss,从liteos的log中可以看到vpss有接收到图像,但是没有往后送。我把vpss绑定到vcap,disp就能看到图像。有调试过相关内容的大佬吗,帮忙看下是哪里的配置有问题。
MP4是在同一个板里录制的,h264编码,1920*1080,拷到电脑上用Windows自带播放器能看。
以下是我liteos中vpss的内容
Huawei LiteOS #
[VPSS] Version: [Hi3559V200_MPP_V1.0.1.0 B041 Release], Build Time[Jan 25 2019, 20:17:03]
-------------------------------MODULE PARAM-----------------------------------------------------------------
vpss_vb_source bOneBufferforLowDelay vpss_split_node_num bHdrSupport
0 0 1 0
-------------------------------VPSS GRP ATTR----------------------------------------------------------------
GrpID MaxW MaxH PixFmt DRange SrcFRate DstFRate bUserCtrl NrEn NrType RefCmp MotionMode
0 1920 1080 YVU-SP420 SDR8 30 30 Y Y VIDEO N Normal
-------------------------------VPSS CHN ATTR----------------------------------------------------------------
GrpID PhyChnID Enable Mode MirrorEn FlipEn SrcFRate DstFRate Depth Aspect videoX videoY videoW videoH BgColor
0 0 Y USER N N -1 -1 0 NONE 0 0 1920 1080 0
-------------------------------VPSS EXT-CHN ATTR------------------------------------------------------------
GrpID ExtChnID Enable SrcChn Width Height SrcFRate DstFRate Depth
-------------------------------VPSS GRP CROP INFO-----------------------------------------------------------
GrpID CropEn CoorType CoorX CoorY Width Height OriW OriH TrimX TrimY TrimWid TrimHgt
0 N RAT 0 0 0 0
-------------------------------VPSS CHN CROP INFO-----------------------------------------------------------
GrpID ChnID CropEn CoorType CoorX CoorY Width Height TrimX TrimY TrimWid TrimHgt
0 0 N RAT 0 0 0 0
-------------------------------VPSS GRP PIC QUEUE-----------------------------------------------------------
GrpID FreeLen0 BusyLen0 Delay Backup
0 9 0 0 0
-------------------------------VPSS GRP WORK STATUS---------------------------------------------------------
GrpID RecvPic0 ViLost0 VdecLost0 NewDo OldDo NewUnDo OldUnDo StartFl bStart CostTm MaxCostTm
0 176 0 0 0 0 0 0 0 Y 0 0
-------------------------------VPSS CHN OUTPUT RESOLUTION---------------------------------------------------
GrpID ChnID Enable Width Height Pixfmt Videofmt DRange Compress SendOk FrameRate
0 0 Y 1920 1080 UNKNOW LINEAR SDR8 N 0 0
-------------------------------VPSS 3DNR X PARAM------------------------------------------------------------
-------------------------------VPSS GPR0 3DNR PARAM-------------------------------------
GrpID Intf Version OptMode ISO Ref
0 NR_X VER_2 MANUAL 110 1
NRyEn_1 NRyEn_2 NRyEn_3 NRyEn_4
1 1 1 1
SFS2_1 SFS2_2 SFS2_3 SFS2_4
32 32 32 32
SFS4_1 SFS4_2 SFS4_3 SFS4_4
32 32 32 32
TFS0_1 TFS1_1 TFS0_2 TFS1_2
7 7 7 7
MATH0_1 MATH1_1 MATH0_2 MATH1_2
40 100 60 0
-------------------------------VPSS CHN ROTATE INFO---------------------------------------------------------
GrpID ChnID Rotate
-------------------------------VPSS CHN LDC INFO------------------------------------------------------------
GrpID ChnID Enable Aspect XRatio YRatio XYRatio XOffset YOffset DistortionRatio
-------------------------------VPSS CHN ROTATIO_EX INFO-----------------------------------------------------
GrpID ChnID Enable ViewType Angle XOffset YOffset Width Height
-------------------------------VPSS CHN SPREAD INFO---------------------------------------------------------
GrpID ChnID Enable OutW OutH Coef
-------------------------------VPSS CHN LOWDELAY ATTR-------------------------------------------------------
GrpID ChnID Enable LineCnt OneBufEnable OneBufAddr
-------------------------------FRAME INTERRUPT ATTR---------------------------------------------------------
GrpID IntType EarlyLine
0 START 0
-------------------------------DRV WORK STATUS--------------------------------------------------------------
StartSuc0 StartSuc1 LinkInt StartErr0 NodeIdErr0 StartErr1 NodeIdErr1 BusErr
0 0 0 0 0 0 0 0
-------------------------------DRV NODE QUEUE---------------------------------------------------------------
FreeNum WaitNum Busy00 Busy01 Sel0 Busy10 Busy11 Sel1 Proc
17 0 0 0 0 0 0 0 0
-------------------------------INT WORK STATUS--------------------------------------------------------------
CntPerSec MaxCntPerSec CostTm MostCostTm CostTmPerSec MCostTmPerSec
0 0 0 0 0 0
开启playback内容如下:
/* Init PLAYER */
CHECK_RET(HI_PLAYER_Init());
printf("HI_PLAYER_Init finish!\n");
/* Register Adec */
CHECK_RET(HI_PLAYER_RegAdec());
printf("HI_PLAYER_RegAdec finish!\n");
/* Init PLAYBACK */
HI_HANDLE modHdl = 0;
HI_HANDLE chnHdl = 0;
HI_PLAYBACK_CFG_S stPlayBackCfg = {0};
stPlayBackCfg.stPlayerParam.u32PlayPosNotifyIntervalMs = 500;
stPlayBackCfg.stPlayerParam.u32VideoEsBufSize = 6291456;
stPlayBackCfg.stPlayerParam.u32AudioEsBufSize = 0;
#ifdef VDEC_BIND_VPSS
stPlayBackCfg.stVoutOpt.enVoutType = HI_LITEPLAYER_VOUT_TYPE_VPSS;
#else
stPlayBackCfg.stVoutOpt.enVoutType = HI_LITEPLAYER_VOUT_TYPE_VO;
#endif
stPlayBackCfg.stVoutOpt.hModHdl = modHdl;
stPlayBackCfg.stVoutOpt.hChnHdl = chnHdl;
stPlayBackCfg.stAoutOpt.hAudDevHdl = 0;
stPlayBackCfg.stAoutOpt.hAudTrackHdl = 0;
stPlayBackCfg.pfnEventProc = Playback_event_callback_func;
stPlayBackCfg.pvUserData = NULL;
CHECK_RET(HI_PLAYBACK_Init(&stPlayBackCfg));
printf("HI_PLAYBACK_Init finish!\n");
/* Get Medio Info*/
HI_FORMAT_FILE_INFO_S stMediaInfo = {0};
CHECK_RET(HI_PLAYBACK_GetMediaInfo(MEDIO_FILE_NAME, &stMediaInfo));
printf("HI_PLAYBACK_GetMediaInfo finish!\n");
CHECK_RET(HI_MAPI_DISP_ClearWindow(0, 0));
CHECK_RET(HI_PLAYBACK_Play(stMediaInfo.s32UsedVideoStreamIndex, stMediaInfo.s32UsedAudioStreamIndex, NULL));
printf("HI_PLAYBACK_Play finish!\n\n");
while (1)
sleep(10);
vpss,vo初始化内容如下
#define RES_WIDTH (1920)
#define RES_HEIGHT (1080)
#define RES_FRAMERATE (30)
#define VDEC_BIND_VPSS
HI_S32 vpss_vo_init()
{
HI_S32 s32Ret = HI_SUCCESS;
CHECK_RET(HI_MAPI_Sys_Init());
printf("HI_MAPI_Sys_Init finish!\n");
/* Init Media */
HI_MAPI_MEDIA_ATTR_S stMediaAttr = {0};
stMediaAttr.stMediaConfig.stVbConfig.u32MaxPoolCnt = 3;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[0].u64BlkSize = 3136320;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[0].u32BlkCnt = 4;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[1].u64BlkSize = 884736;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[1].u32BlkCnt = 3;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[2].u64BlkSize = 122880;
stMediaAttr.stMediaConfig.stVbConfig.astCommPool[2].u32BlkCnt = 3;
stMediaAttr.stMediaConfig.stVIVPSSMode.aenMode[0] = VI_ONLINE_VPSS_OFFLINE;
stMediaAttr.stVencModPara.u32H264eLowPowerMode = 1;
stMediaAttr.stVencModPara.u32H265eLowPowerMode = 1;
CHECK_RET(HI_MAPI_Media_Init(&stMediaAttr));
printf("\nHI MAPI MEDIA INIT FINISH\n\n");
#ifdef VDEC_BIND_VPSS
/* Init VProc */
HI_HANDLE VpssHdl0 = 0;
HI_HANDLE VPortHdl0 = 0;
HI_BOOL bStitch = HI_FALSE;
HI_MAPI_VPSS_ATTR_S stVpssAttr = {0};
HI_MAPI_VPORT_ATTR_S stVPortAttr = {0};
stVpssAttr.u32MaxW = RES_WIDTH;
stVpssAttr.u32MaxH = RES_HEIGHT;
stVpssAttr.stFrameRate.s32SrcFrameRate = RES_FRAMERATE;
stVpssAttr.stFrameRate.s32DstFrameRate = RES_FRAMERATE;
stVpssAttr.enPixelFormat = PIXEL_FORMAT_YVU_SEMIPLANAR_420;
stVpssAttr.bNrEn = HI_TRUE;
stVpssAttr.stNrAttr.enNrType = VPSS_NR_TYPE_VIDEO;
stVpssAttr.stNrAttr.enCompressMode = COMPRESS_MODE_NONE;
stVpssAttr.stNrAttr.enNrMotionMode = NR_MOTION_MODE_NORMAL;
stVPortAttr.u32Width = RES_WIDTH;
stVPortAttr.u32Height = RES_HEIGHT;
stVPortAttr.stFrameRate.s32SrcFrameRate = RES_FRAMERATE;
stVPortAttr.stFrameRate.s32DstFrameRate = RES_FRAMERATE;
stVPortAttr.enVideoFormat = VIDEO_FORMAT_LINEAR;
stVPortAttr.enPixelFormat = PIXEL_FORMAT_YVU_SEMIPLANAR_422;
stVPortAttr.enCompressMode = COMPRESS_MODE_NONE;
CHECK_RET(HI_MAPI_VPROC_InitVpss(VpssHdl0, &stVpssAttr));
CHECK_RET(HI_MAPI_VPROC_SetPortAttr(VpssHdl0, VPortHdl0, &stVPortAttr));
CHECK_RET(HI_MAPI_VPROC_StartPort(VpssHdl0, VPortHdl0));
printf("HI MAPI VPROC INIT AND START FINISH\n\n");
#ifdef VPSS_BIND_VENC
/* Init Venc */
HI_HANDLE VencHdl0 = 0;
HI_MAPI_VENC_ATTR_S stVencAttr = {0};
HI_MAPI_VENC_CALLBACK_S stVencCB = {0};
stVencAttr.stVencPloadTypeAttr.enType = HI_MAPI_PAYLOAD_TYPE_H264;
stVencAttr.stVencPloadTypeAttr.u32Width = RES_WIDTH;
stVencAttr.stVencPloadTypeAttr.u32Height = RES_HEIGHT;
stVencAttr.stVencPloadTypeAttr.u32BufSize = RES_WIDTH * RES_HEIGHT * 2;
stVencAttr.stVencPloadTypeAttr.u32Profile = 0;
stVencAttr.stVencPloadTypeAttr.enSceneMode = HI_MAPI_VENC_SCENE_MODE_DV;
stVencAttr.stRcAttr.enRcMode = HI_MAPI_VENC_RC_MODE_CBR;
stVencAttr.stRcAttr.stAttrCbr.u32Gop = 30;
stVencAttr.stRcAttr.stAttrCbr.u32StatTime = 2;
stVencAttr.stRcAttr.stAttrCbr.u32SrcFrameRate = RES_FRAMERATE;
stVencAttr.stRcAttr.stAttrCbr.fr32DstFrameRate = RES_FRAMERATE;
stVencAttr.stRcAttr.stAttrCbr.u32BitRate = 10000;
stVencCB.pfnDataCB = VENC_DataProc;
stVencCB.pPrivateData = (HI_VOID*)"ENHENG";
CHECK_RET(HI_MAPI_VENC_Init(VencHdl0, &stVencAttr));
CHECK_RET(HI_MAPI_VENC_RegisterCallback(VencHdl0, &stVencCB));
CHECK_RET(HI_MAPI_VENC_BindVProc(VpssHdl0, VPortHdl0, VencHdl0, bStitch));
printf("HI MAPI VENC INIT AND START FINISH\n\n");
#endif // end of ifdef VPSS_BIND_VENC
#endif // end of ifdef VDEC_BIND_VPSS
/* Init Disp */
HI_HANDLE VoDispHdl = 0;
HI_HANDLE VoWndHdl = 0;
HI_MAPI_DISP_ATTR_S stDispAttr = {0};
HI_MAPI_DISP_WINDOW_ATTR_S stDispWindowAttr = {0};
HI_MAPI_DISP_VIDEOLAYER_ATTR_S stDispVideoLayer = {0};
stDispAttr.stPubAttr.u32BgColor = 0xFFFFFF;
stDispAttr.stPubAttr.enIntfType = VO_INTF_BT1120;
stDispAttr.stPubAttr.enIntfSync = VO_OUTPUT_1080P30;
CHECK_RET(HI_MAPI_DISP_Init(VoDispHdl, &stDispAttr));
printf("HI_MAPI_DISP_Init finish!\n");
#ifdef VDEC_BIND_VPSS
CHECK_RET(HI_MAPI_DISP_Bind_VProc(VpssHdl0, VPortHdl0, VoDispHdl, VoWndHdl, bStitch));
#endif
CHECK_RET(HI_MAPI_DISP_Start(VoDispHdl, &stDispVideoLayer));
CHECK_RET(HI_MAPI_DISP_SetWindowAttr(VoDispHdl, VoWndHdl, &stDispWindowAttr));
CHECK_RET(HI_MAPI_DISP_StartWindow(VoDispHdl, VoWndHdl));
printf("\nHI MAPI DISP INIT AND START FINISH\n\n");
exit:
return s32Ret;
}
我来回答
回答1个
时间排序
认可量排序
认可0
或将文件直接拖到这里
悬赏:
E币
网盘
* 网盘链接:
* 提取码:
悬赏:
E币
Markdown 语法
- 加粗**内容**
- 斜体*内容*
- 删除线~~内容~~
- 引用> 引用内容
- 代码`代码`
- 代码块```编程语言↵代码```
- 链接[链接标题](url)
- 无序列表- 内容
- 有序列表1. 内容
- 缩进内容
- 图片![alt](url)
相关问答
-
2020-04-11 23:08:24
-
2019-07-26 16:16:22
-
2019-07-26 16:19:25
-
2021-04-20 09:22:18
-
2021-04-06 17:58:58
-
2020-11-17 14:04:06
-
2021-01-27 16:00:35
-
2019-05-18 18:08:26
-
2021-05-18 17:14:39
-
2021-12-03 13:51:50
-
2020-10-27 10:15:36
-
2020-07-01 17:45:38
-
2020-06-15 10:08:19
-
2020-12-25 13:58:40
-
2020-02-29 14:30:40
-
2021-10-27 11:25:10
-
2019-08-08 09:27:18
-
2021-07-01 17:17:55
-
2020-03-26 12:48:26
无更多相似问答 去提问
![易百纳技术社区](/img/web/quest_unlogin_avatar.png)
点击登录
-- 积分
-- E币
提问
—
收益
—
被采纳
—
我要提问
切换马甲
上一页
下一页
举报反馈
举报类型
- 内容涉黄/赌/毒
- 内容侵权/抄袭
- 政治相关
- 涉嫌广告
- 侮辱谩骂
- 其他
详细说明
提醒
你的问题还没有最佳答案,是否结题,结题后将扣除20%的悬赏金
取消
确认
提醒
你的问题还没有最佳答案,是否结题,结题后将根据回答情况扣除相应悬赏金(1回答=1E币)
取消
确认