ofDocsdocumentation types ofBaseVideoGrabber

ofBaseVideoGrabber


getHeight( )

float getHeight()

Get the video grabber's height.

Returns: the video grabber's height.


getTexturePtr( )

ofTexture * getTexturePtr()

Get the video grabber's internal ofTexture pointer if available.

\note Subclasses should implement this method only if internal API can upload video grabber pixels directly to an ofTexture.

Returns: the internal ofTexture pointer or nullptr if not available.


getWidth( )

float getWidth()

Get the video grabber's width.

Returns: the video grabber's width.


setDesiredFrameRate( ... )

void setDesiredFrameRate(int framerate)

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.


setDeviceID( ... )

void setDeviceID(int deviceID)

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().


setVerbose( ... )

void setVerbose(bool bTalkToMe)

Set the video grabber's hardware verbosity level.

Parameters:

bTalkToMe true if verbose grabber logging feedback is required.


setup( ... )

bool setup(int w, int h)

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.


videoSettings( )

void videoSettings()

Request a native GUI for video grabber settings. \note This feature may not be implemented by all video grabbers.


~ofBaseVideoGrabber( )

~ofBaseVideoGrabber()

Destroy the ofBaseVideoGrabber