|
libfreenect2 0.4
Open source driver for the Kinect for Windows v2 (K4W2) sensor
|
Collect timestamp-aligned combinations of multiple frame types. More...
#include <libfreenect2/frame_listener_impl.h>
Classes | |
| struct | Statistics |
| Snapshot of listener delivery and drop counters. More... | |
Public Member Functions | |
| TimestampAlignedFrameListener (unsigned int frame_types, uint32_t max_delta_ticks, size_t queue_capacity=8) | |
| virtual | ~TimestampAlignedFrameListener () |
| bool | hasNewFrame () const |
| Test whether an aligned frame set is ready. | |
| bool | waitForNewFrame (FrameMap &frame, int milliseconds) |
| Wait milliseconds for an aligned frame set. | |
| void | waitForNewFrame (FrameMap &frame) |
| Wait indefinitely for an aligned frame set. | |
| void | release (FrameMap &frame) |
Delete all frames in frame. | |
| Statistics | getStatistics () const |
| Return a thread-safe snapshot of the listener statistics. | |
| virtual bool | onNewFrame (Frame::Type type, Frame *frame) |
| libfreenect2 calls this function when a new frame is decoded. | |
| Public Member Functions inherited from FrameListener | |
| virtual | ~FrameListener () |
Collect timestamp-aligned combinations of multiple frame types.
Unlike SyncMultiFrameListener, this listener keeps a bounded queue for each subscribed stream and selects the queued combination with the smallest wrap-safe device-timestamp span.
| TimestampAlignedFrameListener | ( | unsigned int | frame_types, |
| uint32_t | max_delta_ticks, | ||
| size_t | queue_capacity = 8 ) |
| frame_types | Use bitwise or to combine multiple types. |
| max_delta_ticks | Largest accepted device-timestamp span, in 0.125 ms ticks. |
| queue_capacity | Maximum number of queued frames per subscribed type. |
Referenced by onNewFrame().
|
virtual |
| bool hasNewFrame | ( | ) | const |
Test whether an aligned frame set is ready.
Non-blocking.
| bool waitForNewFrame | ( | FrameMap & | frame, |
| int | milliseconds ) |
Wait milliseconds for an aligned frame set.
| void waitForNewFrame | ( | FrameMap & | frame | ) |
Wait indefinitely for an aligned frame set.
| void release | ( | FrameMap & | frame | ) |
Delete all frames in frame.
| Statistics getStatistics | ( | ) | const |
Return a thread-safe snapshot of the listener statistics.
|
virtual |
libfreenect2 calls this function when a new frame is decoded.
| type | Type of the new frame. |
| frame | Data of the frame. |
Implements FrameListener.
References TimestampAlignedFrameListener().