4.3. API Reference¶
Video Input (VI) implementEnableVideo InputDevice, Video Input PIPE Create, Video InputChannelConfiguration, Dev Bind MIPI Device, PIPE Bind Dev etc.Function.
thisFunctionModuleprovidewithunderAPI:
CVI_VI_SetDevAttr: Set VI Device attributes.
CVI_VI_GetDevAttr: Get VI Device attributes.
CVI_VI_EnableDev: Enable VI Device.
CVI_VI_DisableDev: Disable VI Device.
CVI_VI_SetDevBindAttr: Set VI DeviceBindAttribute.
CVI_VI_GetDevBindAttr: Get VI DeviceBindAttribute.
CVI_VI_SetDevUnbindAttr: Set VI DevicereleaseBindAttribute.
CVI_VI_SetDevTimingAttr: SetautogeneratetimingAttribute.
CVI_VI_GetDevTimingAttr: GetautogeneratetimingAttribute.
CVI_VI_CreatePipe: Create a VI PIPE.
CVI_VI_DestroyPipe: Destroy a VI PIPE.
CVI_VI_SetPipeAttr: Set VI PIPE Attribute.
CVI_VI_GetPipeAttr: Get VI PIPE Attribute.
CVI_VI_StartPipe: Enable VI PIPE.
CVI_VI_StopPipe: Disable VI PIPE.
CVI_VI_SetPipeCrop: Set VI Physical PIPE CropFunctionAttribute.
CVI_VI_GetPipeCrop: Get VI Physical PIPE CropFunctionAttribute.
CVI_VI_SetPipeDumpAttr: Set VI Physical PIPE dump Attribute.
CVI_VI_GetPipeDumpAttr: Get VI Physical PIPE dump Attribute.
CVI_VI_SetPipeFrameSource: Set VI PIPE DataSource.
CVI_VI_GetPipeFrameSource: Get VI PIPE DataSource.
CVI_VI_GetPipeFrame: Get VI Physical PIPE Data.
CVI_VI_ReleasePipeFrame: Release VI PIPE Data.
CVI_VI_SendPipeRaw: through VI PIPE Send RAW Data.
CVI_VI_QueryPipeStatus: view VI PIPE Status.
CVI_VI_GetPipeFd: Get VI PIPE FileDescriptiondescriptor.
CVI_VI_CloseFd: Close VI FileDescriptiondescriptor.
CVI_VI_AttachVbPool: will VI Channelbind to a video bufferVBpoolin.
CVI_VI_DetachVbPool: will VI Channelunbind from a video bufferVBunbind from the pool.
CVI_VI_SetChnAttr: Set VI Channel attributes.
CVI_VI_GetChnAttr: Get VI Channel attributes.
CVI_VI_EnableChn: Enable VI Channel.
CVI_VI_DisableChn: Disable VI Channel.
CVI_VI_SetChnCrop: Set VI ChannelCropFunctionAttribute.
CVI_VI_GetChnCrop: Get VI ChannelCropFunctionAttribute.
CVI_VI_GetChnFrame: from VI ChannelGetcaptureImage.
CVI_VI_ReleaseChnFrame: ReleaseoneFramefrom VI ChannelGetImage.
CVI_VI_SetChnRotation: Set VI ChannelRotationAttribute.
CVI_VI_GetChnRotation: Get VI ChannelRotationAttribute.
CVI_VI_RegChnFlipMirrorCallBack: register VI ChannelflipimagecallbackFunction.
CVI_VI_UnRegChnFlipMirrorCallBack: unregister VI ChannelflipimagecallbackFunction.
CVI_VI_SetChnFlipMirror: Set VI ChannelflipimageAttribute.
CVI_VI_GetChnFlipMirror: Get VI ChannelflipimageAttribute.
CVI_VI_Suspend: VI Device.
CVI_VI_Resume: VI Device.
CVI_VI_SetDevNum: Set VI DeviceQuantity.
CVI_VI_GetDevNum: Get VI DeviceQuantity.
CVI_VI_EnablePatgen: Enable VI patternMode.
CVI_VI_StartSmoothRawDump: startdumpsmoothrawFigure.
CVI_VI_StopSmoothRawDump: stopdumpsmoothrawFigure.
CVI_VI_GetSmoothRawDump: GetdumpundertosmoothrawFigure.
CVI_VI_PutSmoothRawDump: setdumpundertosmoothrawFigure.
CVI_VI_DumpHwRegisterToFile: DownloadHardwareregisterDatatospecifiedFile.
CVI_VI_QueryChnStatus: view VI ChannelStatus.
CVI_VI_RegPmCallBack: register VI DeviceelectricalsourcecallbackFunction.
CVI_VI_UnRegPmCallBack: unregister VI DeviceelectricalsourcecallbackFunction.
CVI_VI_SetTuningDis: SettuningParameter.
CVI_VI_QueryDevStatus: Get VI DeviceStatus.
CVI_VI_Trig_AHD: SetAHDdevice.
CVI_VI_SetExtChnAttr: Set VI ChannelextendedAttribute.
CVI_VI_GetExtChnAttr: Get VI ChannelextendedAttribute.
4.3.1. CVI_VI_SetDevAttr¶
Description
Set VI Device attributes. thisDevice attributesdefaultpartProcessorConfiguration.
Syntax
CVI_S32 CVI_VI_SetDevAttr(VI_DEV ViDev, const VI_DEV_ATTR_S *pstDevAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
pstDevAttr | VI Device attributesPointer. staticAttribute. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
inCallbefore VI DevicetoDisableStatus. If VI DevicealreadytoEnableStatus, canUse CVI_VI_DisableDev toDisableDevice.
Parameter pstDevAttr maintoConfigurationspecified VI DeviceVideoInterfaceMode, used to withoutsidearea camera, sensor or codec forconnect, SupportInterfaceModeincluding MIPI_RX (MIPI/LVDS/HISPI).
Userneed toConfigurationwithunderInformation, specificAttributeSee“ Data Types ”partDescription:
InterfaceModeInformation: InterfaceModeis MIPI Rx (MIPI/LVDS/HISPI) etc.Mode
Operating modeInformation: 1 combinedMode
DataInformation: YUVDataInputunderDatalayout
DataInformation: RGB, YUV DataInput
synchronizationtimingInformation: Vertical, HorizontalsynchronizationsignalAttribute
Example
VI_DEV_ATTR_S DEV_ATTR_IMX327_2M_BASE = { VI_MODE_MIPI, VI_WORK_MODE_1Multiplex, VI_SCAN_PROGRESSIVE, {-1, -1, -1, -1}, VI_DATA_SEQ_YUYV, { /*port_vsync port_vsync_neg port_hsync port_hsync_neg */ VI_VSYNC_PULSE, VI_VSYNC_NEG_LOW, VI_HSYNC_VALID_SINGNAL, VI_HSYNC_NEG_HIGH, VI_VSYNC_VALID_SIGNAL, VI_VSYNC_VALID_NEG_HIGH, /*hsync_hfb hsync_act hsync_hhb*/ {0,1920, 0, /*vsync0_vhb vsync0_act vsync0_hhb*/ 0,1080, 0, /*vsync1_vhb vsync1_act vsync1_hhb*/ 0,0,0} }, VI_DATA_TYPE_RGB, {1920, 1080}, { WDR_MODE_NONE, 1080 }, .enBayerFormat = BAYER_FORMAT_RG, }; int main(void) { CVI_SNS_TYPE_E enSnsType = SONY_IMX327_MIPI_2M_30FPS_12BIT; VI_DEV_ATTR_S stViDevAttr; SAMPLE_COMM_VI_GetDevAttrBySns(enSnsType, &stViDevAttr); s32Ret = CVI_VI_SetDevAttr(0, &stViDevAttr); if (s32Ret != CVI_SUCCESS) { SAMPLE_PRT("CVI_VI_SetDevAttr failed with %#x\n", s32Ret); return s32Ret; } s32Ret = CVI_VI_EnableDev(0); if (s32Ret != CVI_SUCCESS) { SAMPLE_PRT("CVI_VI_EnableDev failed with %#x\n", s32Ret); return s32Ret; } CVI_VI_DisableDev(0); s32Ret = CVI_VI_StopPipe(ViPipe); if (s32Ret != CVI_SUCCESS) { SAMPLE_PRT("CVI_VI_StopPipe failed with %#x!\n", s32Ret); return s32Ret; } s32Ret = CVI_VI_DestroyPipe(ViPipe); if (s32Ret != CVI_SUCCESS) { SAMPLE_PRT("CVI_VI_DestroyPipe failed with %#x!\n", s32Ret); return s32Ret; } } Related Topics
4.3.2. CVI_VI_GetDevAttr¶
Description
Get VI Device attributes.
Syntax
CVI_S32 CVI_VI_GetDevAttr(VI_DEV ViDev, VI_DEV_ATTR_S *pstDevAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
pstDevAttr | VI Device attributesPointer. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
If the VI device attributes are not set, this interface returns failure.
Example
None
Related Topics
4.3.3. CVI_VI_EnableDev¶
Description
Enable VI Device.
Syntax
CVI_S32 CVI_VI_EnableDev(VI_DEV ViDev); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
If the VI device attributes are not set, this interface returns failure.
CV184xSupportat the same timebootthreeitemVI DEV.
Example
None
Related Topics
4.3.4. CVI_VI_DisableDev¶
Description
Disable VI Device.
Syntax
CVI_S32 CVI_VI_DisableDev(VI_DEV ViDev); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
recommendfirstDestroythehaswiththisVI DeviceBindPhysical PIPE after, thenDisable VI Device.
Disable VI DeviceafterwillcompletelyClosethisDevice, need toagainSetAttribute, canEnableVIDevice.
Example
None
Related Topics
4.3.5. CVI_VI_SetDevBindAttr¶
Description
Set VI DeviceBindAttribute.
Syntax
CVI_S32 CVI_VI_SetDevBindAttr(VI_DEV ViDev, const VI_DEV_BIND_PIPE_S *pstDevBindAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input/Output |
pstDevBindPipe | Bindto Dev Physical PIPE InformationStructurePointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
must firstEnable VI DeviceaftercanBindPhysical PIPE.
This interface is currently unused.
Example
None
Related Topics
4.3.6. CVI_VI_GetDevBindAttr¶
Description
Get VI DeviceBindAttribute.
Syntax
CVI_S32 CVI_VI_GetDevBindAttr(VI_DEV ViDev, VI_DEV_BIND_PIPE_S *pstDevBindAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input/Output |
pstDevBindAttr | DeviceBindAttribute. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, enable the device and bind the physical PIPE; otherwise, it returns failure.
This interface is currently unused.
Example
None
Related Topics
4.3.7. CVI_VI_SetDevUnbindAttr¶
Description
Set VI DevicereleaseBindAttribute.
Syntax
CVI_S32 CVI_VI_SetDevUnbindAttr(VI_DEV ViDev); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input/Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, enable the device and bind the physical PIPE; otherwise, it returns failure.
This interface is currently unused.
Example
None
Related Topics
None
4.3.8. CVI_VI_SetDevTimingAttr¶
Description
SetautogeneratetimingAttribute.
Syntax
CVI_S32 CVI_VI_SetDevTimingAttr(VI_DEV ViDev, const VI_DEV_TIMING_ATTR_S *pstTimingAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
pstTimingAttr | See VI_DEV_TIMING_ATTR_S Description. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
UsethisInterfacebefore, need tofirstConfiguration DEV Attribute, andEnableDevice, otherwise, it returnsFailure.
UseautogeneratetimingFunctionfeed RAW time, need toConfiguration DEV/ PIPE/ CHN width and heightwith RAW Filewidth and heightonecause.
Enableautogeneratetimingafter, If notfeed RAW, thenNoneImageDisplay; feed RAW MethodPlease refer to CVI_VI_SendPipeRaw Description.
Enableautogeneratetimingafter, VI Output frame ratebyConfigurationautogeneratetiminggenerateValidFrame ratedetermine.
Example
None
Related Topics
4.3.9. CVI_VI_GetDevTimingAttr¶
Description
GetautogeneratetimingAttribute.
Syntax
CVI_S32 CVI_VI_GetDevTimingAttr(VI_DEV ViDev, VI_DEV_TIMING_ATTR_S *pstTimingAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI device number. Value range: [0, VI_MAX_DEV_NUM). | Input |
pstTimingAttr | See VI_DEV_TIMING_ATTR_S Description. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
UsethisInterfacebefore, need tofirstConfiguration DevTimingAttr, andEnableDevice, otherwise, it returnsFailure.
Example
None
Related Topics
4.3.10. CVI_VI_CreatePipe¶
Description
Create a VI PIPE.
Syntax
CVI_S32 CVI_VI_CreatePipe(VI_PIPE ViPipe, const VI_PIPE_ATTR_S *pstPipeAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
pstPipeAttr | PIPE attribute structure pointer. See VI_PIPE_ATTR_S Description. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Not supportedrepeatCreate.
Example
None
Related Topics
4.3.11. CVI_VI_DestroyPipe¶
Description
Destroy a VI PIPE.
Syntax
CVI_S32 CVI_VI_DestroyPipe(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
pstPipeAttr | PIPE Attribute StructurebodyPointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
innot created PIPE orrepeatDestroy PIPE time, CallthisInterface, willprovide PIPE does not exist.
Example
None
Related Topics
4.3.12. CVI_VI_SetPipeAttr¶
Description
Set VI PIPE Attribute.
Syntax
CVI_S32 CVI_VI_SetPipeAttr(VI_PIPE ViPipe, const VI_PIPE_ATTR_S *pstPipeAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
pstPipeAttr | PIPE attribute structure pointer. See VI_PIPE_ATTR_S Description | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe; otherwise, it reports a failure.
PIPE Attributemustvalid, wherepartstaticAttributenotcandynamicSet, specificSee VI_PIPE_ATTR_S.
Example
None
Related Topics
None
4.3.13. CVI_VI_GetPipeAttr¶
Description
Get VI PIPE Attribute.
Syntax
CVI_S32 CVI_VI_GetPipeAttr(VI_PIPE ViPipe, VI_PIPE_ATTR_S *pstPipeAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
pstPipeAttr | PIPE attribute structure pointer. See VI_PIPE_ATTR_S Description. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_SetPipeAttr.
Example
None
Related Topics
4.3.14. CVI_VI_StartPipe¶
Description
Enable VI PIPE.
Syntax
CVI_S32 CVI_VI_StartPipe(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe.
Example
None
Related Topics
4.3.15. CVI_VI_StopPipe¶
Description
Disable VI PIPE.
Syntax
CVI_S32 CVI_VI_StopPipe(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, the PIPE must have been created.
Example
None
Related Topics
4.3.16. CVI_VI_SetPipeCrop¶
Description
Set VI Physical PIPE CropFunctionAttribute.
Syntax
CVI_S32 CVI_VI_SetPipeCrop(VI_PIPE ViPipe, const CROP_INFO_S *pstCropInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI Physical PIPE number. | Input |
pstCropInfo | CropFunctionParameterStructurePointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, the PIPE must have been created.
thisInterfacewith CVI_VI_SetChnCrop hassameeffective.
Example
None
Related Topics
None
4.3.17. CVI_VI_GetPipeCrop¶
Description
Get VI Physical PIPE CropFunctionAttribute.
Syntax
CVI_S32 CVI_VI_GetPipeCrop(VI_PIPE ViPipe, CROP_INFO_S *pstCropInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI Physical PIPE number. | Input |
pstCropInfo | CropFunctionParameterStructurePointer. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, the PIPE must have been created.
Example
None
Related Topics
None
4.3.18. CVI_VI_SetPipeDumpAttr¶
Description
Set VI Physical PIPE dump Attribute.
Syntax
CVI_S32 CVI_VI_SetPipeDumpAttr(VI_PIPE ViPipe, const VI_DUMP_ATTR_S *pstDumpAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | Physical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input/Output |
pstDumpAttr | VI Physical PIPE dump Attribute. See VI_DUMP_ATTR_S Description | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
SupportDump 12-bitCompression/6-bitCompressionRAWData.
If isYUVDataIt is recommended to UseCVI_VI_GetChnFrame.
currentlyNot supportedDump IRData.
Example
None
Related Topics
None
4.3.19. CVI_VI_GetPipeDumpAttr¶
Description
Get VI Physical PIPE dump Attribute.
Syntax
CVI_S32 CVI_VI_GetPipeDumpAttr(VI_PIPE ViPipe, VI_DUMP_ATTR_S *pstDumpAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | Physical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
pstDumpAttr | VI Physical PIPE dump Attribute. See VI_DUMP_ATTR_S Description. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created.
Example
None
Related Topics
4.3.20. CVI_VI_SetPipeFrameSource¶
Description
Set VI PIPE DataSource.
Syntax
CVI_S32 CVI_VI_SetPipeFrameSource(VI_PIPE ViPipe, const VI_PIPE_FRAME_SOURCE_E enSource); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
enSource | PIPE DataSource. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created.
Example
None
Related Topics
None
4.3.21. CVI_VI_GetPipeFrameSource¶
Description
Get VI PIPE DataSource.
Syntax
CVI_S32 CVI_VI_GetPipeFrameSource(VI_PIPE ViPipe, VI_PIPE_FRAME_SOURCE_E *penSource); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
penSource | PIPE DataSource. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created.
Example
None
Related Topics
None
4.3.22. CVI_VI_GetPipeFrame¶
Description
Get VI Physical PIPE Data.
Syntax
CVI_S32 CVI_VI_GetPipeFrame(VI_PIPE ViPipe, VIDEO_FRAME_INFO_S *pstVideoFrame, CVI_S32 s32MilliSec); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | Physical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
pstVideoFrame | VI PIPE DataInformationPointer. | Output |
s32MilliSec | TimeoutParameter, TimeouttimeUnitismilliseconds (ms). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created.
Call CVI_VI_SetPipeDumpAttr Set dump Attribute, Enable dump, Set depth, otherwiseGetnotto raw Data.
TimeoutParameter s32MilliSec, SetRangeMinimumis0.
Example
None
Related Topics
4.3.23. CVI_VI_ReleasePipeFrame¶
Description
Release VI PIPE Data.
Syntax
CVI_S32 CVI_VI_ReleasePipeFrame(VI_PIPE ViPipe, const VIDEO_FRAME_INFO_S *pstVideoFrame); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | Physical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
pstVideoFrame | VI PIPE DataInformationPointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
thisInterfaceneed towith CVI_VI_GetPipeFrame matchUse, GetPipeFrameafternotReleasewillcausesystemInsufficient memory, whileaffectVIoperation.
Usermust ensure pstVideoFrame structureinInformationwithGetPipeFrametimeonecause, otherwisewillcauseReleasenotSuccess.
Example
None
Related Topics
4.3.24. CVI_VI_SendPipeRaw¶
Description
through VI PIPE Send RAW Data.
Syntax
CVI_S32 CVI_VI_SendPipeRaw(CVI_U32 u32PipeNum, VI_PIPE PipeId[], const VIDEO_FRAME_INFO_S *pstVideoFrame[], CVI_S32 s32MilliSec); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
u32PipeNum | Pipe Count, fixed1value. | Input |
PipeId | PIPE numbernumbergroup, Countis u32PipeNum. | Input/Output |
pstVideoFrame | RAW DataInformation. | Input |
s32MilliSec | TimeoutParameter, greater than 0 meansTimeoutMode, TimeouttimeUnitismilliseconds (ms). | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created and started.
send RAW First, need tothrough CVI_VI_SetPipeFrameSource toSet PIPE DataSource.
SupportUserautoDefinitiontimingfeed RAW.
onlySupportsendMode RAW Data.
Example
None
Related Topics
4.3.25. CVI_VI_QueryPipeStatus¶
Description
Query VI PIPE Status.
Syntax
CVI_S32 CVI_VI_QueryPipeStatus(VI_PIPE ViPipe, VI_PIPE_STATUS_S *pstStatus); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
pstStatus | PIPE StatusInformation. | Input/Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created and started.
Example
None
Related Topics
None
4.3.26. CVI_VI_GetPipeFd¶
Description
Get VI PIPE FileDescriptiondescriptor.
Syntax
CVI_S32 CVI_VI_GetPipeFd(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created and started.
DUAL_OSUnavailable.
Example
None
Related Topics
None
4.3.27. CVI_VI_CloseFd¶
Description
Close VI FileDescriptiondescriptor.
Syntax
CVI_S32 CVI_VI_CloseFd(void); Parameters
None
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
DUAL_OSUnavailable.
Example
None
Related Topics
None
4.3.28. CVI_VI_AttachVbPool¶
Description
will VI Channelbind to a video bufferVBpoolin.
Syntax
CVI_S32 CVI_VI_AttachVbPool(VI_PIPE ViPipe, VI_CHN ViChn, VB_POOL VbPool); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
VbPool | Video buffer VB pool information. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vb.h
Library files: libvi.a
Note
ViPipe and ViChn must be within the value range.
VbPool must be a valid pool ID for a created VB pool.
Example
None
Related Topics
None
4.3.29. CVI_VI_DetachVbPool¶
Description
will VI Channelunbind from a video bufferVBunbind from the pool.
Syntax
CVI_S32 CVI_VI_DetachVbPool(VI_PIPE ViPipe, VI_CHN ViChn); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h
Library files: libvi.a
Note
ViPipe and ViChn must be within the value range.
VbPool must be a valid pool ID for a created VB pool.
need tofirstCallAttahcGet.
Example
None
Related Topics
None
4.3.30. CVI_VI_SetChnAttr¶
Description
Set VI Channel attributes.
Syntax
CVI_S32 CVI_VI_SetChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_CHN_ATTR_S *pstChnAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstChnAttr | VI channel attribute structure pointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
target imageSize stSize: mustConfiguration, andSizeneed toin VI SupportRangein.
Pixel format enPixelFormat: OutputPixel formatSupport NV21.
Frame rateControl stFrameRate: Not supportedFrame rateControl.
Example
None
Related Topics
None
4.3.31. CVI_VI_GetChnAttr¶
Description
Get VI Channel attributes.
Syntax
CVI_S32 CVI_VI_GetChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_CHN_ATTR_S *pstChnAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstChnAttr | VI channel attribute structure pointer. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
Channel attributesneed tofirstSetafter, canGet.
Example
None
Related Topics
None
4.3.32. CVI_VI_EnableChn¶
Description
Enable VI Channel.
Syntax
CVI_S32 CVI_VI_EnableChn(VI_PIPE ViPipe, VI_CHN ViChn); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
must firstSetChannel attributes.
Not supportedrepeatEnable VI Channel.
Example
None
Related Topics
None
4.3.33. CVI_VI_DisableChn¶
Description
Disable VI Channel.
Syntax
CVI_S32 CVI_VI_DisableChn(VI_PIPE ViPipe, VI_CHN ViChn); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
must firstSetChannel attributes.
VI ChannelmustfirstEnable.
Example
None
Related Topics
None
4.3.34. CVI_VI_SetChnCrop¶
Description
Set VI ChannelCropFunctionAttribute.
Syntax
CVI_S32 CVI_VI_SetChnCrop(VI_PIPE ViPipe, VI_CHN ViChn, const VI_CROP_INFO_S *pstCropInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstCropInfo | CropFunctionParameterStructurePointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
UsethisAPIperform Crop, willpartimage.
UsethisAPIperform Cropafter, VPSSInputsizemustandpstCropInfosizeone.
Example
None
Related Topics
None
4.3.35. CVI_VI_GetChnCrop¶
Description
Get VI ChannelCropFunctionAttribute.
Syntax
CVI_S32 CVI_VI_GetChnCrop(VI_PIPE ViPipe, VI_CHN ViChn, VI_CROP_INFO_S *pstCropInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstCropInfo | CropFunctionParameterStructurePointer | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
must firstUseSetChnCropSetAttribute, canGetAttribute.
Example
None
Related Topics
None
4.3.36. CVI_VI_GetChnFrame¶
Description
from VI ChannelGetcaptureImage.
Syntax
CVI_S32 CVI_VI_GetChnFrame(VI_PIPE ViPipe, VI_CHN ViChn, VIDEO_FRAME_INFO_S *pstFrameInfo, CVI_S32 s32MilliSec); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstFrameInfo | VI FrameInformationstructurePointer. | Output |
s32MilliSec | TimeoutParameter, -1 meansblockingMode; 0 meansblockingMode; greater than 0 meansTimeoutMode, TimeouttimeUnitismilliseconds (ms). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
must firstSetChannel attributes.
GetPhysicalAddressInformationfrominternalUse VideoBuffer, thereforeUsecompleteafter that, mustCall CVI_VI_ReleaseChnFrame InterfaceReleaseitsMemory.
pstFrameInfo->stVFrame.u64PhyAddr[0] and pstFrameInfo->stVFrame.u64PhyAddr[1]/[2] refers totoImageBrightnesscomponentandchromacomponentPhysicalAddress.
If u32MilliSec setis -1 time, meansblockingMode, programoneetc.pending, toGettoImageReturn.
If u32MilliSec greater than 0 time, meansblockingMode, ParameterUnitismilliseconds, refers toTimeouttime, inthistimeinIf nothasGettoImage, thenTimeoutReturn.
Example
None
Related Topics
4.3.37. CVI_VI_ReleaseChnFrame¶
Description
ReleaseoneFramefrom VI ChannelGetImage.
Syntax
CVI_S32 CVI_VI_ReleaseChnFrame(VI_PIPE ViPipe, VI_CHN ViChn, const VIDEO_FRAME_INFO_S *pstFrameInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pstFrameInfo | VI FrameInformationstructurePointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
The PIPE must have been created; otherwise, failure is returned.
must firstSetChannel attributes.
thisInterfacemustwith CVI_VI_GetChnFrame forUse.
Usermust ensure pstFrameInfo structureinInformationwithGettimeonecause, otherwisecancancauseReleasenotSuccess.
Example
None
Related Topics
4.3.38. CVI_VI_SetChnRotation¶
Description
Set VI ChannelRotationAttribute.
Syntax
CVI_S32 CVI_VI_SetChnRotation(VI_PIPE ViPipe, VI_CHN ViChn, const ROTATION_E enRotation); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VIPhysical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
ViChn | VIPhysicalChannel number.Value Range: [0, VI_MAX_PHY_CHN_NUM - 1). | Input |
enRotation | RotationAttribute. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe; otherwise, it reports a failure.
This attribute can be set only after setting the channel attributes.
onlySupportYUV420 PlanarandYUV400twoFormatRotation.
RotationafterChannelOutputImageMemorySizecancanoccur, butfromChanneltheGetsizestillisthisUserSetvalue. For example1920x1080InputImage, Rotation90after, actualOutputis1080x1920.
Not supported in VI_ONLINE_VPSS_ONLINE or VI_OFFLINE_VPSS_ONLINE mode.
Example
None
Related Topics
None
4.3.39. CVI_VI_GetChnRotation¶
Description
Get VI ChannelRotationAttribute.
Syntax
CVI_S32 CVI_VI_GetChnRotation(VI_PIPE ViPipe, VI_CHN ViChn, ROTATION_E *penRotation); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VIPhysical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
ViChn | VIPhysicalChannel number.Value Range: [0, VI_MAX_PHY_CHN_NUM - 1). | Input |
penRotation | RotationAttributePointer. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe (ViPipe), otherwise, it reportsFailure.
Not supported in VI_ONLINE_VPSS_ONLINE or VI_OFFLINE_VPSS_ONLINE mode.
Example
None
Related Topics
4.3.40. CVI_VI_SetChnLDCAttr¶
Description
Set VI ChannelLens distortion correction attributes.
Syntax
CVI_S32 CVI_VI_SetChnLDCAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_LDC_ATTR_S *pstLDCAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VIPhysical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
ViChn | VIPhysicalChannel number.Value Range: [0, VI_MAX_PHY_CHN_NUM - 1). | Input |
pstLDCAttr | Lens distortion correction attributes. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe; otherwise, it reports a failure.
This attribute can be set only after setting the channel attributes.
Not supported in VI_ONLINE_VPSS_ONLINE or VI_OFFLINE_VPSS_ONLINE mode.
Example
None
Related Topics
4.3.41. CVI_VI_GetChnLDCAttr¶
Description
Get VI ChannelLens distortion correction attributes.
Syntax
CVI_S32 CVI_VI_GetChnLDCAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_LDC_ATTR_S *pstLDCAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VIPhysical PIPE number.Value Range: [0, VI_MAX_PHY_PIPE_NUM - 1). | Input |
ViChn | VIPhysicalChannel number.Value Range: [0, VI_MAX_PHY_CHN_NUM - 1). | Input |
pstLDCAttr | Lens distortion correction attributes. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Before using this interface, call CVI_VI_CreatePipe; otherwise, it reports a failure.
Not supported in VI_ONLINE_VPSS_ONLINE or VI_OFFLINE_VPSS_ONLINE mode.
Example
None
Related Topics
4.3.42. CVI_VI_RegChnFlipMirrorCallBack¶
Description
register VI ChannelflipimagecallbackFunction.
Syntax
CVI_S32 CVI_VI_RegChnFlipMirrorCallBack(VI_PIPE ViPipe, VI_DEV ViDev, void *pvData); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViDev | VI Device number. | Input |
pvData | callback functionPointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.43. CVI_VI_UnRegChnFlipMirrorCallBack¶
Description
unregister VI ChannelflipimagecallbackFunction.
Syntax
CVI_S32 CVI_VI_UnRegChnFlipMirrorCallBack(VI_PIPE ViPipe, VI_DEV ViDev); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViDev | VI Device number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.44. CVI_VI_SetChnFlipMirror¶
Description
Set VI ChannelflipimageAttribute.
Syntax
CVI_S32 CVI_VI_SetChnFlipMirror(VI_PIPE ViPipe, VI_CHN ViChn, CVI_BOOL bFlip, CVI_BOOL bMirror); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
bFlip | flipEnable switch. | Input |
bMirror | imageEnable switch. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Usebeforeneed tofirstCall CVI_VI_RegChnFlipMirrorCallBack registercallback function, otherwise, it reportsFailure.
Example
None
Related Topics
4.3.45. CVI_VI_GetChnFlipMirror¶
Description
Get VI ChannelflipimageAttribute.
Syntax
CVI_S32 CVI_VI_GetChnFlipMirror(VI_PIPE ViPipe, VI_CHN ViChn, CVI_BOOL *pbFlip, CVI_BOOL *pbMirror); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number. | Input |
ViChn | VI Channel number. | Input |
pbFlip | flipAttribute. | Output |
pbMirror | imageAttribute. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.46. CVI_VI_Suspend¶
Description
VI Device.
Syntax
CVI_S32 CVI_VI_Suspend(void); Parameters
None
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h
Library files: libvi.a
Note
need toinInitializeVIModuleofafterCall
Example
None
Related Topics
4.3.47. CVI_VI_Resume¶
Description
VI Device.
Syntax
CVI_S32 CVI_VI_Resume(void); Parameters
None
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h
Library files: libvi.a
Note
need toinVIModuleperform suspendofafterUse
Example
None
Related Topics
4.3.48. CVI_VI_SetDevNum¶
Description
Set VI DeviceQuantity.
Syntax
CVI_S32 CVI_VI_SetDevNum(CVI_U32 devNum); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
devNum | VI DeviceQuantity. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.49. CVI_VI_GetDevNum¶
Description
Get VI DeviceQuantity.
Syntax
CVI_S32 CVI_VI_GetDevNum(CVI_U32 devNum); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
devNum | VI DeviceQuantity. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.50. CVI_VI_EnablePatgen¶
Description
Enable VI patternMode.
Syntax
CVI_S32 CVI_VI_EnablePatgen(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | Pipe number. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.51. CVI_VI_StartSmoothRawDump¶
Description
startdumpsmoothrawFigure.
Syntax
CVI_S32 CVI_VI_StartSmoothRawDump(const VI_SMOOTH_RAW_DUMP_INFO_S *pstDumpInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
pstDumpInfo | Information structure pointer for dumping smooth RAW images from VI | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.52. CVI_VI_StopSmoothRawDump¶
Description
stopdumpsmoothrawFigure.
Syntax
CVI_S32 CVI_VI_StopSmoothRawDump(const VI_SMOOTH_RAW_DUMP_INFO_S *pstDumpInfo); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
pstDumpInfo | Information structure pointer for dumping smooth RAW images from VI | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.53. CVI_VI_GetSmoothRawDump¶
Description
GetdumpundertosmoothrawFigure.
Syntax
CVI_S32 CVI_VI_GetSmoothRawDump(VI_PIPE ViPipe, VIDEO_FRAME_INFO_S *pstVideoFrame, CVI_S32 s32MilliSec); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number | Input |
pstVideoFrame | rawDataInformation | Output |
s32MilliSec | TimeoutParameter, -1 meansblockingMode; 0 meansblockingMode; greater than 0 meansTimeoutMode, TimeouttimeUnitismilliseconds (ms). | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.54. CVI_VI_PutSmoothRawDump¶
Description
setdumpundertosmoothrawFigure.
Syntax
CVI_S32 CVI_VI_PutSmoothRawDump(VI_PIPE ViPipe, const VIDEO_FRAME_INFO_S *pstVideoFrame); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number | Input |
pstVideoFrame | rawDataInformation | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.55. CVI_VI_DumpHwRegisterToFile¶
Description
DownloadHardwareregisterDatatospecifiedFile.
Syntax
CVI_S32 CVI_VI_DumpHwRegisterToFile(VI_PIPE ViPipe, FILE *fp, VI_DUMP_REGISTER_TABLE_S *pstRegTbl); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number | Input |
fp | FileDescriptiondescriptor | Input |
pstRegTbl | HardwareregisterDataPointer | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.56. CVI_VI_QueryChnStatus¶
Description
view VI ChannelStatus.
Syntax
CVI_S32 CVI_VI_QueryChnStatus(VI_PIPE ViPipe, VI_CHN ViChn, VI_CHN_STATUS_S *pstChnStatus); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number | Input |
ViChn | VIChannel number | Input |
pstChnStatus | VI DeviceChannelStatusStructurePointer | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.57. CVI_VI_RegPmCallBack¶
Description
register VI DeviceelectricalsourcecallbackFunction.
Syntax
CVI_S32 CVI_VI_RegPmCallBack(VI_DEV ViDev, VI_PM_OPS_S *pstPmOps, void *pvData); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI Device number | Input |
pstPmOps | VI DeviceelectricalsourceoperationStructurePointer | Input |
pvData | UserhasDataPointer | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.58. CVI_VI_UnRegPmCallBack¶
Description
unregister VI DeviceelectricalsourcecallbackFunction.
Syntax
CVI_S32 CVI_VI_UnRegPmCallBack(VI_DEV ViDev); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViDev | VI Device number | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
4.3.59. CVI_VI_SetTuningDis¶
Description
SettuningParameter.
Syntax
CVI_S32 CVI_VI_SetTuningDis(CVI_S32 ctrl, CVI_S32 fe, CVI_S32 be, CVI_S32 post); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ctrl | ControlChannelParameter | Input |
fe | feControlParameter | Inputbe |
be | beControlParameter | Input |
post | postControlParameter | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
Supports DUAL OS only
Example
None
Related Topics
None
4.3.60. CVI_VI_QueryDevStatus¶
Description
Get VI DeviceStatus.
Syntax
CVI_S32 CVI_VI_QueryDevStatus(VI_PIPE ViPipe); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | PIPE number | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
None
Example
None
Related Topics
None
4.3.61. CVI_VI_Trig_AHD¶
Description
SetAHDdevice.
Syntax
CVI_S32 CVI_VI_Trig_AHD(VI_PIPE ViPipe, CVI_U8 u8AHDSignal); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
u8AHDSignal | AHDEnableflag. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
UsethisInterfaceneed toUseAHDsensor, normalUseNoneneed toCallthisInterface.
Interfacecurrentlytime.
Example
None
Related Topics
None
4.3.62. CVI_VI_SetExtChnAttr¶
Description
SetextendedChannel attributes.
Syntax
CVI_S32 CVI_VI_SetExtChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, const VI_EXT_CHN_ATTR_S *pstExtChnAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
ViChn | VI Channel number. | Input |
pstExtChnAttr | VI channel extended attribute structure pointer. | Input |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
This interface is currently unused.
Example
None
Related Topics
4.3.63. CVI_VI_GetExtChnAttr¶
Description
GetextendedChannel attributes.
Syntax
CVI_S32 CVI_VI_GetExtChnAttr(VI_PIPE ViPipe, VI_CHN ViChn, VI_EXT_CHN_ATTR_S *pstExtChnAttr); Parameters
Parameter Name | Description | Input/Output |
|---|---|---|
ViPipe | VI PIPE number. Value range: [0, VI_MAX_PIPE_NUM). | Input |
ViChn | VI Channel number. | Input |
pstExtChnAttr | VI channel extended attribute structure pointer. | Output |
Return Value
Return Value | Description |
|---|---|
0 | Success. |
Non-zero | Failure; see Error Codes. |
Requirements
Header files: cvi_vi.h, cvi_comm_vi.h
Library files: libvi.a
Note
This interface is currently unused.
Example
None
Related Topics