CProactiveImageSourceAdapter
The CProactiveImageSourceAdapter
class is an abstract base class that extends the CImageSourceAdapter
class. It provides an interface for proactively fetching images in a separate thread.
Definition
Namespace: dynamsoft::utility
Assembly: DynamsoftUtility
class CProactiveImageSourceAdapter: public CImageSourceAdapter
Methods Summary
Method | Description |
---|---|
FetchImage |
This method needs to be implemented in the derived class. It is called in a loop in the Fetching thread to obtain images. |
SetImageFetchInterval |
Sets the time interval for the ImageSource to wait before attempting to fetch another image to put in the buffer. |
GetImageFetchInterval |
Gets the time interval for the ImageSource to wait before attempting to fetch another image to put in the buffer. |
FetchImage
This method needs to be implemented in the derived class. It is called in a loop in the Fetching thread to obtain images.
virtual CImageData* FetchImage() = 0;
Return value
Returns a pointer to the CImageData
object representing the fetched image.
See Also
SetImageFetchInterval
Sets the time interval for the ImageSource to wait before attempting to fetch another image to put in the buffer.
void SetImageFetchInterval(int milliseconds);
Parameters
[in] milliseconds
- Specifies the wait time in milliseconds. If set to -1, the ImageSource does not proactively fetch images.
GetImageFetchInterval
Gets the time interval for the ImageSource to wait before attempting to fetch another image to put in the buffer.
int GetImageFetchInterval();
Return value
Returns the wait time in milliseconds. If the value is -1, the ImageSource does not proactively fetch images.