Class which receives frames from the device in background thread and provides the latest one via an interface. This helps avoiding getting old frames because of buffering of data within the network infrastructure. It also handles automatically reconnects in case of connection issues.
More...
#include <FrameGrabber.h>
|
| FrameGrabber (const std::string &hostname, std::uint16_t port, std::uint32_t timeoutMs) |
|
bool | getCurrentFrame (std::shared_ptr< DataType > &pDataHandler) |
|
bool | getNextFrame (std::shared_ptr< DataType > &pDataHandler, std::uint32_t timeoutMs=1000) |
|
| ~FrameGrabber () |
|
template<class DataType>
class visionary::FrameGrabber< DataType >
Class which receives frames from the device in background thread and provides the latest one via an interface. This helps avoiding getting old frames because of buffering of data within the network infrastructure. It also handles automatically reconnects in case of connection issues.
Definition at line 20 of file FrameGrabber.h.
◆ FrameGrabber()
template<class DataType >
◆ ~FrameGrabber()
template<class DataType >
◆ getCurrentFrame()
template<class DataType >
Gets the current blob from the connected device
- Parameters
-
[in,out] | pDataHandler | an (empty) pointer where the blob will be stored in |
- Return values
-
true | a blob was available and has been stored in pDataHandler Pointer |
false | No blob was available |
Definition at line 53 of file FrameGrabber.h.
◆ getNextFrame()
template<class DataType >
bool visionary::FrameGrabber< DataType >::getNextFrame |
( |
std::shared_ptr< DataType > & |
pDataHandler, |
|
|
std::uint32_t |
timeoutMs = 1000 |
|
) |
| |
|
inline |
Gets the next blob from the connected device
- Parameters
-
[in,out] | pDataHandler | an (empty) pointer where the blob will be stored in |
[in] | timeoutMs | controls the timeout how long to wait for a new blob, default 1000ms |
- Return values
-
true | New blob has been received and stored in pDataHandler Pointer |
false | No new blob has been received |
Definition at line 38 of file FrameGrabber.h.
◆ frameGrabberBase
template<class DataType >
The documentation for this class was generated from the following file: