This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.
A base class representing a video device such as a camera. More...
#include <ofVideoBaseTypes.h>

Public Member Functions | |
virtual | ~ofBaseVideoGrabber () |
Destroy the ofBaseVideoGrabber. | |
virtual std::vector< ofVideoDevice > | listDevices () const =0 |
Get a list of available video grabber devices. | |
virtual bool | setup (int w, int h)=0 |
Set up the grabber with the requested width and height. | |
virtual float | getHeight () const =0 |
Get the video grabber's height. | |
virtual float | getWidth () const =0 |
Get the video grabber's width. | |
virtual ofTexture * | getTexturePtr () |
Get the video grabber's internal ofTexture pointer if available. | |
virtual void | setVerbose (bool bTalkToMe) |
Set the video grabber's hardware verbosity level. | |
virtual void | setDeviceID (int deviceID) |
Set the video grabber's device ID. | |
virtual void | setDesiredFrameRate (int framerate) |
Set the video grabber's desired frame rate. | |
virtual void | videoSettings () |
Request a native GUI for video grabber settings. | |
![]() | |
virtual | ~ofBaseVideo () |
Destroy the ofBaseVideo. | |
virtual bool | isFrameNew () const =0 |
virtual void | close ()=0 |
Close the video source. | |
virtual bool | isInitialized () const =0 |
Determine if the video source is initialized. | |
virtual bool | setPixelFormat (ofPixelFormat pixelFormat)=0 |
Set the requested ofPixelFormat. | |
virtual ofPixelFormat | getPixelFormat () const =0 |
![]() | |
virtual | ~ofBaseHasPixels_ () |
Destroy the ofAbstractHasPixels. | |
virtual ofPixels_< unsigned char > & | getPixels ()=0 |
Get a reference to the underlying ofPixels. | |
virtual const ofPixels_< unsigned char > & | getPixels () const=0 |
Get a const reference to the underlying ofPixels. | |
![]() | |
virtual | ~ofAbstractHasPixels () |
Destroy the ofAbstractHasPixels. | |
![]() | |
virtual | ~ofBaseUpdates () |
Destroy the ofBaseUpdates. | |
virtual void | update ()=0 |
Update the object's state. | |
Detailed Description
A base class representing a video device such as a camera.
Constructor & Destructor Documentation
◆ ~ofBaseVideoGrabber()
|
virtual |
Destroy the ofBaseVideoGrabber.
Member Function Documentation
◆ getHeight()
|
pure virtual |
Get the video grabber's height.
- Returns
- the video grabber's height.
Implemented in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
◆ getTexturePtr()
|
inlinevirtual |
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.
Reimplemented in ofGstVideoGrabber.
◆ getWidth()
|
pure virtual |
Get the video grabber's width.
- Returns
- the video grabber's width.
Implemented in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
◆ listDevices()
|
pure virtual |
Get a list of available video grabber devices.
- Returns
- a std::vector of ofVideoDevice objects.
Implemented in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
◆ 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 in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
◆ 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 in ofDirectShowGrabber, ofVideoGrabber, and ofGstVideoGrabber.
◆ setup()
|
pure virtual |
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.
Implemented in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
◆ setVerbose()
|
virtual |
Set the video grabber's hardware verbosity level.
- Parameters
-
bTalkToMe true if verbose grabber logging feedback is required.
Reimplemented in ofDirectShowGrabber, ofVideoGrabber, and ofGstVideoGrabber.
◆ videoSettings()
|
virtual |
Request a native GUI for video grabber settings.
- Note
- This feature may not be implemented by all video grabbers.
Reimplemented in ofDirectShowGrabber, ofGstVideoGrabber, and ofVideoGrabber.
The documentation for this class was generated from the following files:
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/video/ofVideoBaseTypes.h
- /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/types/ofBaseTypes.cpp