#include <qtbuffer.h>
Public Member Functions | |
virtual bool | frame_pending () |
Is there a new frame ready? | |
virtual double | frame_rate () |
Get the camera frame rate. | |
virtual VideoFrame< T > * | get_frame () |
virtual void | put_frame (VideoFrame< T > *f) |
QTBuffer (const ImageRef &size, unsigned int number=0, bool showSettingsDialog=false, bool verbose=false) | |
virtual ImageRef | size () |
The size of the VideoFrames returned by this buffer. | |
Private Member Functions | |
int | operator= (QTBuffer ©of) |
QTBuffer (QTBuffer ©of) |
A video buffer from a QuickTime video device on Mac OSX.
T | The pixel type of the frames. The supported type are <CVD::vuy422> which returns 16-bit yuv422 encoded data where v,u and y are flipped. See Apple developer documentation at http://developer.apple.com/quicktime/icefloe/dispatch020.html for details. |
The optimal way to use this class is to call frame_pending() in the event handling loop until a frame is ready and then call get_frame() to retrieve the frame. Also note that the frame data is not owned by you and may be overriden by QuickTime. Therefore don't use it too long. A future could execute the necessary internal calls in a thread and make better use of processor time even with different usage patterns of the buffer.
Definition at line 127 of file qtbuffer.h.
CVD::QTBuffer< T >::QTBuffer | ( | const ImageRef & | size, | |
unsigned int | number = 0 , |
|||
bool | showSettingsDialog = false , |
|||
bool | verbose = false | |||
) | [inline] |
Construct a video buffer
dev | file name of the device to use |
Definition at line 132 of file qtbuffer.h.
CVD::QTBuffer< T >::QTBuffer | ( | QTBuffer< T > & | copyof | ) | [private] |
virtual bool CVD::QTBuffer< T >::frame_pending | ( | ) | [inline, virtual] |
Is there a new frame ready?
Reimplemented from CVD::QT::RawQT.
Definition at line 147 of file qtbuffer.h.
virtual double CVD::QTBuffer< T >::frame_rate | ( | ) | [inline, virtual] |
Get the camera frame rate.
Reimplemented from CVD::QT::RawQT.
Definition at line 151 of file qtbuffer.h.
virtual VideoFrame<T>* CVD::QTBuffer< T >::get_frame | ( | ) | [inline, virtual] |
returns the data of the next captured frame
Reimplemented from CVD::QT::RawQT.
Definition at line 138 of file qtbuffer.h.
int CVD::QTBuffer< T >::operator= | ( | QTBuffer< T > & | copyof | ) | [private] |
virtual void CVD::QTBuffer< T >::put_frame | ( | VideoFrame< T > * | f | ) | [inline, virtual] |
Tell the buffer that you are finished with this frame. Typically the VideoBuffer then destroys the frame.
f | The frame that you are finished with. |
Implements CVD::VideoBuffer< T >.
Definition at line 142 of file qtbuffer.h.
virtual ImageRef CVD::QTBuffer< T >::size | ( | ) | [inline, virtual] |
The size of the VideoFrames returned by this buffer.
Implements CVD::RawVideoBuffer.
Definition at line 134 of file qtbuffer.h.