IDS peak comfortC v1.7.0
Loading...
Searching...
No Matches
Manual buffer preparation

Functions

peak_status peak_Acquisition_Buffer_GetRequiredSize (peak_camera_handle hCam, size_t *requiredBufferSize)
 Query the required image buffer size.
 
peak_status peak_Acquisition_Buffer_GetRequiredCount (peak_camera_handle hCam, size_t *requiredBufferCount)
 Query the required image buffer count.
 
peak_status peak_Acquisition_Buffer_Announce (peak_camera_handle hCam, uint8_t *memoryAddress, size_t memorySize, void *userContext)
 Announce an image buffer.
 
peak_status peak_Acquisition_Buffer_Revoke (peak_camera_handle hCam, uint8_t *memoryAddress)
 Revoke an image buffer.
 
peak_status peak_Acquisition_Buffer_RevokeAll (peak_camera_handle hCam)
 Revoke all image buffers.
 

Detailed Description

Manual buffer preparation related functions and types.

For a description of the libraries manual buffer preparation concept see Manual Buffer Preparation.

Function Documentation

◆ peak_Acquisition_Buffer_Announce()

peak_status peak_Acquisition_Buffer_Announce ( peak_camera_handle  hCam,
uint8_t *  memoryAddress,
size_t  memorySize,
void *  userContext 
)

Announce an image buffer.

Announces a user-allocated buffer for the receival of image data.

This function must be used only if Manual Buffer Preparation is desired.
As long as there is at least one buffer announced via peak_Acquisition_Buffer_Announce the implementation will completely rely on user-allocated buffers.

Call peak_Acquisition_Buffer_Revoke to revoke an announced buffer from the implementation.

Parameters
[in]hCamThe camera handle.
[in]memoryAddressThe memory address at which the buffer starts.
[in]memorySizeThe size of allocated buffer memory.
[in]userContextUser context pointer. The user context allows to bind a pointer to a data object to the buffer. NULL if not used.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The acquisition is active.
PEAK_STATUS_INVALID_PARAMETER memoryAddress is an invalid pointer and/or memorySize is 0.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Note
If there is at least one buffer announced via peak_Acquisition_Buffer_Announce peak_Acquisition_Start will succeed only
  • if all announced buffers are capable of storing a complete image, and
  • if the number of announced buffers is sufficient to run an acquisition.
The required buffer size can be queried via peak_Acquisition_Buffer_GetRequiredSize and the required number of buffers can be queried via peak_Acquisition_Buffer_GetRequiredCount.
The client application is responsible for the deallocation of the announced memory. The memory must be valid until peak_Acquisition_Buffer_Revoke is called for the related memory address.

◆ peak_Acquisition_Buffer_GetRequiredCount()

peak_status peak_Acquisition_Buffer_GetRequiredCount ( peak_camera_handle  hCam,
size_t *  requiredBufferCount 
)

Query the required image buffer count.

Provides the number of buffers that is required for an image acquisition.

Parameters
[in]hCamThe camera handle.
[out]requiredBufferCountThe required number of buffer.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_INVALID_PARAMETER requiredBufferCount is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_Acquisition_Buffer_GetRequiredSize()

peak_status peak_Acquisition_Buffer_GetRequiredSize ( peak_camera_handle  hCam,
size_t *  requiredBufferSize 
)

Query the required image buffer size.

Provides the buffer size that is required to receive the image data that results from the current feature configuration.

Parameters
[in]hCamThe camera handle.
[out]requiredBufferSizeThe required buffer size in bytes.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_INVALID_PARAMETER requiredBufferSize is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_Acquisition_Buffer_Revoke()

peak_status peak_Acquisition_Buffer_Revoke ( peak_camera_handle  hCam,
uint8_t *  memoryAddress 
)

Revoke an image buffer.

Revokes a previously announced buffer.

This function must be used only if Manual Buffer Preparation is desired.

Call peak_Acquisition_Buffer_Announce to announce a buffer to the implementation.

Parameters
[in]hCamThe camera handle.
[in]memoryAddressThe memory address at which the buffer starts.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The acquisition is active or the frame handle for this buffer is not released.
PEAK_STATUS_NO_DATA There is no announced buffer with the specified memory address.
PEAK_STATUS_INVALID_PARAMETER memoryAddress is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_Acquisition_Buffer_RevokeAll()

peak_status peak_Acquisition_Buffer_RevokeAll ( peak_camera_handle  hCam)

Revoke all image buffers.

Revokes all previously announced buffers.

This function must be used only if Manual Buffer Preparation is desired.

Call peak_Acquisition_Buffer_Announce to announce a buffer to the implementation.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The acquisition is active or at least one frame handle is not released.
PEAK_STATUS_NO_DATA There are no announced buffers.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.