TI中文支持网
TI专业的中文技术问题搜集分享网站

8168 视频无法正常播放

DVRRDK3.0 ,在demo的基础上改过两个简单的例子。

第一个例子  从capturelink—–>display 能正常播放视频

第二个例子  capturelink——–>ipcFramesOutVpss—(nextLink)—>display

为什么这么设计,因为之前设计过一个复杂的capturelink—–>ipcFramesOutVpss—–(processLink)—>ipcFramesInDsp—>Osd

                                                                                                                                                ——(nextLink)——–>display 无法正常播放,不报错,就是黑屏。

我把       capturelink——–>ipcFramesOutVpss—(nextLink)—>display  代码贴出来

#include <demos/link_api_demos/common/chains.h>
#include <mcfw/interfaces/ti_venc.h>
#include <demos/link_api_demos/common/chains_ipcFrames.h>

static SystemVideo_Ivahd2ChMap_Tbl systemVid_encDecIvaChMapTbl =
{
.isPopulated = 1,
.ivaMap[0] =
{
.EncNumCh = 10,
.EncChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0 , 0, 0},
.DecNumCh = 0,
.DecChList = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
.ivaMap[1] =
{
.EncNumCh = 0,
.EncChList = {16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31},
.DecNumCh = 12,
.DecChList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0 , 0, 0},
},
.ivaMap[2] =
{
.EncNumCh = 6,
.EncChList = {10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
.DecNumCh = 4,
.DecChList = {12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
},
};

Void Chains_singleChCapEncSend(Chains_Ctrl *chainsCfg)
{
CaptureLink_CreateParams capturePrm;
CaptureLink_VipInstParams *pCaptureInstPrm;
CaptureLink_OutParams *pCaptureOutPrm;

IpcFramesOutLinkRTOS_CreateParams ipcFramesOutVpssPrm;

DisplayLink_CreateParams displayPrm;

UInt32 captureId;
UInt32 vipInstId;

UInt32 ipcFramesOutVpssId;

UInt32 displayId;

UInt32 i = 0;
// char ch;

Chains_ipcFramesInit();

CHAINS_INIT_STRUCT(CaptureLink_CreateParams, capturePrm);
CHAINS_INIT_STRUCT(DisplayLink_CreateParams, displayPrm);
CHAINS_INIT_STRUCT(IpcFramesOutLinkRTOS_CreateParams, ipcFramesOutVpssPrm);

CHAINS_INIT_STRUCT(DisplayLink_CreateParams, displayPrm);
;

captureId = SYSTEM_LINK_ID_CAPTURE;
ipcFramesOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_FRAMES_OUT_0;

displayId = SYSTEM_LINK_ID_DISPLAY_0;

System_linkControl(
SYSTEM_LINK_ID_M3VIDEO,
SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL,
&systemVid_encDecIvaChMapTbl,
sizeof(SystemVideo_Ivahd2ChMap_Tbl),
TRUE
);

capturePrm.numVipInst = 1;
capturePrm.tilerEnable = FALSE;
capturePrm.numBufsPerCh = 16;//CAPTURE_LINK_NUM_BUFS_PER_CH_DEFAULT;
capturePrm.numExtraBufs = 0;
capturePrm.maxBlindAreasPerCh = 0;
capturePrm.isPalMode = FALSE;
capturePrm.enableSdCrop = FALSE;
capturePrm.doCropInCapture = FALSE;

for(vipInstId=0; vipInstId<capturePrm.numVipInst; vipInstId++)
{
pCaptureInstPrm = &capturePrm.vipInst[vipInstId];
pCaptureInstPrm->vipInstId = (SYSTEM_CAPTURE_INST_VIP0_PORTA+vipInstId*2)%SYSTEM_CAPTURE_INST_MAX;
pCaptureInstPrm->videoDecoderId = SYSTEM_DEVICE_VID_DEC_SII9233A_DRV;
pCaptureInstPrm->inDataFormat = SYSTEM_DF_YUV422P;
pCaptureInstPrm->standard = chainsCfg->displayRes[vipInstId];
pCaptureInstPrm->numOutput = 1;
pCaptureInstPrm->numChPerOutput = 1;
pCaptureInstPrm->frameCaptureMode = FALSE;
pCaptureInstPrm->fieldsMerged = FALSE;
if (Chains_IsInterlaced(chainsCfg->displayRes[0])) {
pCaptureInstPrm->frameCaptureMode = TRUE;
pCaptureInstPrm->fieldsMerged = TRUE;
}

pCaptureOutPrm = &pCaptureInstPrm->outParams[0];
pCaptureOutPrm->dataFormat = SYSTEM_DF_YUV422I_YUYV;
pCaptureOutPrm->scEnable = FALSE;
pCaptureOutPrm->scOutWidth = chainsCfg->channelConf[vipInstId].width;
pCaptureOutPrm->scOutHeight = chainsCfg->channelConf[vipInstId].height;
pCaptureOutPrm->outQueId = 0;
}
capturePrm.outQueParams[0].nextLink = ipcFramesOutVpssId;

System_linkCreate(captureId, &capturePrm, sizeof(capturePrm));
chainsCfg->displayRes[0] = capturePrm.vipInst[0].standard;
Vsys_getResSize(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].width, &chainsCfg->channelConf[0].height);
Vsys_getResRate(chainsCfg->displayRes[0], &chainsCfg->channelConf[0].frameRate);

ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkId = captureId;
ipcFramesOutVpssPrm.baseCreateParams.inQueParams.prevLinkQueId = 0;
ipcFramesOutVpssPrm.baseCreateParams.notifyPrevLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.numOutQue =1;
ipcFramesOutVpssPrm.baseCreateParams.outQueParams[0].nextLink= displayId;
ipcFramesOutVpssPrm.baseCreateParams.notifyNextLink = TRUE;
ipcFramesOutVpssPrm.baseCreateParams.noNotifyMode = TRUE;

displayPrm.inQueParams[0].prevLinkId = ipcFramesOutVpssId;
displayPrm.inQueParams[0].prevLinkQueId = 0;
displayPrm.displayRes=chainsCfg->displayRes[0];
Chains_displayCtrlInit(chainsCfg->displayRes);

System_linkCreate(ipcFramesOutVpssId,&ipcFramesOutVpssPrm,sizeof(ipcFramesOutVpssPrm));

System_linkCreate(displayId,&displayPrm,sizeof(displayPrm));

Chains_memPrintHeapStatus();

{
System_linkStart(displayId);

System_linkStart(ipcFramesOutVpssId);
System_linkStart(captureId);
/*
while(1)
{
ch = Chains_menuRunTime();
if(ch=='0')
break;
if(ch=='v')
System_linkControl(captureId, CAPTURE_LINK_CMD_FORCE_RESET, NULL, 0, TRUE);
if(ch=='p')
System_linkControl(captureId, CAPTURE_LINK_CMD_PRINT_ADV_STATISTICS, NULL, 0, TRUE);
}
*/
//此次添加代码在需要的时停止程序
/*
while(1)
{
;
}
*/
sleep(100);
System_linkStop(captureId);
System_linkStart(ipcFramesOutVpssId);

System_linkStop(displayId);
Chains_ipcFramesStop();
}

System_linkDelete(captureId);
System_linkDelete(ipcFramesOutVpssId);

System_linkDelete(displayId);
Chains_ipcFramesExit();
}

Louis:

可以把统计信息打印出来,进行分析,就是demo中的i选项。

Weiyi Jiang:

回复 Louis:

这是打印信息,有什么问题吗

[m3vpss ] *** Capture Driver Advanced Statistics *** [m3vpss ] [m3vpss ] VIP Parser Reset Count : 0 [m3vpss ] [m3vpss ] | Total Even Odd Total Even Odd Min / Max Min / Max Dropped Fid Repeat Frame Error Y/C [m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width Height Fields Count (Desc Error Y/C) [m3vpss ] ———————————————————————————————————— [m3vpss ] 000 | 1381 1381 0 60 60 0 1920 / 1920 1080 /1080 1365 0 0/0 (0/0) [m3vpss ] [m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0 [m3vpss ] [m3vpss ] *** Capture List Manager Advanced Statistics *** [m3vpss ] [m3vpss ] List Post Count : 2881 [m3vpss ] List Stall Count : 0 [m3vpss ] List Post Time (ms) : Max = 0, Min = 0, Avg = 0, Total = 0 [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 991, 1000) [m3vpss ] Descriptor miss found count : 0 [m3vpss ] [m3vpss ] [m3vpss ] VIP and VPDMA registers, [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00004400 [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000 [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00020000 [m3vpss ] [m3vpss ] [m3vpss ] 37020: CAPTURE: Fields = 16 (fps = 0, CPU Load = 0) [m3vpss ] 37020: CAPTURE: Num Resets = 0 (Avg 0 ms per reset) [m3vpss ] 37020: SYSTEM : FREE SPACE : System Heap = 6328 B, Mbx = 10237 msgs) [m3vpss ] 37021: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)

[m3vpss ] 37021: SYSTEM : FREE SPACE : Frame Buffer = 169831296 B (161 MB) [m3vpss ] 37021: SYSTEM : FREE SPACE : Bitstream Buffer = 349699968 B (333 MB) [m3vpss ] 37021: DISPLAY: DVO2(BP1) : 59 fps, Latency (Min / Max) = ( 255 / 0 ), Callback Interval (Min / Max) = ( 16 / 17 ) !!! [m3vpss ] 37021: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB) – TILER ON [m3vpss ] 37022: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB) – TILER ON0 [m3vpss ] 43427: CAPTURE: Stop in progress !!! [m3vpss ] 43428: CAPTURE: Stop Done !!! [m3vpss ] 43429: DISPLAY: Stop in progress !!! [m3vpss ] 43470: DISPLAY: Stop Done !!! [m3vpss ]

[host] Entered:Chains_ipcFramesExit…1.raw [host] Leaving:Chains_ipcFramesExit… 30279: SYSTEM: System Common De-Init inprogress !!!

[host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… [host] OSA_tskDelete:In progress… 30284: SYSTEM: IPC de-init in progress !!! [m3vpss ] *** Capture Driver Advanced Statistics *** [c6xdsp ] 41730: IPCFRAMESIN:Link[16]: [c6xdsp ] RECV:16 FREE:0,DROPPED:0,AVGLATENCY:0 [c6xdsp ] 41730: IPC_FRAMES_IN : Delete in progress !!! [c6xdsp ] 41730: IPC_FRAMES_IN : Delete Done !!! [m3vpss ] [c6xdsp ] 41731: HELLOWORLD : Delete in progress !!! [c6xdsp ] 41731: HELLOWORLD : Delete Done !!! [m3vpss ] VIP Parser Reset Count : 0 [m3vpss ] [m3vpss ] | Total Even Odd Total Even Odd Min / Max Min / Max Dropped Fid Repeat Frame Error Y/C 30314: SYSTEM: IPC de-init DONE !!! 30315: SYSTEM: System Common De-Init Done !!! [m3vpss ] CH | Fields Fields Fields FPS FPS FPS Width Height Fields Count (Desc Error Y/C)root@dm816x:/mnt# [m3vpss ] ———————————————————————————————————— [m3vpss ] 000 | 1764 1764 0 60 60 0 1920 / 1920 1080 /1080 1748 0 0/0 (0/0) [m3vpss ] [m3vpss ] VIP Capture Port 0 | DescMissMatch1 = 0, DescMissMatch2 = 0 , DescMissMatch3 = 0 [m3vpss ] [m3vpss ] *** Capture List Manager Advanced Statistics *** [m3vpss ] [m3vpss ] List Post Count : 3680 [m3vpss ] List Stall Count : 0 [m3vpss ] List Post Time (ms) : Max = 0, Min = 0, Avg = 0, Total = 0 [m3vpss ] INTC Timeout Count : (0, 0) (Min timeout value = 991, 1000) [m3vpss ] Descriptor miss found count : 0 [m3vpss ] [m3vpss ] [m3vpss ] VIP and VPDMA registers, [m3vpss ] VIP0 : FIQ_STATUS : 0x4810551c = 0x00000000 [m3vpss ] VIP1 : FIQ_STATUS : 0x48105a1c = 0x00000000 [m3vpss ] VPDMA: LIST_BUSY : 0x4810d00c = 0x00000000 [m3vpss ] [m3vpss ] [m3vpss ] 43472: CAPTURE: Fields = 16 (fps = 0, CPU Load = 0) [m3vpss ] 43472: CAPTURE: Num Resets = 0 (Avg 0 ms per reset) [m3vpss ] 43472: SYSTEM : FREE SPACE : System Heap = 6328 B, Mbx = 10239 msgs) [m3vpss ] 43472: SYSTEM : FREE SPACE : SR0 Heap = 11003648 B (10 MB)

[m3vpss ] 43472: SYSTEM : FREE SPACE : Frame Buffer = 169831296 B (161 MB) [m3vpss ] 43473: SYSTEM : FREE SPACE : Bitstream Buffer = 349699968 B (333 MB) [m3vpss ] 43473: SYSTEM : FREE SPACE : Tiler 8-bit = 134217728 B (128 MB) – TILER ON [m3vpss ] 43473: SYSTEM : FREE SPACE : Tiler 16-bit = 134217728 B (128 MB) – TILER ON [m3vpss ] 43473: CAPTURE: Delete in progress !!! [m3vpss ] UTILS: DMA: Free'ed CH (TCC) = 58 (58) [m3vpss ] 43473: CAPTURE: Delete Done !!! [m3vpss ] 43474: IPC_FRAMES_OUT : Delete in progress !!! [m3vpss ] 43474: IPCFRAMESOUT:Link[20000013]: [m3vpss ] RECV:16 FORWARD:0,DROPPED:0,AVGLATENCY:0 [m3vpss ] 43474: PRF : IPC_FRAMES_OUT0 : t: 0 ms, c: 16, f: 16, fps: 0, fpc: 1

[m3vpss ] 43474: IPC_FRAMES_OUT : Delete Done !!! [m3vpss ] 43475: DISPLAY: Frames = 1 (fps = 0) !!! [m3vpss ] 43475: DISPLAY: Delete in progress !!! [m3vpss ] 43475: DISPLAY: Delete Done !!! [m3vpss ] 43475: HDMI: Stopping HDMI Transmitter … !!! [m3vpss ] 43476: HDMI: Stopping HDMI Transmitter … DONE !!! [m3vpss ] 43476: DISPLAY: UNDERFLOW COUNT: HDMI(BP0) 1839, HDDAC(BP0) 1766, DVO2(BP1) 1766, SDDAC(SEC1) 1840

赞(0)
未经允许不得转载:TI中文支持网 » 8168 视频无法正常播放
分享到: 更多 (0)