1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
Live555获得的帧数据是否可以通过IPC bits links,能否用这种方式来显示?
live555 frame -> iPCBitsOutLinks ->ipcBitsInLinks -> decLinks ->displayLinks |
|
相关推荐
9个回答
|
|
|
|
|
|
流程: ipc out -> ipc video in -> dec -> dis 把live555的帧数往ipc out里面填充就可以了吗?就可以对live555在线直播了吗?我的代码是这样子: vooid* getFrame(handle,frame,userdata) [ Bitstream_Buf *pEmptyBuf = NULL; //Int32 status = TRUE; int chns[16] = [0]; static UInt64 timestamp_base = 0; Bitstream_BufList emptyBufList; Bitstream_BufList fullBufList; IpcBitsOutLinkHLOS_BitstreamBufReqInfo reqInfo; UInt32 bitBufSize; UInt32 frameStartTime = 0; UInt32 frameEndTime = 0; UInt32 frameInterTime = 8; Int32 milliSecondsToSleep = 0; //Chains_Ctrl *chCfg = (Chains_Ctrl *) user_data; frameStartTime = OSA_getCurTimeInMsec(); bitBufSize =1360*768/2; reqInfo.bufSize = bitBufSize; reqInfo.chNum = chns[0]; IpcBitsOutLink_getEmptyVideoBitStreamBufs(SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0, &emptyBufList, &reqInfo); if(0 == emptyBufList.numBufs) [ return 0; ] fullBufList.numBufs = 0; pEmptyBuf = fullBufList.bufs[fullBufList.numBufs++] = emptyBufList.bufs[0]; memcpy(pEmptyBuf->addr, frame->frameBuf,frame->frameSize); pEmptyBuf->fillLength = frame->frameSize; UInt64 curTimeStamp =timestamp_base++ * 16; pEmptyBuf->lowerTimeStamp = (UInt32)(curTimeStamp & 0xFFFFFFFF); pEmptyBuf->upperTimeStamp = (UInt32)((curTimeStamp >> 32)& 0xFFFFFFFF); if (fullBufList.numBufs) [ IpcBitsOutLink_putFullVideoBitStreamBufs(SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0, &fullBufList); ] milliSecondsToSleep = 1; frameEndTime = OSA_getCurTimeInMsec(); milliSecondsToSleep = frameInterTime + frameStartTime - frameEndTime; if (milliSecondsToSleep > 0) [ OSA_waitMsecs(milliSecondsToSleep); milliSecondsToSleep = 0; ] return 0; ] Chains_revDis() [ IpcBitsOutLinkRTOS_CreateParams ipcBitsInVideoPrm; IpcBitsInLinkHLOS_CreateParams ipcBitsOutHostPrm; //IpcLink_CreateParams ipcOutVpssPrm; //IpcLink_CreateParams ipcInVideoPrm; DecLink_CreateParams decPrm; SwMsLink_CreateParams swMsPrm; DisplayLink_CreateParams displayPrm; UInt32 swMsId; UInt32 displayId; UInt32 ipcOutVpssId; UInt32 ipcInVideoId; UInt32 decId; // UInt32 ipcBitsInVideoId; UInt32 ipcBitsOutHostId; UInt8 i; myChains_ctrl =chainsCfg; //Chains_ipcBitsInit(); printf("n[#lqhPrint] my demo "); CHAINS_INIT_STRUCT(IpcLink_CreateParams,ipcOutVpssPrm); CHAINS_INIT_STRUCT(IpcLink_CreateParams,ipcInVideoPrm); swMsId = SYSTEM_LINK_ID_SW_MS_MULTI_INST_0; //swMsId[1] = SYSTEM_LINK_ID_SW_MS_MULTI_INST_1; displayId = SYSTEM_LINK_ID_DISPLAY_0; //displayId[1] = SYSTEM_LINK_ID_DISPLAY_1; decId = SYSTEM_LINK_ID_VDEC_0; //ipcOutVpssId = SYSTEM_VPSS_LINK_ID_IPC_OUT_M3_0; // ipcInVideoId = SYSTEM_VIDEO_LINK_ID_IPC_IN_M3_0; ipcBitsInVideoId = SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0; ipcBitsOutHostId = SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0; System_linkControl( SYSTEM_LINK_ID_M3VIDEO, SYSTEM_COMMON_CMD_SET_CH2IVAHD_MAP_TBL, &systemVid_encDecIvaChMapTbl, sizeof(SystemVideo_Ivahd2ChMap_Tbl), TRUE ); ipcBitsOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID; ipcBitsOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0; ipcBitsOutHostPrm.baseCreateParams.numOutQue = 1; ipcBitsOutHostPrm.baseCreateParams.numChPerOutQue[0] = 1; ipcBitsOutHostPrm.baseCreateParams.outQueParams[0].nextLink = ipcBitsInVideoId; ipcBitsOutHostPrm.baseCreateParams.notifyNextLink = FALSE; ipcBitsOutHostPrm.baseCreateParams.notifyPrevLink = FALSE; ipcBitsOutHostPrm.baseCreateParams.noNotifyMode = TRUE; Chains_ipcBitsInitCreateParams_BitsOutRTOS(&ipcBitsOutHostPrm,FALSE); ipcBitsInVideoPrm.baseCreateParams.inQueParams.prevLinkId = ipcBitsOutHostId; ipcBitsInVideoPrm.baseCreateParams.inQueParams.prevLinkQueId = 0; ipcBitsInVideoPrm.baseCreateParams.numOutQue = 1; ipcBitsInVideoPrm.baseCreateParams.numChPerOutQue[0] = 1; ipcBitsInVideoPrm.baseCreateParams.outQueParams[0].nextLink = decId; ipcBitsInVideoPrm.baseCreateParams.notifyNextLink = FALSE; ipcBitsInVideoPrm.baseCreateParams.notifyPrevLink = FALSE; ipcBitsInVideoPrm.baseCreateParams.noNotifyMode = TRUE; Chains_ipcBitsInitCreateParams_BitsInRTOS(&ipcBitsInVideoPrm,FALSE); /* ipcOutVpssPrm.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID; ipcOutVpssPrm.inQueParams.prevLinkQueId = 0; ipcOutVpssPrm.numOutQue = 1; ipcOutVpssPrm.numChPerOutQue[0] = 1; ipcOutVpssPrm.outQueParams[0].nextLink = ipcInVideoId; ipcOutVpssPrm.notifyNextLink = TRUE; ipcOutVpssPrm.notifyPrevLink = FALSE; ipcOutVpssPrm.noNotifyMode = FALSE; ipcOutVpssPrm.numChPerOutQue[0] = 0; ipcOutVpssPrm.equallyDivideChAcrossOutQues = FALSE; ipcInVideoPrm.inQueParams.prevLinkId = ipcOutVpssId; ipcInVideoPrm.inQueParams.prevLinkQueId = 0; ipcInVideoPrm.numOutQue = 1; ipcInVideoPrm.numChPerOutQue[0] = 1; ipcInVideoPrm.outQueParams[0].nextLink = decId; ipcInVideoPrm.notifyNextLink = TRUE; ipcInVideoPrm.notifyPrevLink = FALSE; ipcInVideoPrm.noNotifyMode = FALSE; ipcInVideoPrm.numChPerOutQue[0] = 0; ipcInVideoPrm.equallyDivideChAcrossOutQues = FALSE; */ for (i=0; i [ decPrm.chCreateParams.format = chainsCfg->chCfg[i + chainsCfg->chCapNum].encFormat; decPrm.chCreateParams.profile = IH264VDEC_PROFILE_ANY; decPrm.chCreateParams.targetMaxWidth = chainsCfg->chCfg[i + chainsCfg->chCapNum].inWidth; decPrm.chCreateParams.targetMaxHeight = chainsCfg->chCfg[i + chainsCfg->chCapNum].inHeight; decPrm.chCreateParams.fieldMergeDecodeEnable = FALSE; decPrm.chCreateParams.algCreateStatus = DEC_LINK_ALG_CREATE_STATUS_CREATE; decPrm.chCreateParams.defaultDynamicParams.targetFrameRate = chainsCfg->chCfg[i + chainsCfg->chCapNum].encFrameRate; decPrm.chCreateParams.defaultDynamicParams.targetBitRate = chainsCfg->chCfg[i + chainsCfg->chCapNum].bitRate; decPrm.chCreateParams.numBufPerCh = 0; decPrm.chCreateParams.tilerEnable = TRUE; ] decPrm.inQueParams.prevLinkId = ipcBitsInVideoId; decPrm.inQueParams.prevLinkQueId = 0; decPrm.outQueParams.nextLink = swMsId; swMsPrm.numSwMsInst = 1; swMsPrm.swMsInstId[0] = SYSTEM_SW_MS_SC_INST_VIP1_SC; swMsPrm.inQueParams.prevLinkId = decId; swMsPrm.inQueParams.prevLinkQueId = 0; swMsPrm.outQueParams.nextLink = displayId; swMsPrm.lineSkipMode = FALSE; swMsPrm.enableLayoutGridDraw = TRUE; swMsPrm.layoutPrm.outputFPS = chainsCfg->chCfg[0+chainsCfg->chCapNum].encFrameRate; swMsPrm.maxInputQueLen = SYSTEM_SW_MS_DEFAULT_INPUT_QUE_LEN; swMsPrm.maxOutRes = chainsCfg->displayRes[0]; swMsPrm.numOutBuf = 0; Chains_swMsGenerateLayoutParams(0, 2, &swMsPrm); displayPrm.numInputQueues = 1; displayPrm.activeQueue = 0; displayPrm.inQueParams[0].prevLinkId = swMsId; displayPrm.inQueParams[0].prevLinkQueId = 0; displayPrm.displayRes = chainsCfg->displayRes[0]; displayPrm.forceFieldSeparatedInputMode = FALSE; if(chainsCfg->chRecNum > 0) [ printf("n[#lqhPrint] Create ing "); //System_linkCreate(ipcOutVpssId,&ipcOutVpssPrm,sizeof(ipcOutVpssPrm)); //System_linkCreate(ipcInVideoId,&ipcInVideoPrm,sizeof(ipcInVideoPrm)); System_linkCreate(ipcBitsOutHostId,&ipcBitsOutHostPrm,sizeof(ipcBitsOutHostPrm)); System_linkCreate(ipcBitsInVideoId,&ipcBitsInVideoPrm,sizeof(ipcBitsInVideoPrm)); System_linkCreate(decId,&decPrm,sizeof(decPrm)); System_linkCreate(swMsId,&swMsPrm,sizeof(swMsPrm)); System_linkCreate(displayId,&displayPrm,sizeof(displayPrm)); ] if(chainsCfg->chRecNum > 0) [ Vdis_start(); System_linkStart(displayId); System_linkStart(swMsId); System_linkStart(decId); //System_linkStart(ipcOutVpssId); //System_linkStart(ipcInVideoId); System_linkStart(ipcBitsInVideoId); System_linkStart(ipcBitsOutHostId); rtspClientStart(chainsCfg); ] while(1) [ char ch; ch = Chains_menuRunTime(); if(ch=='0') break; ] if(chainsCfg->chRecNum > 0) [ rtspClientstop(); System_linkStop(ipcBitsOutHostId); System_linkStop(ipcBitsInVideoId); System_linkStop(decId); //System_linkStop(ipcOutVpssId); //System_linkStop(ipcInVideoId); System_linkStop(swMsId); Vdis_stop(); System_linkStop(displayId); ] if(chainsCfg->chRecNum > 0) [ System_linkDelete(ipcBitsOutHostId); System_linkDelete(ipcBitsInVideoId); System_linkDelete(decId); System_linkDelete(swMsId); System_linkDelete(displayId); Chains_displayCtrlDeInit(); ] ] |
|
|
|
bbywerwr 发表于 2018-5-31 07:58 是我写反了,因该是: IpcBitsOutLinkRTOS_CreateParams ipcBitsInVideoPrm; IpcBitsInLinkHLOS_CreateParams ipcBitsOutHostPrm; 改为这个: IpcBitsInLinkRTOS_CreateParams ipcBitsInVideoPrm; IpcBitsOutLinkHLOS_CreateParams ipcBitsOutHostPrm; 又一个问题: IpcBitsOutLink_getEmptyVideoBitStreamBufs(SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0, &emptyBufList, &reqInfo); if(0 == emptyBufList.numBufs) [ return 0; ] 这上面的语句无法申请获得buffer?求指教! |
|
|
|
恩恩,我现在是这样子: SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0 => SYSTEM_VIDEO_LINK_ID_IPC_BITS_IN_0 => SYSTEM_LINK_ID_VDEC_0 => SYSTEM_VIDEO_LINK_ID_IPC_OUT_M3_0 => SYSTEM_VPSS_LINK_ID_IPC_IN_M3_0 => SYSTEM_LINK_ID_SW_MS_MULTI_INST_0 => SYSTEM_LINK_ID_DISPLAY_0 这样子连这些link应该是没问题的吧?第一个link是这样子操作的: ipcBitsOutHostId = SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0; System_LinkQueInfo queInfo; queInfo.numCh = 1; queInfo.chInfo[0].bufType = SYSTEM_BUF_TYPE_VIDBITSTREAM; queInfo.chInfo[0].codingformat = chainsCfg->chCfg[0].encFormat; queInfo.chInfo[0].height = chainsCfg->chCfg[0].outHeight; queInfo.chInfo[0].width = chainsCfg->chCfg[0].outWidth; queInfo.chInfo[0].memType = SYSTEM_MT_TILEDMEM; queInfo.chInfo[0].dataFormat = SYSTEM_DF_YUV420P; queInfo.chInfo[0].scanFormat = SYSTEM_SF_PROGRESSIVE; ipcBitsOutHostPrm.baseCreateParams.inQueParams.prevLinkId = SYSTEM_LINK_ID_INVALID; ipcBitsOutHostPrm.baseCreateParams.inQueParams.prevLinkQueId = 0; ipcBitsOutHostPrm.baseCreateParams.numOutQue = 1; ipcBitsOutHostPrm.baseCreateParams.numChPerOutQue[0] = 1; ipcBitsOutHostPrm.baseCreateParams.outQueParams[0].nextLink = ipcBitsInVideoId; ipcBitsOutHostPrm.baseCreateParams.notifyNextLink = FALSE; ipcBitsOutHostPrm.baseCreateParams.notifyPrevLink = FALSE; ipcBitsOutHostPrm.baseCreateParams.noNotifyMode = TRUE; Chains_ipcBitsInitCreateParams_BitsOutHLOS(&ipcBitsOutHostPrm,&queInfo); System_linkCreate(ipcBitsOutHostId,&ipcBitsOutHostPrm,sizeof(ipcBitsOutHostPrm)); System_linkStart(ipcBitsOutHostId); emptyBufList.numBufs =0 ; bitBufSize =1360*768/2; reqInfo.bufSize = bitBufSize; reqInfo.chNum = chns[0]; OSA_waitMsecs(8); frameStartTime = OSA_getCurTimeInMsec(); IpcBitsOutLink_getEmptyVideoBitStreamBufs(SYSTEM_HOST_LINK_ID_IPC_BITS_OUT_0, &emptyBufList, &reqInfo); if(0 == emptyBufList.numBufs) [ return 0; ] 可我这样获取第一个link的缓冲区的时候,失败了,返回来 emptyBufList.numBufs =0的,不知道哪里出错了?能帮我看看吗? |
|
|
|
live555 frame -> ipcBitsOutLinks ->ipcBitsInLinks -> decLinks ->ipcOut ->ipcIn ->displayLinks
|
|
|
|
你这样做完全ok,我做过实验,从A8->ipcBitsOutlinks->ipcBitsInLinks->videoM3 decLink->videoM3 encLink->ipcBitsOutM3->ipcBitsInHost->A8这样是ok的;
|
|
|
|
送终鸡酒 发表于 2018-5-31 08:59 是的!我的成功出来了! A8(live555 client) ->IPC OUT(Bit Out) ->IPC IN (Video IN) -> DecLink (Video)->(Video Out )(IPC ) -> (Vpass In)(IPC) SwMs -> Display 原来是我忘记配置Ipc BitoutLink NotifyNextLink 以及NotifyMode!配置就可以了!IPC都需要配置 NotifyNextLink 以及NotifyMode! |
|
|
|
送终鸡酒 发表于 2018-5-31 08:59 有一个问题我停止stop chain,按0然后结束当前demo [host] 97990: IPC_BITS_OUT : Delete Done !!! [m3vpss ] 102738: DISPLAY: Stop Done !!! [m3video] 102762: IPCBITSIN:Link[1000001a]: [m3video] RECV:1221 FREE:1221,DROPPED:0,AVGLATENCY:7 [m3video] 102763: IPC_BITS_IN : Delete in progress !!! [m3video] 102763: IPC_BITS_IN : Delete Done !!! [m3video] 102763: DECODE: Stop in progress !!! [m3video] 102763: DECODE: Stop Done !!! [m3video] 102763: DECODE: Delete in progress !!! [m3video] !!!XDC RUNTIME ASSERT FAILED [m3video] xdc.runtime.Error @ ti.sdo.ipc.SharedRegion: line 302: [m3video] assertion failure: A_regionInvalid: Region is invalid 出现了这样子错误是什么原因呢?视频已经播放出来了的。 谢谢! |
|
|
|
bbywerwr 发表于 2018-5-31 09:26 你好; 你可以检查一下System_linkDelete 的link的注销的顺序,看是哪个link导致的; |
|
|
|
只有小组成员才能发言,加入小组>>
334 浏览 1 评论
528 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
773 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
649 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1126 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
56浏览 29评论
123浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
251浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
200浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
56浏览 13评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-22 19:59 , Processed in 1.184652 second(s), Total 93, Slave 77 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号