Cinder  0.9.1
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::Capture Class Reference

#include <Capture.h>

Classes

class  Device
 

Public Types

typedef std::shared_ptr< DeviceDeviceRef
 
typedef std::string DeviceIdentifier
 

Public Member Functions

 ~Capture ()
 
void start ()
 
void stop ()
 
bool isCapturing ()
 
bool checkNewFrame () const
 
int32_t getWidth () const
 
int32_t getHeight () const
 
ivec2 getSize () const
 
float getAspectRatio () const
 
Area getBounds () const
 
Surface8uRef getSurface () const
 
const Capture::DeviceRef getDevice () const
 

Static Public Member Functions

static CaptureRef create (int32_t width, int32_t height, const DeviceRef device=DeviceRef())
 
static const std::vector< DeviceRef > & getDevices (bool forceRefresh=false)
 
static DeviceRef findDeviceByName (const std::string &name)
 
static DeviceRef findDeviceByNameContains (const std::string &nameFragment)
 

Protected Member Functions

 Capture (int32_t width, int32_t height, const DeviceRef device)
 

Protected Attributes

CaptureImplDirectShowmImpl
 

Member Typedef Documentation

typedef std::shared_ptr<Device> cinder::Capture::DeviceRef
typedef std::string cinder::Capture::DeviceIdentifier

Constructor & Destructor Documentation

cinder::Capture::~Capture ( )
cinder::Capture::Capture ( int32_t  width,
int32_t  height,
const DeviceRef  device 
)
protected

Member Function Documentation

static CaptureRef cinder::Capture::create ( int32_t  width,
int32_t  height,
const DeviceRef  device = DeviceRef() 
)
static

Creates a new Capture requesting (but not promising) a resolution of width x height pixels.

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.

ivec2 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 )

Surface8uRef cinder::Capture::getSurface ( ) const

Returns a SurfaceRef representing the current captured frame.

const Capture::DeviceRef cinder::Capture::getDevice ( ) const

Returns the associated Device for this instace of Capture.

const vector< Capture::DeviceRef > & 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::DeviceRef cinder::Capture::findDeviceByName ( const std::string &  name)
static

Finds a particular device based on its name.

Capture::DeviceRef cinder::Capture::findDeviceByNameContains ( const std::string &  nameFragment)
static

Finds the first device whose name contains the string nameFragment.

Member Data Documentation

CaptureImplDirectShow* cinder::Capture::mImpl
protected

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