• 大小: 819KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-04-09
  • 语言: 其他
  • 标签: rtsp  hi3520  

资源简介

海思平台hi3520 rtsp代码,有兴趣的朋友拿 去研究。

资源截图

代码片段和文件信息


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include “rtspservice.h“
#include “rtputils.h“
#include “ringfifo.h“
#include “sample_comm.h“
#include “hi_mpi_nextchip_process.h“
extern int g_s32Quit ;
VIDEO_NORM_E gs_enNorm = VIDEO_ENCODING_MODE_PAL;
/**************************************************************************************************
**
**
**
**************************************************************************************************/
void * SAMPLE_VENC_4D1_H264(void *arg)
{
    SAMPLE_VI_MODE_E enViMode = SAMPLE_VI_MODE_4_D1;

    HI_U32 u32ViChnCnt = 4;
    HI_S32 s32VpssGrpCnt = 4;
    PAYLOAD_TYPE_E enPayLoad[2]= {PT_H264 PT_H264};
    PIC_SIZE_E enSize[2] = {PIC_D1 PIC_CIF};
    
    VB_CONF_S stVbConf;
    VPSS_GRP VpssGrp;
    VPSS_CHN VpssChn;
    VPSS_GRP_ATTR_S stGrpAttr;
    VENC_GRP VencGrp;
    VENC_CHN VencChn;
    SAMPLE_RC_E enRcMode;
    
    HI_S32 i;
    HI_S32 s32Ret = HI_SUCCESS;
    HI_U32 u32BlkSize;
    HI_CHAR ch;
    SIZE_S stSize;
    int ViChn;
    /******************************************
     step  1: init variable 
    ******************************************/
    memset(&stVbConf0sizeof(VB_CONF_S));
    u32BlkSize = SAMPLE_COMM_SYS_CalcPicVbBlkSize(gs_enNormPIC_D1 SAMPLE_PIXEL_FORMAT SAMPLE_SYS_ALIGN_WIDTH);
    stVbConf.u32MaxPoolCnt = 128;
    
    stVbConf.astCommPool[0].u32BlkSize = u32BlkSize;
    stVbConf.astCommPool[0].u32BlkCnt = u32ViChnCnt * 6;
    memset(stVbConf.astCommPool[0].acMmzName0
        sizeof(stVbConf.astCommPool[0].acMmzName));

    /* hist buf*/
    stVbConf.astCommPool[1].u32BlkSize = (196*4);
    stVbConf.astCommPool[1].u32BlkCnt = u32ViChnCnt * 6;
    memset(stVbConf.astCommPool[1].acMmzName0 sizeof(stVbConf.astCommPool[1].acMmzName));

    /******************************************
     step 2: mpp system init. 
    ******************************************/
    s32Ret = SAMPLE_COMM_SYS_Init(&stVbConf);
    if (HI_SUCCESS != s32Ret)
    {
        SAMPLE_PRT(“system init failed with %d!\n“ s32Ret);
        goto END_VENC_8D1_0;
    }

    /******************************************
     step 3: start vi dev & chn to capture
    ******************************************/
    s32Ret = SAMPLE_COMM_VI_Start(enViMode gs_enNorm);
    if (HI_SUCCESS != s32Ret)
    {
        SAMPLE_PRT(“start vi failed!\n“);
        goto END_VENC_8D1_0;
    }
    
    /******************************************
     step 4: start vpss and vi bind vpss
    ******************************************/
    s32Ret = SAMPLE_COMM_SYS_GetPicSize(gs_enNorm PIC_D1 &stSize);
    if (HI_SUCCESS != s32Ret)
    {
        SAMPLE_PRT(“SAMPLE_COMM_SYS_GetPicSize failed!\n“);
      

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     256632  2016-08-15 15:15  hisi_rtsp\bin\simple_dvr

     文件      32142  2016-08-15 15:15  hisi_rtsp\bin\uart_jpeg

     文件       6570  2016-08-15 15:15  hisi_rtsp\include\hi_include\cx26828.h

     文件      12449  2016-08-15 15:15  hisi_rtsp\include\hi_include\hifb.h

     文件      10412  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_common.h

     文件       6552  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_adec.h

     文件       4567  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_aenc.h

     文件        843  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_ai.h

     文件      15051  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_aio.h

     文件        844  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_ao.h

     文件      42714  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_hdmi.h

     文件       8624  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_ive.h

     文件       9288  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_pciv.h

     文件      19776  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_rc.h

     文件       8170  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_region.h

     文件       2204  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_sys.h

     文件       3393  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vb.h

     文件       9364  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vda.h

     文件       9801  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vdec.h

     文件      22219  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_venc.h

     文件      21720  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vi.h

     文件       8070  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_video.h

     文件      18906  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vo.h

     文件       9071  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_comm_vpss.h

     文件       4589  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_debug.h

     文件       8972  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_defines.h

     文件       5072  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_errno.h

     文件       1764  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_io.h

     文件      10076  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_math.h

     文件        693  2016-08-15 15:15  hisi_rtsp\include\hi_include\hi_mem.h

............此处省略80个文件信息

评论

共有 条评论