#include <avcap/CaptureManager.h>
Inheritance diagram for avcap::CaptureManager:
An implementation of this class is provided by the API-specific CaptureDevice. The CaptureManager can be used by applications to register a CaptureHandler and to start/stop the capture. There is only one CaptureHandler at the same time. To distribute the captured data to more than one interested sink is the responsibility of the application.
Public Types | |
enum | { MAX_BUFFERS = 32, DEFAULT_BUFFERS = 16 } |
Public Member Functions | |
CaptureManager () | |
Constructor. | |
virtual | ~CaptureManager () |
Destructor. | |
virtual int | init ()=0 |
Do basic initialization after startup. | |
virtual int | destroy ()=0 |
Called before object destruction. | |
virtual int | startCapture ()=0 |
Start capturing data. | |
virtual int | stopCapture ()=0 |
Stop capturing data. | |
virtual void | registerCaptureHandler (CaptureHandler *handler) |
Register a capture handler. | |
virtual void | removeCaptureHandler () |
Remove the current capture handler. | |
virtual CaptureHandler * | getCaptureHandler () |
Get the current CaptureHandler. | |
virtual int | getNumIOBuffers ()=0 |
Returns the number of IOBuffers currently available. |
anonymous enum |
avcap::CaptureManager::CaptureManager | ( | ) | [inline] |
Constructor.
virtual avcap::CaptureManager::~CaptureManager | ( | ) | [inline, virtual] |
Destructor.
virtual int avcap::CaptureManager::init | ( | ) | [pure virtual] |
Do basic initialization after startup.
Implemented in avcap::AVC_VidCapManager, avcap::V4L1_VidCapManager, avcap::V4L2_VidCapManager, avcap::QT_VidCapManager, and avcap::DS_VidCapManager.
virtual int avcap::CaptureManager::destroy | ( | ) | [pure virtual] |
Called before object destruction.
Implemented in avcap::AVC_VidCapManager, avcap::V4L1_VidCapManager, avcap::V4L2_VidCapManager, avcap::QT_VidCapManager, and avcap::DS_VidCapManager.
virtual int avcap::CaptureManager::startCapture | ( | ) | [pure virtual] |
Start capturing data.
Implemented in avcap::AVC_VidCapManager, avcap::V4L1_VidCapManager, avcap::V4L2_VidCapManager, avcap::QT_VidCapManager, and avcap::DS_VidCapManager.
virtual int avcap::CaptureManager::stopCapture | ( | ) | [pure virtual] |
Stop capturing data.
Implemented in avcap::AVC_VidCapManager, avcap::V4L1_VidCapManager, avcap::V4L2_VidCapManager, avcap::QT_VidCapManager, and avcap::DS_VidCapManager.
virtual void avcap::CaptureManager::registerCaptureHandler | ( | CaptureHandler * | handler | ) | [inline, virtual] |
Register a capture handler.
Only one capture handler can be registered at the same time. The handlers CaptureHandler::handleCaptureEvent() method will be called, if new data has been captured. The ownership of the handler remains at the caller. He is responsible for removing and deleting the handler.
handler | The capture handler implementation. |
Reimplemented in avcap::AVC_VidCapManager.
virtual void avcap::CaptureManager::removeCaptureHandler | ( | ) | [inline, virtual] |
Remove the current capture handler.
If a capture handler was registered before, then this handler will not be notified anymore if data has been captured.
Reimplemented in avcap::AVC_VidCapManager.
virtual CaptureHandler* avcap::CaptureManager::getCaptureHandler | ( | ) | [inline, virtual] |
Get the current CaptureHandler.
Return the capture handler currently registered with registerCaptureHandler() or 0, if no handler was registered before.
virtual int avcap::CaptureManager::getNumIOBuffers | ( | ) | [pure virtual] |
Returns the number of IOBuffers currently available.
The CaptureManager usually waits to capture the next frame until an IOBuffer is available. The application is reponsible to release the IOBuffers to make it available to the capture manager.
Implemented in avcap::AVC_VidCapManager, avcap::V4L1_VidCapManager, avcap::V4L2_VidCapManager, avcap::QT_VidCapManager, and avcap::DS_VidCapManager.