libfreenect2 0.4
Open source driver for the Kinect for Windows v2 (K4W2) sensor
Loading...
Searching...
No Matches
FrameListener Class Referenceabstract

Callback interface to receive new frames. More...

#include <libfreenect2/frame_listener.hpp>

Inheritance diagram for FrameListener:
RecordingWriter SyncMultiFrameListener TimestampAlignedFrameListener

Public Member Functions

virtual ~FrameListener ()
virtual bool onNewFrame (Frame::Type type, Frame *frame)=0
 libfreenect2 calls this function when a new frame is decoded.

Detailed Description

Callback interface to receive new frames.

You can inherit from FrameListener and define your own listener.

Constructor & Destructor Documentation

◆ ~FrameListener()

virtual ~FrameListener ( )
virtual

Member Function Documentation

◆ onNewFrame()

virtual bool onNewFrame ( Frame::Type type,
Frame * frame )
pure virtual

libfreenect2 calls this function when a new frame is decoded.

Parameters
typeType of the new frame.
frameData of the frame.
Returns
true if you want to take ownership of the frame, i.e. reuse/delete it. Will be reused/deleted by caller otherwise.

Implemented in RecordingWriter, SyncMultiFrameListener, and TimestampAlignedFrameListener.