This class is a base class for video4linux based video input.
More...
#include <mipv4linput.h>
List of all members.
Public Member Functions |
bool | open (const std::string &device=std::string("/dev/video0"), const MIPV4LInputParameters *pParams=0) |
| Opens a video4linux device.
|
bool | close () |
| Closes the video4linux device.
|
int | getWidth () const |
| Returns the width of the captured video frames.
|
int | getHeight () const |
| Returns the height of the captured video frames.
|
void | setSourceID (uint64_t srcID) |
| Sets the source ID to be stored in generated messages.
|
uint64_t | getSourceID () const |
| Returns the source ID which will be stored in generated messages.
|
Protected Member Functions |
| MIPV4LInput (const std::string &compName) |
| Constructor meant to be used by subclasses.
|
virtual bool | subInit (int device, const MIPV4LInputParameters *pParams) |
| Virtual function, meant to be overridden by subclasses.
|
Detailed Description
This component is a basic video4linux input component. Specific components can be derived from this class and can be initialized by overriding the MIPV4LInput::subInit member function. The component accepts both MIPSYSTEMMESSAGE_TYPE_WAITTIME and MIPSYSTEMMESSAGE_TYPE_ISTIME messages.
Constructor & Destructor Documentation
MIPV4LInput::MIPV4LInput |
( |
const std::string & |
compName | ) |
[protected] |
Member Function Documentation
bool MIPV4LInput::close |
( |
| ) |
|
int MIPV4LInput::getHeight |
( |
| ) |
const [inline] |
uint64_t MIPV4LInput::getSourceID |
( |
| ) |
const [inline] |
int MIPV4LInput::getWidth |
( |
| ) |
const [inline] |
bool MIPV4LInput::open |
( |
const std::string & |
device = std::string("/dev/video0") , |
|
|
const MIPV4LInputParameters * |
pParams = 0 |
|
) |
| |
Using this function, a video4linux device can be opened.
- Parameters:
-
device | The name of the video4linux device. |
pParams | Additional parameters for the video4linux device. These can be used by a subclass if the MIPV4LInput::subInit member function is overridden. |
void MIPV4LInput::setSourceID |
( |
uint64_t |
srcID | ) |
[inline] |
virtual bool MIPV4LInput::subInit |
( |
int |
device, |
|
|
const MIPV4LInputParameters * |
pParams |
|
) |
| [inline, protected, virtual] |
This function can be overridden by subclasses and can be used to perform device specific initialization. In case of an error, the subclass should set the error string itself.
- Parameters:
-
device | The device identifier. |
pParams | Device specific parameters. A subclass should probably also derive a class from MIPV4LInputParameters in which additional parameters can be specified. |
The documentation for this class was generated from the following file: