cinder::Capture Class Reference

#include <Capture.h>

List of all members.

Classes

class  Device
 Represents a video capture device. More...
struct  Obj

Public Member Functions

 Capture ()
 Capture (int32_t width, int32_t height, const Device &device=Device())
 ~Capture ()
void start ()
 Begin capturing video.
void stop ()
 Stop capturing video.
bool isCapturing ()
 Is the device capturing video.
bool checkNewFrame () const
 Returns whether there is a new video frame available since the last call to checkNewFrame().
int32_t getWidth () const
 Returns the width of the captured image in pixels.
int32_t getHeight () const
 Returns the height of the captured image in pixels.
Vec2i getSize () const
 Returns the size of the captured image in pixels.
float getAspectRatio () const
 Returns the aspect ratio of the capture imagee, which is its width / height.
Area getBounds () const
 Returns the bounding rectangle of the capture imagee, which is Area( 0, 0, width, height ).
Surface8u getSurface () const
 Returns a Surface representing the current captured frame.
Device getDevice () const
 Returns the associated Device for this instace of Capture.

Static Public Member Functions

static const std::vector
< Device > & 
getDevices (bool forceRefresh=false)
 Returns a vector of all Devices connected to the system. If forceRefresh then the system will be polled for connected devices.
static Device findDeviceByName (const std::string &name)
 Finds a particular device based on its name.

Protected Attributes

shared_ptr< ObjmObj

Static Protected Attributes

static bool sDevicesEnumerated = false
static std::vector
< Capture::Device
sDevices



typedef shared_ptr< Obj >
Capture::* 
unspecified_bool_type
 Emulates shared_ptr-like behavior.
 operator unspecified_bool_type ()
 Emulates shared_ptr-like behavior.
void reset ()
 Emulates shared_ptr-like behavior.

Member Typedef Documentation

typedef shared_ptr<Obj> Capture::* cinder::Capture::unspecified_bool_type

Emulates shared_ptr-like behavior.


Constructor & Destructor Documentation

cinder::Capture::Capture (  ) 
cinder::Capture::Capture ( int32_t  width,
int32_t  height,
const Device device = Device() 
)
cinder::Capture::~Capture (  ) 

Member Function Documentation

void cinder::Capture::start (  ) 

Begin capturing video.

void cinder::Capture::stop (  ) 

Stop capturing video.

bool cinder::Capture::isCapturing (  ) 

Is the device capturing video.

bool cinder::Capture::checkNewFrame (  )  const

Returns whether there is a new video frame available since the last call to checkNewFrame().

int32_t cinder::Capture::getWidth (  )  const

Returns the width of the captured image in pixels.

int32_t cinder::Capture::getHeight (  )  const

Returns the height of the captured image in pixels.

Vec2i cinder::Capture::getSize (  )  const

Returns the size of the captured image in pixels.

float cinder::Capture::getAspectRatio (  )  const

Returns the aspect ratio of the capture imagee, which is its width / height.

Area cinder::Capture::getBounds (  )  const

Returns the bounding rectangle of the capture imagee, which is Area( 0, 0, width, height ).

Surface8u cinder::Capture::getSurface (  )  const

Returns a Surface representing the current captured frame.

Device cinder::Capture::getDevice (  )  const

Returns the associated Device for this instace of Capture.

const vector< Capture::Device > & cinder::Capture::getDevices ( bool  forceRefresh = false  )  [static]

Returns a vector of all Devices connected to the system. If forceRefresh then the system will be polled for connected devices.

Capture::Device cinder::Capture::findDeviceByName ( const std::string &  name  )  [static]

Finds a particular device based on its name.

cinder::Capture::operator unspecified_bool_type (  ) 

Emulates shared_ptr-like behavior.

void cinder::Capture::reset (  ) 

Emulates shared_ptr-like behavior.


Member Data Documentation

shared_ptr<Obj> cinder::Capture::mObj [protected]
bool cinder::Capture::sDevicesEnumerated = false [static, protected]
vector< Capture::Device > cinder::Capture::sDevices [static, protected]

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