This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
#include <ofVideoGrabber.h>

Public Member Functions | |
ofVideoGrabber () | |
virtual | ~ofVideoGrabber () |
std::vector< ofVideoDevice > | listDevices () const |
Get a list of available video grabber devices. | |
bool | isFrameNew () const |
void | update () |
Update the object's state. | |
void | close () |
Close the video source. | |
bool | setup (int w, int h) |
Set up the grabber with the requested width and height. | |
bool | setup (int w, int h, bool bTexture) |
OF_DEPRECATED_MSG ("Use setup instead", bool initGrabber(int w, int h){return setup(w, h);}) OF_DEPRECATED_MSG("Use setup instead" | |
bool | initGrabber (int w, int h, bool bTexture)) |
bool | setPixelFormat (ofPixelFormat pixelFormat) |
Set the requested ofPixelFormat. | |
ofPixelFormat | getPixelFormat () const |
void | videoSettings () |
Request a native GUI for video grabber settings. | |
ofPixels & | getPixels () |
Get a reference to the underlying ofPixels. | |
const ofPixels & | getPixels () const |
Get a const reference to the underlying ofPixels. | |
OF_DEPRECATED_MSG ("Use getPixels() instead", ofPixels &getPixelsRef()) | |
OF_DEPRECATED_MSG ("Use getPixels() instead", const ofPixels &getPixelsRef() const) | |
ofTexture & | getTexture () |
const ofTexture & | getTexture () const |
OF_DEPRECATED_MSG ("Use getTexture", ofTexture &getTextureReference()) | |
OF_DEPRECATED_MSG ("Use getTexture", const ofTexture &getTextureReference() const) | |
std::vector< ofTexture > & | getTexturePlanes () |
const std::vector< ofTexture > & | getTexturePlanes () const |
void | setVerbose (bool bTalkToMe) |
Set the video grabber's hardware verbosity level. | |
void | setDeviceID (int _deviceID) |
Set the video grabber's device ID. | |
void | setDesiredFrameRate (int framerate) |
Set the video grabber's desired frame rate. | |
void | setUseTexture (bool bUse) |
Enable or disable internal ofTexture use. | |
bool | isUsingTexture () const |
void | draw (float x, float y, float w, float h) const |
Draw at a position with the specified size. | |
void | draw (float x, float y) const |
Draw at a position at the native size. | |
void | bind () const |
void | unbind () const |
void | setAnchorPercent (float xPct, float yPct) |
Set the anchor point the item is drawn around as a percentage. | |
void | setAnchorPoint (float x, float y) |
Set the anchor point the item is drawn around in pixels. | |
void | resetAnchor () |
Reset the anchor point to (0, 0). | |
float | getHeight () const |
Get the video grabber's height. | |
float | getWidth () const |
Get the video grabber's width. | |
bool | isInitialized () const |
Determine if the video source is initialized. | |
void | setGrabber (std::shared_ptr< ofBaseVideoGrabber > newGrabber) |
std::shared_ptr< ofBaseVideoGrabber > | getGrabber () |
const std::shared_ptr< ofBaseVideoGrabber > | getGrabber () const |
template<typename GrabberType > | |
std::shared_ptr< GrabberType > | getGrabber () |
template<typename GrabberType > | |
const std::shared_ptr< GrabberType > | getGrabber () const |
virtual void | draw (float x, float y) const |
Draw at a position at the native size. | |
virtual void | draw (float x, float y, float w, float h) const=0 |
Draw at a position with the specified size. | |
virtual void | draw (const glm::vec2 &point) const |
Draw at a position at the native size. | |
virtual void | draw (const ofRectangle &rect) const |
Draw at a position and size specified by a rectangle. | |
virtual void | draw (const glm::vec2 &point, float w, float h) const |
Draw at a position. | |
![]() | |
virtual | ~ofBaseVideoGrabber () |
Destroy the ofBaseVideoGrabber. | |
virtual ofTexture * | getTexturePtr () |
Get the video grabber's internal ofTexture pointer if available. | |
![]() | |
virtual | ~ofBaseVideo () |
Destroy the ofBaseVideo. | |
![]() | |
virtual | ~ofBaseHasPixels_ () |
Destroy the ofAbstractHasPixels. | |
![]() | |
virtual | ~ofAbstractHasPixels () |
Destroy the ofAbstractHasPixels. | |
![]() | |
virtual | ~ofBaseUpdates () |
Destroy the ofBaseUpdates. | |
![]() | |
virtual | ~ofBaseVideoDraws () |
Destroy the ofBaseVideoDraws. | |
![]() | |
virtual | ~ofBaseDraws () |
Destroy the abstract object. | |
![]() | |
virtual | ~ofBaseHasTexturePlanes () |
Destroy the ofBaseHasTexturePlanes. | |
![]() | |
virtual | ~ofBaseHasTexture () |
Destroy the ofBaseHasTexture. | |
Constructor & Destructor Documentation
◆ ofVideoGrabber()
ofVideoGrabber::ofVideoGrabber | ( | ) |
◆ ~ofVideoGrabber()
|
virtual |
Member Function Documentation
◆ bind()
void ofVideoGrabber::bind | ( | ) | const |
◆ close()
|
virtual |
Close the video source.
Implements ofBaseVideo.
◆ draw() [1/7]
|
virtual |
Draw at a position at the native size.
Native size is determined by getWidth() and getHeight().
- Parameters
-
point Draw position.
Reimplemented from ofBaseDraws.
◆ draw() [2/7]
|
virtual |
Draw at a position.
- Parameters
-
point Draw position. w Draw width. h Draw height.
Reimplemented from ofBaseDraws.
◆ draw() [3/7]
|
virtual |
Draw at a position and size specified by a rectangle.
- Parameters
-
rect Draw position and size.
Reimplemented from ofBaseDraws.
◆ draw() [4/7]
|
virtual |
Draw at a position at the native size.
Native size is determined by getWidth() and getHeight().
- Parameters
-
x Draw position on the x axis. y Draw position on the y axis.
Reimplemented from ofBaseDraws.
◆ draw() [5/7]
|
inlinevirtual |
Draw at a position at the native size.
Native size is determined by getWidth() and getHeight().
- Parameters
-
x Draw position on the x axis. y Draw position on the y axis.
Reimplemented from ofBaseDraws.
◆ draw() [6/7]
|
virtual |
Draw at a position with the specified size.
- Parameters
-
x Draw position on the x axis. y Draw position on the y axis. w Draw width. h Draw height.
Implements ofBaseDraws.
◆ draw() [7/7]
|
virtual |
Draw at a position with the specified size.
- Parameters
-
x Draw position on the x axis. y Draw position on the y axis. w Draw width. h Draw height.
Implements ofBaseDraws.
◆ getGrabber() [1/4]
shared_ptr< ofBaseVideoGrabber > ofVideoGrabber::getGrabber | ( | ) |
◆ getGrabber() [2/4]
|
inline |
◆ getGrabber() [3/4]
const shared_ptr< ofBaseVideoGrabber > ofVideoGrabber::getGrabber | ( | ) | const |
◆ getGrabber() [4/4]
|
inline |
◆ getHeight()
|
virtual |
◆ getPixelFormat()
|
virtual |
- Returns
- the current ofPixelFormat.
Implements ofBaseVideo.
◆ getPixels() [1/2]
|
virtual |
Get a reference to the underlying ofPixels.
- Returns
- a reference the underlying ofPixels.
Implements ofBaseHasPixels_< unsigned char >.
◆ getPixels() [2/2]
|
virtual |
Get a const reference to the underlying ofPixels.
- Returns
- a const reference the underlying ofPixels.
Implements ofBaseHasPixels_< unsigned char >.
◆ getTexture() [1/2]
|
virtual |
- Returns
- a reference to the ofTexture.
Implements ofBaseHasTexture.
◆ getTexture() [2/2]
|
virtual |
- Returns
- a const reference to the ofTexture.
Implements ofBaseHasTexture.
◆ getTexturePlanes() [1/2]
|
virtual |
- Returns
- a reference to a std::vector containing the ofTexture planes.
Implements ofBaseHasTexturePlanes.
◆ getTexturePlanes() [2/2]
|
virtual |
- Returns
- a const reference to a std::vector containing the ofTexture planes.
Implements ofBaseHasTexturePlanes.
◆ getWidth()
|
virtual |
◆ initGrabber()
bool ofVideoGrabber::initGrabber | ( | int | w, |
int | h, | ||
bool | bTexture | ||
) |
◆ isFrameNew()
|
virtual |
- Returns
- true if the pixel data was updated since the last call to update().
Implements ofBaseVideo.
◆ isInitialized()
|
virtual |
Determine if the video source is initialized.
Video sources such as cameras are often initialized with a setup() method. Video sources such as movie players are often initialized with a load() method.
- Returns
- true if the video source is initialized.
Implements ofBaseVideo.
◆ isUsingTexture()
|
virtual |
- Returns
- true if an internal ofTexture is being used.
Implements ofBaseHasTexture.
◆ listDevices()
|
virtual |
Get a list of available video grabber devices.
- Returns
- a std::vector of ofVideoDevice objects.
Implements ofBaseVideoGrabber.
◆ OF_DEPRECATED_MSG() [1/5]
ofVideoGrabber::OF_DEPRECATED_MSG | ( | "Use getPixels() instead" | , |
const ofPixels &getPixelsRef() const | |||
) |
◆ OF_DEPRECATED_MSG() [2/5]
◆ OF_DEPRECATED_MSG() [3/5]
ofVideoGrabber::OF_DEPRECATED_MSG | ( | "Use getTexture" | , |
const ofTexture &getTextureReference() const | |||
) |
◆ OF_DEPRECATED_MSG() [4/5]
ofVideoGrabber::OF_DEPRECATED_MSG | ( | "Use getTexture" | , |
ofTexture & | getTextureReference() | ||
) |
◆ OF_DEPRECATED_MSG() [5/5]
ofVideoGrabber::OF_DEPRECATED_MSG | ( | "Use setup instead" | , |
bool initGrabber(int w, int h){return setup(w, h);} | |||
) |
◆ resetAnchor()
|
virtual |
Reset the anchor point to (0, 0).
Reimplemented from ofBaseDraws.
◆ setAnchorPercent()
|
virtual |
Set the anchor point the item is drawn around as a percentage.
This can be useful if you want to rotate an image around a particular point.
- Parameters
-
xPct Horizontal position as a percentage (0 - 1). yPct Vertical position as a percentage (0 - 1).
Reimplemented from ofBaseDraws.
◆ setAnchorPoint()
|
virtual |
Set the anchor point the item is drawn around in pixels.
This can be useful if you want to rotate an image around a particular point.
- Parameters
-
x Horizontal texture position in pixels. y Vertical texture position in pixels.
Reimplemented from ofBaseDraws.
◆ setDesiredFrameRate()
|
virtual |
Set the video grabber's desired frame rate.
Many video grabbers support user-specified frame rates. This frame rate should be considered a hint for the video grabber and is not guaranteed.
- Parameters
-
framerate the desired frame rate.
Reimplemented from ofBaseVideoGrabber.
◆ setDeviceID()
|
virtual |
Set the video grabber's device ID.
In most cases, a user can choose a specific grabber source by ID. This device ID information should be available to the user via the listDevices() method.
- Parameters
-
deviceID The device ID provided by listDevices().
Reimplemented from ofBaseVideoGrabber.
◆ setGrabber()
void ofVideoGrabber::setGrabber | ( | std::shared_ptr< ofBaseVideoGrabber > | newGrabber | ) |
◆ setPixelFormat()
|
virtual |
Set the requested ofPixelFormat.
- Parameters
-
pixelFormat the requested ofPixelFormat.
- Returns
- true if the format was successfully changed.
Implements ofBaseVideo.
◆ setup() [1/2]
|
inlinevirtual |
Set up the grabber with the requested width and height.
Some video grabbers may take the requested width and height as a hint and choose the closest dimensions to those requested. Users can check the actual width and height by calling getWidth() and getHeight() respectively after a successful setup.
- Parameters
-
w the requested width. h the requested height.
- Returns
- true if the video grabber was set up successfully.
Implements ofBaseVideoGrabber.
◆ setup() [2/2]
bool ofVideoGrabber::setup | ( | int | w, |
int | h, | ||
bool | bTexture | ||
) |
◆ setUseTexture()
|
virtual |
Enable or disable internal ofTexture use.
- Parameters
-
bUseTex true if an ofTexture should be used.
Implements ofBaseHasTexture.
◆ setVerbose()
|
virtual |
Set the video grabber's hardware verbosity level.
- Parameters
-
bTalkToMe true if verbose grabber logging feedback is required.
Reimplemented from ofBaseVideoGrabber.
◆ unbind()
void ofVideoGrabber::unbind | ( | ) | const |
◆ update()
|
virtual |
Update the object's state.
Implements ofBaseUpdates.
◆ videoSettings()
|
virtual |
Request a native GUI for video grabber settings.
- Note
- This feature may not be implemented by all video grabbers.
Reimplemented from ofBaseVideoGrabber.
The documentation for this class was generated from the following files:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/video/ofVideoGrabber.h
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/video/ofVideoGrabber.cpp