reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofDirectShowGrabber.h
Go to the documentation of this file.
1#pragma once
2
3#include "ofConstants.h"
4#include "ofTexture.h"
5#include "ofVideoBaseTypes.h"
6#include "ofPixels.h"
7
8#ifdef OF_VIDEO_CAPTURE_DIRECTSHOW
9 #include "videoInput.h"
10#endif
11
12
14
15 public :
16
19
20 std::vector<ofVideoDevice> listDevices() const;
21 bool setup(int w, int h);
22 void update();
23 bool isFrameNew() const;
24 bool isInitialized() const;
25
26 bool setPixelFormat(ofPixelFormat pixelFormat);
28
30 const ofPixels& getPixels() const;
31
32 void close();
34
36
37 float getWidth() const;
38 float getHeight() const;
39
40 void setVerbose(bool bTalkToMe);
41 void setDeviceID(int _deviceID);
42 void setDesiredFrameRate(int framerate);
43
44
45
46
47 protected:
48
56
58 //--------------------------------- directshow
59 #ifdef OF_VIDEO_CAPTURE_DIRECTSHOW
60 int device;
61 videoInput VI;
62 bool bDoWeNeedToResize;
63 #endif
64};
65
A base class representing a video device such as a camera.
Definition ofVideoBaseTypes.h:110
Definition ofDirectShowGrabber.h:13
void videoSettings()
Request a native GUI for video grabber settings.
float getHeight() const
Get the video grabber's height.
int width
Definition ofDirectShowGrabber.h:57
void update()
Update the object's state.
ofPixels pixels
Definition ofDirectShowGrabber.h:53
bool setPixelFormat(ofPixelFormat pixelFormat)
Set the requested ofPixelFormat.
bool bIsFrameNew
Definition ofDirectShowGrabber.h:55
void close()
Close the video source.
bool isFrameNew() const
virtual ~ofDirectShowGrabber()
std::vector< ofVideoDevice > listDevices() const
Get a list of available video grabber devices.
bool setup(int w, int h)
Set up the grabber with the requested width and height.
float getWidth() const
Get the video grabber's width.
bool bVerbose
Definition ofDirectShowGrabber.h:51
void setVerbose(bool bTalkToMe)
Set the video grabber's hardware verbosity level.
bool bChooseDevice
Definition ofDirectShowGrabber.h:49
bool bGrabberInited
Definition ofDirectShowGrabber.h:52
ofPixels & getPixels()
Get a reference to the underlying ofPixels.
int height
Definition ofDirectShowGrabber.h:57
ofPixelFormat getPixelFormat() const
const ofPixels & getPixels() const
Get a const reference to the underlying ofPixels.
bool isInitialized() const
Determine if the video source is initialized.
void setDesiredFrameRate(int framerate)
Set the video grabber's desired frame rate.
int deviceID
Definition ofDirectShowGrabber.h:50
void setDeviceID(int _deviceID)
Set the video grabber's device ID.
int attemptFramerate
Definition ofDirectShowGrabber.h:54
map< string, int > device
Definition ofAppEGLWindow.cpp:36
ofPixelFormat
Used to represent the available pixel formats.
Definition ofPixels.h:68