当前位置: 首页>>代码示例>>C++>>正文


C++ OSA_printf函数代码示例

本文整理汇总了C++中OSA_printf函数的典型用法代码示例。如果您正苦于以下问题:C++ OSA_printf函数的具体用法?C++ OSA_printf怎么用?C++ OSA_printf使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了OSA_printf函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: IMAGE_TUNE_ReadParamset

int IMAGE_TUNE_ReadParamset(int value)
{
	int retVal = OSA_EFAIL, readSize = 0;

	IMAGE_TUNE_ParamSetList *pPrmList;

	if(gImageTunePrmList != NULL) {
		pPrmList = gImageTunePrmList;
		retVal = OSA_fileReadFile(IMAGE_TUNE_PARAMSET_DIR, (Uint8*)pPrmList, sizeof(IMAGE_TUNE_ParamSetList),0, &readSize);

		if((retVal != OSA_SOK) || (readSize!=sizeof(IMAGE_TUNE_ParamSetList))) {
			if(readSize==0) {
				OSA_printf("IMAGE TUNE: Paramset File is not available..... Setting DEFAULT parameter\n");
			}
			else {
				OSA_printf("IMAGE TUNE: Error Reading Paramset File(File Size %d)..... Setting DEFAULT parameter \n", readSize);
			}
			memset(gImageTunePrmList, 0, sizeof(IMAGE_TUNE_ParamSetList));
			retVal = OSA_EFAIL;
		}
		else {
			retVal = OSA_SOK;
		}
	}

	return retVal;
}
开发者ID:119,项目名称:ipnc,代码行数:27,代码来源:imageTune.c

示例2: DRV_captureClose

int DRV_captureClose()
{
  #ifdef DRV_SHOW_INFO
  OSA_printf(" CAPTURE: Closing imager.\n");
  #endif

  DRV_imgsClose();

  #ifdef DRV_SHOW_INFO
  OSA_printf(" CAPTURE: Closing ISIF.\n");
  #endif

  DRV_isifClose();

  #ifdef DRV_SHOW_INFO
  OSA_printf(" CAPTURE: Closing H3A.\n");
  #endif

  DRV_h3aClose();

  #ifdef DRV_SHOW_INFO
  OSA_printf(" CAPTURE: Closing IPIPE.\n");
  #endif

  DRV_ipipeClose();

  #ifdef DRV_SHOW_INFO
  OSA_printf(" CAPTURE: Close DONE.\n");
  #endif

  return OSA_SOK;
}
开发者ID:119,项目名称:ipnc,代码行数:32,代码来源:drv_capture.c

示例3: MCVIP_tvp5158SetHue

int MCVIP_tvp5158SetHue(MCVIP_Hndl *hndl, int channel)
{
  int status=OSA_SOK, chNum;

	if(channel >= 4){
    if(hndl->pI2cHndl[1]==NULL)
      return OSA_EFAIL;

    OSA_printf(" MCVIP: TVP5158 set Hue[%d] for stage 1\r\n",hndl->createPrm.videoHue[channel]);
            
		chNum = channel-4;
    status = TVP5158_setHue(hndl->pI2cHndl[1], hndl->createPrm.videoHue[channel], chNum);

    if(status!=OSA_SOK)
      return status;   
	}
	else{
    if(hndl->pI2cHndl[0]==NULL)
      return OSA_EFAIL;

    OSA_printf(" MCVIP: TVP5158 set Hue[%d] for stage 0\r\n",hndl->createPrm.videoHue[channel]);
            
    status = TVP5158_setHue(hndl->pI2cHndl[0], hndl->createPrm.videoHue[channel], channel);

    if(status!=OSA_SOK)
      return status;   
  }
  
  OSA_printf(" MCVIP: TVP5158 set Hue[%d] done !!!\r\n",hndl->createPrm.videoHue[channel]);      

  return status;  	
}
开发者ID:119,项目名称:ipnc,代码行数:32,代码来源:mcvip_tvp5158.c

示例4: OSA_tskTestMain

int OSA_tskTestMain(int argc, char **argv)
{
  char ch;
  Bool done = FALSE;

  OSA_printf(" \r\n");
  OSA_printf(" Thread Priority [ min = %d , max = %d, default = %d ] \r\n", OSA_THR_PRI_MIN, OSA_THR_PRI_MAX, OSA_THR_PRI_DEFAULT);

  do {
    OSA_printf(gOSA_TEST_strMainMenu);

    ch = OSA_TEST_GetInput();
    OSA_printf("\r\n");

    switch (ch) {

      case '1':
        OSA_TEST_ManualTestRun();
        break;

      case '2':
        OSA_TEST_AutoTestRun();
        break;

      case '0':
        done = TRUE;
        break;
    }
  } while(!done);

  return OSA_SOK;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:32,代码来源:osa_test.c

示例5: MCVIP_tvp5158SetNoiseReduction

int MCVIP_tvp5158SetNoiseReduction(MCVIP_Hndl *hndl, int channel, int enable)
{
	int status=OSA_SOK, stage=0, chNum;

	chNum = channel;
	if(channel >= 4){
		stage = 1;
		chNum = channel-4;
	}

	if(hndl->pI2cHndl[stage]==NULL)
		return OSA_EFAIL;

	OSA_printf(" MCVIP: TVP5158 ch[%d] set NoiseReduction[%d] for stage %d\r\n",channel, enable, stage);

	if(enable == 0)
		enable = 0x09;
	
	if(enable == 1)
		enable = 0x08;
	
	status = TVP5158_setNoiseReduction(hndl->pI2cHndl[stage], enable, chNum);

    if(status!=OSA_SOK)
      return status;   	

  	OSA_printf(" MCVIP: TVP5158 ch[%d] set NoiseReduction[%x] done !!\r\n",channel, enable);

  	return status;	
		
}
开发者ID:119,项目名称:ipnc,代码行数:31,代码来源:mcvip_tvp5158.c

示例6: VcapVencVdecVdis_ipcBitsGetMaxFileSizePerChannel

static
UInt32 VcapVencVdecVdis_ipcBitsGetMaxFileSizePerChannel(char *filePath)
{
    UInt32 maxFileSizePerChannel = 0;
    unsigned long paritionFreeSize;

    paritionFreeSize = VcapVencVdecVdis_ipcBitsGetPartitionFreeSpace(filePath);
    if (0 == paritionFreeSize)
    {
        OSA_printf("Not able to determine partition size.Using default size:%d",
                   MCFW_IPC_BITS_MAX_FILE_SIZE);
        maxFileSizePerChannel = MCFW_IPC_BITS_MAX_FILE_SIZE;
    }
    else
    {
        unsigned long maxFileSizeActual;
        maxFileSizeActual = paritionFreeSize/
                            VcapVencVdecVdis_ipcBitsGetNumEnabledChannels();
        if (maxFileSizeActual > MCFW_IPC_BITS_MAX_SINGLE_FILE_SIZE)
        {
            OSA_printf("Limiting File Size to max[0x%X],actual[0x%lX]",
                       MCFW_IPC_BITS_MAX_SINGLE_FILE_SIZE,
                       maxFileSizeActual);
            maxFileSizeActual = MCFW_IPC_BITS_MAX_SINGLE_FILE_SIZE;
        }
        maxFileSizePerChannel = maxFileSizeActual;
        /* Each channel will have a buffer and a header. So divide by 2 */
        maxFileSizePerChannel /= 2;
        OSA_printf("Max File size per channel:0x%X",maxFileSizePerChannel);
    }
    return (maxFileSizePerChannel);
}
开发者ID:JammyWei,项目名称:dm8168,代码行数:32,代码来源:demo_vcap_venc_vdec_vdis_bits_rdwr.c

示例7: UI_rtspStreamStart

//20120105 add by sxh stream
int UI_rtspStreamStart()
{
  OSA_printf(" MCVIP UI: Starting Streaming Server...\n");
  system("./wis-streamer &");
  OSA_waitMsecs(2000);
  OSA_printf(" MCVIP UI: Starting Streaming Server...DONE\n");
  return 0;
}
开发者ID:119,项目名称:ipnc,代码行数:9,代码来源:main.c

示例8: DRV_captureTestMain

int DRV_captureTestMain(int argc, char **argv)
{
  int status;

  memset(&gDRV_testCtrl, 0, sizeof(gDRV_testCtrl));

  gDRV_testCtrl.testQuit = 0;

  OSA_attachSignalHandler(SIGINT, DRV_captureTestSignalHandler);

  status = DRV_init();
  if(status!=OSA_SOK)
    return status;

  status = DRV_captureTestOpen();
  if(status!=OSA_SOK)
    goto open_exit;

  status = DRV_captureStart(FALSE, TRUE);
  if(status!=OSA_SOK)
    goto start_exit;

  OSA_printf(" CAPTURE: Running.\n");

  status = OSA_SOK;
  while(!gDRV_testCtrl.testQuit && status==OSA_SOK)
    status = DRV_captureTestRun();

  DRV_captureStop();

start_exit:

  OSA_printf(" CAPTURE: Closing capture.\n");
  DRV_captureClose();

  OSA_printf(" CAPTURE: Closing display.\n");
  DRV_displayClose(&gDRV_testCtrl.displayHndl);

  #ifdef DRV_CAPTURE_TEST_ENABLE_FD
  DRV_faceDetectClose();
  #endif

  #ifdef DRV_CAPTURE_TEST_ENABLE_VS
  ALG_vstabDelete(gDRV_testCtrl.vsHndl);
  #endif

  if(gDRV_testCtrl.tmpBufSize) {
//    OSA_fileWriteFile("DATA_DUMP.YUV", gDRV_testCtrl.tmpBufVirtAddr, gDRV_testCtrl.tmpBufSize);
    OSA_cmemFree(gDRV_testCtrl.tmpBufVirtAddr);
  }

open_exit:
  OSA_printf(" CAPTURE: Exiting.\n");
  DRV_exit();
  OSA_printf(" CAPTURE: Bye Bye !!!\n");

  return status;
}
开发者ID:119,项目名称:ipnc,代码行数:58,代码来源:drv_captureTest.c

示例9: generate_windows

static void generate_windows(int width1, int height1, int h_start2, int v_start2, int width2, int height2, int weight,
                             unsigned char *win_coeffs)
{
    int total_pixels_1, total_pixels_2;
    int pixel_weight1, pixel_weight2;
    int max_weight;
    int shift;
    int i, j;
    float total_weight;

    /* calculate weight for each window */
    total_pixels_2 = width2 * height2;
    total_pixels_1 = width1 * height1 - total_pixels_2;

    pixel_weight1 = (100 - weight) * 65536 / total_pixels_1;
    pixel_weight2 = weight * 65536 / total_pixels_2;

#ifdef AEWB_PRINTS
    OSA_printf("weights for each window: %d, %d\n", pixel_weight1, pixel_weight2);
#endif

    /* normalize weights */
    max_weight = pixel_weight1 > pixel_weight2 ? pixel_weight1 : pixel_weight2;
    shift = 0;
    while(max_weight >= 255) {
        shift ++;
        max_weight = (max_weight + 1) >> 1;
    }
    pixel_weight1 = (pixel_weight1 + (1<<(shift-1))) >> shift;
    pixel_weight2 = (pixel_weight2 + (1<<(shift-1))) >> shift;

    if(pixel_weight2 > pixel_weight1 ) {
        pixel_weight2 = (pixel_weight1 * total_pixels_1  * weight) /
                        (total_pixels_2 * (100 - weight));
    } else {
        pixel_weight1 = (pixel_weight2 * total_pixels_2  * (100 - weight)) /
                        (total_pixels_1 * weight);
    }
    total_weight = pixel_weight1 * total_pixels_1 + pixel_weight2 * total_pixels_2;

#ifdef AEWB_PRINTS
    OSA_printf("weight = %f, %f\n", pixel_weight1 * total_pixels_1/total_weight,
               pixel_weight2 * total_pixels_2 / total_weight);
    OSA_printf("weights for each window after shifting: %d, %d, %d\n", pixel_weight1, pixel_weight2, shift);
#endif

    for(i = 0; i < height1; i ++) {
        for(j = 0; j < width1; j ++) {
            if(i >= v_start2 && i < (v_start2 + height2)
                    && j >= h_start2 && j < (h_start2 + width2)) {
                win_coeffs[i * width1 + j] = pixel_weight2;
            } else {
                win_coeffs[i * width1 + j] = pixel_weight1;
            }
        }
    }
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:57,代码来源:TI_aewb_tables_ar0331.c

示例10: VdecVdis_ipcFramesDelete

Int32  VdecVdis_ipcFramesDelete()
{
    OSA_printf("Entered:%s...",__func__);
    VdecVdis_ipcFramesDeInitThrObj(&gVdecVdis_config.ipcFrames.thrObj);
    VdecVdis_ipcFramesDeInitFrameObj(gVdecVdis_config.ipcFrames.frameObj,
                                     MCFW_IPCFRAMES_MAX_NUM_ALLOC_FRAMES);
    OSA_printf("Leaving:%s...",__func__);
    return OSA_SOK;
}
开发者ID:JammyWei,项目名称:dm8168,代码行数:9,代码来源:demo_vdec_vdis_frames_send.c

示例11: AVSERVER_init

int AVSERVER_init()
{
  int status;

  #ifdef AVSERVER_DEBUG_API
  OSA_printf(" AVSERVER API: Creating TSKs.\n");
  #endif

  status = DRV_init();
  if(status!=OSA_SOK) {
    OSA_ERROR("DRV_init()\n");
    return status;
  }

  status = ALG_sysInit();
  if(status!=OSA_SOK) {
    OSA_ERROR("ALG_sysInit()\n");
    DRV_exit();
    return status;
  }

  memset(&gAVSERVER_config, 0, sizeof(gAVSERVER_config));
  memset(&gVIDEO_ctrl, 0, sizeof(gVIDEO_ctrl));
  memset(&gAVSERVER_ctrl, 0, sizeof(gAVSERVER_ctrl));

  status |= OSA_mutexCreate(&gAVSERVER_ctrl.lockMutex);

  status |= VIDEO_captureCreate();
  //status |= VIDEO_resizeCreate();
  status |= VIDEO_streamCreate();
  status |= VIDEO_displayCreate();
  //status |= VIDEO_ldcCreate();
  //status |= VIDEO_vnfCreate();
  //status |= VIDEO_vsCreate();
  status |= VIDEO_aewbCreate();
  //status |= VIDEO_fdCreate();
  status |= VIDEO_encodeCreate();
  status |= VIDEO_swosdCreate();
  //status |= VIDEO_encryptCreate();
  status |= VIDEO_motionCreate();
  //status |= AUDIO_audioCreate();
  //status |= AUDIOPLAY_audioCreate();
  status |= AVSERVER_mainCreate();

  if(status!=OSA_SOK) {
    OSA_ERROR("AVSERVER_init()\n");
    ALG_sysExit();
    DRV_exit();
    return status;
  }

  #ifdef AVSERVER_DEBUG_API
  OSA_printf(" AVSERVER API: Creating TSKs...DONE\n");
  #endif

  return status;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:57,代码来源:avServerApi.c

示例12: send

/* Send Image data to ITT (PC) 
    Used separate send data as teh other send (Image paramset) has limited size of data send and
    breaking image data was not handled in ITT(PC) */
int IMAGE_TUNE_CmdDataSend(IMAGE_TUNE_CmdInfo *statusInfo){
	Uint32 pktDataSize = 0, dataSize = 0;
    int retVal = OSA_EFAIL;
	IMAGE_TUNE_PacketHeader packetHeader;
	IMAGE_TUNE_PacketFooter packetFooter;
	Uint32* packet;
	
	if(gDataBuff == NULL)
		return OSA_EFAIL;
  
	packet = (Uint32*)gDataBuff;
	pktDataSize = imgDataSize; //(IMAGE_TUNE_PACKET_HEADER_SIZE + packetHeader.prmSize + IMAGE_TUNE_PACKET_FOOTER_SIZE);

	packetHeader.headerMagicNum = IMAGE_TUNE_HEADER_MAGIC_NUM;
	packetHeader.checkSum		= 0;
	packetHeader.commandId		= statusInfo->commandId;
	packetHeader.commandFlags	= statusInfo->commandFlags;
	packetHeader.prmSize		= imgDataSize-IMAGE_TUNE_PACKET_HEADER_SIZE-IMAGE_TUNE_PACKET_FOOTER_SIZE-imgExtraSize;
	packetFooter.footerMagicNum = IMAGE_TUNE_FOOTER_MAGIC_NUM;
	
	memcpy( (Uint8*)packet, &packetHeader, IMAGE_TUNE_PACKET_HEADER_SIZE);
	memcpy(((Uint8*)packet + imgDataSize - IMAGE_TUNE_PACKET_FOOTER_SIZE), &packetFooter, IMAGE_TUNE_PACKET_FOOTER_SIZE);	 
	
#ifdef IMAGE_TUNE_PACKET_DEBUG
	OSA_printf(" IMAGE TUNE SERVER: Image Data Packet size is %d bytes\n", imgDataSize);
#endif
	
	// calculate check-sum
	packet[IMAGE_TUNE_CHECK_SUM_OFFSET] = IMAGE_TUNE_CalcPacketChecksum(packet);
	
	retVal = IMAGE_TUNE_ServerSendData((Uint8*)packet, pktDataSize);
	if(retVal!=OSA_SOK) {
#ifdef IMAGE_TUNE_SERVER_DEBUG                      
		OSA_printf( " IMAGE TUNE SERVER: Reply send ERROR !!!\n");						
#endif
	}

#if 0

	dataSize = WriteDataintofile((Uint8*)packet, pktDataSize, packetHeader.commandId);
	OSA_printf(" ITS: Send Image Data to ITT %d & copied %d, \n", pktDataSize, dataSize);
	OSA_printf(" ITS: imgDataSize %d, PACKET_HEADER_SIZE %d, PACKET_FOOTER_SIZE %d, imgExtraSize %d",imgDataSize,IMAGE_TUNE_PACKET_HEADER_SIZE,IMAGE_TUNE_PACKET_FOOTER_SIZE, imgExtraSize)

#endif

	if(gDataBuff != NULL){
		OSA_cmemFree(gDataBuff);
#ifdef IMAGE_TUNE_SERVER_DEBUG                      
		//OSA_printf(" IMAGE TUNE SERVER: Send Iamge Data memory released\n");
#endif
        gDataBuff = NULL;
	}

	return OSA_SOK;

}
开发者ID:119,项目名称:ipnc,代码行数:59,代码来源:imageTuneServer.c

示例13: VcapVencVdecVdis_ipcBitsExit

Int32 VcapVencVdecVdis_ipcBitsExit()
{
    OSA_printf("Entered:%s...",__func__);
    VcapVencVdecVdis_FreeBitBufDeInit();
    if (gVcapVencVdecVdis_ipcBitsCtrl.fObj.enableFWrite == TRUE){
        VcapVencVdecVdis_ipcBitsInitFileHandles();
    }
    VcapVencVdecVdis_ipcBitsDeInitDmaObj();
    VcapVencVdecVdis_ipcBitsDeInitThrObj(&gVcapVencVdecVdis_ipcBitsCtrl.thrObj);
    OSA_printf("Leaving:%s...",__func__);
    return OSA_SOK;
}
开发者ID:JammyWei,项目名称:dm8168,代码行数:12,代码来源:demo_vcap_venc_vdec_vdis_bits_rdwr.c

示例14: VIDEO_displayTskRun

int VIDEO_displayTskRun(OSA_BufInfo *pBufInfo)
{
  int status, inBufId;
  static int disFrameNum = 0;

#ifdef DISBUF_MEMCPY
  status = OSA_bufGetFull(&gVIDEO_ctrl.displayStream.bufDisplayIn, &inBufId, OSA_TIMEOUT_FOREVER);
  if(status!=OSA_SOK) {
    OSA_ERROR("OSA_bufGetFull()\n");
    return status;
  }

  #ifdef AVSERVER_DEBUG_VIDEO_DISPLAY_THR
     #ifdef AVSERVER_DEBUG_RUNNING
     OSA_printf(" DISPLAY: Get Buf %d \n", inBufId);
     #endif
  #endif

  status = DRV_displaySwitchBuf(&gVIDEO_ctrl.displayStream.displayHndl, &inBufId, 0, NULL);
#else
  if(gAVSERVER_config.displayEnable)
  {
      inBufId = (disFrameNum++ % gVIDEO_ctrl.displayStream.bufDisplayInCreatePrm.numBuf);
      status = DRV_displaySwitchBuf(&gVIDEO_ctrl.displayStream.displayHndl, &inBufId, 1, pBufInfo->virtAddr + VIDEO_BUF_HEADER_SIZE);
  }
  else
  {
      inBufId = (disFrameNum++ % gVIDEO_ctrl.displayStream.bufDisplayInCreatePrm.numBuf);
      status = DRV_displaySwitchBuf(&gVIDEO_ctrl.displayStream.displayHndl, &inBufId, 2, NULL);
  }
#endif //#ifdef DISBUF_MEMCPY

  //if(!gAVSERVER_config.displayEnable)
  //	DRV_displayEnable(&gVIDEO_ctrl.displayStream.displayHndl, FALSE);

  if(status==OSA_SOK) {
#ifdef DISBUF_MEMCPY
    OSA_bufPutEmpty(&gVIDEO_ctrl.displayStream.bufDisplayIn, inBufId);

    #ifdef AVSERVER_DEBUG_VIDEO_DISPLAY_THR
      #ifdef AVSERVER_DEBUG_RUNNING
      OSA_printf(" DISPLAY: Put Buf %d \n", inBufId);
      #endif
    #endif
#endif // #ifdef DISBUF_MEMCPY
  }

  return status;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:49,代码来源:videoDisplayThr.c

示例15: DRV_imgsTestMain

int DRV_imgsTestMain(int argc, char **argv)
{
    DRV_ImgsConfig imgsConfig;

    int status = DRV_init();
    if (status != OSA_SOK)
    {
        return status;
    }

    imgsConfig.sensorMode = DRV_IMGS_SENSOR_MODE_640x480;
    imgsConfig.fps        = 30;
    imgsConfig.binEnable  = TRUE;

    OSA_printf(" IMGS: Imager %s is selected\n", drvImgsFunc->imgsGetImagerName());

    status = drvImgsFunc->imgsOpen(&imgsConfig);
    if (status != OSA_SOK)
    {
        OSA_ERROR("DRV_imgsOpen(%d)\n", imgsConfig.sensorMode);
    }

    if (status == OSA_SOK)
    {
        drvImgsFunc->imgsEnable(TRUE);
        OSA_DEBUG_WAIT;
        drvImgsFunc->imgsEnable(FALSE);
        drvImgsFunc->imgsClose();
    }

    DRV_exit();

    return status;
}
开发者ID:JammyWei,项目名称:ipc_dm36x,代码行数:34,代码来源:drv_imgs.c


注:本文中的OSA_printf函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。