Base class for video input classes. More...
#include <Radiant/VideoInput.hpp>
Public Member Functions | |
| virtual const void * | captureAudio (int *frameCount) |
| Get audio data. More... | |
| virtual const Radiant::VideoImage * | captureImage ()=0 |
| This method captures an image from the video source. More... | |
| virtual bool | close ()=0 |
| Close the device. More... | |
| virtual void | doneImage () |
| Inform the video handler that the application has used the image. More... | |
| virtual Nimble::Vector2i | focalPoint () const |
| virtual float | fps () const =0 |
| Returns the current frame rate (int frames per second) of the video stream. More... | |
| virtual void | getAudioParameters (int *channels, int *sample_rate, AudioSampleFormat *format) const |
| Get audio parameters. More... | |
| virtual int | height () const =0 |
| Returns the current height of a frame in the video stream images. More... | |
| virtual ImageFormat | imageFormat () const =0 |
| Returns the current image format of the stream. More... | |
| virtual void | setBrightness (float b) |
| Set the brightness control of the device (if possible) More... | |
| virtual void | setExposure (float e) |
| Set the exposure control of the device (if possible) More... | |
| virtual void | setGain (float g) |
| Sets the camera gain (if possible). More... | |
| virtual void | setGamma (float g) |
| Sets the gamma correction value. More... | |
| virtual void | setShutter (float t) |
| Sets the shutter time. More... | |
| virtual unsigned int | size () const =0 |
| Returns the total size of one captured image frame in bytes. More... | |
| virtual bool | start ()=0 |
| Starts the data transmission. More... | |
| virtual bool | stop ()=0 |
| Stops the data transmission. More... | |
| virtual uint64_t | uid () |
| Returns the unique identifier for the input device. More... | |
| virtual int | width () const =0 |
| Returns the current width of a frame in the video stream images. More... | |
| virtual | ~VideoInput () |
| Destructor. | |
Protected Member Functions | |
| VideoInput () | |
| Disabled. | |
Base class for video input classes.
Potential child classes are: FireWire video input, USB video input and movie video input.
|
virtual |
Get audio data.
This function returns a pointer to the internal audio PCM buffer. The audio PCM buffer is filled in the captureImage function, and this function only returns a pointer to the captured data.
This function should be called frequently, typically after each video frame. For many video sources (movie files in particular) this function will return null most of the time, as the audio is encoded in chunks so that audio frames cover multiple video frames. Thus you may have this function return the audio for one full second of the movie.
| frameCount | The number of frames available is stored inside this pointer. |
|
pure virtual |
This method captures an image from the video source.
The image is returned in the native format of the device.
|
pure virtual |
Close the device.
|
virtual |
Inform the video handler that the application has used the image.
This function is necessary as some handlers need to release
the resources that relate to a particular frame.
|
virtual |
|
pure virtual |
Returns the current frame rate (int frames per second) of the video stream.
|
virtual |
Get audio parameters.
| channels | The number of channels in the video sound-track. |
| sample_rate | Audio sample rate |
| format | The audio sample format |
|
pure virtual |
Returns the current height of a frame in the video stream images.
|
pure virtual |
Returns the current image format of the stream.
|
virtual |
Set the brightness control of the device (if possible)
| b | Brightness to set |
Reimplemented in Radiant::VideoCamera.
|
virtual |
Set the exposure control of the device (if possible)
| e | Exposure to set |
Reimplemented in Radiant::VideoCamera.
|
virtual |
Sets the camera gain (if possible).
Negative values sets automatic gain control. Manual range [0-1].
| g | Gain to set |
Reimplemented in Radiant::VideoCamera.
|
virtual |
Sets the gamma correction value.
| g | Value of gamme to set |
Reimplemented in Radiant::VideoCamera.
|
virtual |
Sets the shutter time.
Larger values lead to longer shutter times. Negative values tell the system to use automatic shutter timing. Manual range [0-1].
| t | Time for shutter |
Reimplemented in Radiant::VideoCamera.
|
pure virtual |
Returns the total size of one captured image frame in bytes.
|
pure virtual |
Starts the data transmission.
|
pure virtual |
Stops the data transmission.
|
virtual |
Returns the unique identifier for the input device.
|
pure virtual |
Returns the current width of a frame in the video stream images.
Note that it is quite common for video devices to not report the correct frame size before at least one frame has been captured.