ofxDepthStream
Data Structures | Public Types | Public Member Functions | Protected Member Functions
depth::Playback Class Reference

#include <Playback.h>

Inheritance diagram for depth::Playback:
depth::Buffer

Data Structures

struct  Frame
 

Public Types

typedef std::function< void(void *, size_t)> FrameCallback
 
- Public Types inherited from depth::Buffer
typedef std::function< void(const void *, size_t)> NewDataCallback
 A new data callback takes a void pointer to the memory block and a size_t with the number of bytes in the memory block. More...
 

Public Member Functions

 ~Playback ()
 
void start (const std::string &name)
 
void startThreaded ()
 
void startThreaded (const std::string &name)
 
void stop (bool wait=true)
 
bool update (FrameCallback inlineCallback=nullptr)
 
bool isPlaying () const
 
const std::string & getFilename () const
 
- Public Member Functions inherited from depth::Buffer
virtual FrameRef getRef ()
 
virtual void write (FrameRef f)
 Updates the buffer with a new frame (triggers the output callback) More...
 
virtual void write (const void *data, size_t size)
 Updates the buffer with a new frame (triggers the output callback) More...
 
void clear ()
 Clear the buffer (doesn't trigger the output callback) More...
 
void setOutputTo (Buffer *b)
 Registers an output callback that updates the given buffer with this buffer's data whenever this buffer is updated. More...
 

Protected Member Functions

FramereadFrame ()
 
void threadFunc ()
 
void onEnd ()
 

Additional Inherited Members

- Protected Attributes inherited from depth::Buffer
NewDataCallback newDataCallback =nullptr
 
FrameRef buffered =nullptr
 

Member Typedef Documentation

◆ FrameCallback

typedef std::function<void(void*, size_t)> depth::Playback::FrameCallback

Constructor & Destructor Documentation

◆ ~Playback()

depth::Playback::~Playback ( )
inline

Member Function Documentation

◆ getFilename()

const std::string& depth::Playback::getFilename ( ) const
inline

◆ isPlaying()

bool depth::Playback::isPlaying ( ) const
inline

◆ onEnd()

void Playback::onEnd ( )
protected

Referenced by update().

◆ readFrame()

Playback::Frame * Playback::readFrame ( )
protected

Referenced by update().

◆ start()

void Playback::start ( const std::string &  name)

Referenced by onEnd(), and threadFunc().

◆ startThreaded() [1/2]

void Playback::startThreaded ( )

Referenced by startThreaded().

◆ startThreaded() [2/2]

void Playback::startThreaded ( const std::string &  name)

◆ stop()

void Playback::stop ( bool  wait = true)

Referenced by onEnd(), and ~Playback().

◆ threadFunc()

void Playback::threadFunc ( )
protected

Referenced by startThreaded().

◆ update()

bool Playback::update ( FrameCallback  inlineCallback = nullptr)

Referenced by start(), and threadFunc().


The documentation for this class was generated from the following files: