#include <Capture.h>
Classes | |
class | Device |
struct | Obj |
Public Types | |
typedef std::shared_ptr< Device > | DeviceRef |
typedef int | DeviceIdentifier |
Public Member Functions | |
Capture () | |
Capture (int32_t width, int32_t height, const DeviceRef device=DeviceRef()) | |
~Capture () | |
void | start () |
Begin capturing video. More... | |
void | stop () |
Stop capturing video. More... | |
bool | isCapturing () |
Is the device capturing video. More... | |
bool | checkNewFrame () const |
Returns whether there is a new video frame available since the last call to checkNewFrame() More... | |
int32_t | getWidth () const |
Returns the width of the captured image in pixels. More... | |
int32_t | getHeight () const |
Returns the height of the captured image in pixels. More... | |
Vec2i | getSize () const |
Returns the size of the captured image in pixels. More... | |
float | getAspectRatio () const |
Returns the aspect ratio of the capture imagee, which is its width / height. More... | |
Area | getBounds () const |
Returns the bounding rectangle of the capture imagee, which is Area( 0, 0, width, height ) More... | |
Surface8u | getSurface () const |
Returns a Surface representing the current captured frame. More... | |
const Capture::DeviceRef | getDevice () const |
Returns the associated Device for this instace of Capture. More... | |
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) |
Returns a vector of all Devices connected to the system. If forceRefresh then the system will be polled for connected devices. More... | |
static DeviceRef | findDeviceByName (const std::string &name) |
Finds a particular device based on its name. More... | |
static DeviceRef | findDeviceByNameContains (const std::string &nameFragment) |
Finds the first device whose name contains the string nameFragment. More... | |
Protected Attributes | |
std::shared_ptr< Obj > | mObj |
typedef std::shared_ptr< Obj > Capture::* | unspecified_bool_type |
Emulates shared_ptr-like behavior. More... | |
operator unspecified_bool_type () const | |
Emulates shared_ptr-like behavior. More... | |
void | reset () |
Emulates shared_ptr-like behavior. More... | |
typedef std::shared_ptr<Device> cinder::Capture::DeviceRef |
typedef int cinder::Capture::DeviceIdentifier |
typedef std::shared_ptr<Obj> Capture::* cinder::Capture::unspecified_bool_type |
Emulates shared_ptr-like behavior.
cinder::Capture::Capture | ( | ) |
cinder::Capture::~Capture | ( | ) |
|
static |
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.
const Capture::DeviceRef cinder::Capture::getDevice | ( | ) | const |
|
static |
Returns a vector of all Devices connected to the system. If forceRefresh then the system will be polled for connected devices.
|
static |
Finds a particular device based on its name.
|
static |
Finds the first device whose name contains the string nameFragment.
cinder::Capture::operator unspecified_bool_type | ( | ) | const |
Emulates shared_ptr-like behavior.
void cinder::Capture::reset | ( | ) |
Emulates shared_ptr-like behavior.
|
protected |