Argus Camera Sample
Argus Camera Sample
|
The dispatcher is called by clients like the command line interface. More...
#include <Dispatcher.h>
Classes | |
class | ActiveSession |
Public Member Functions | |
bool | shutdown () |
Shutdown, free all resources. | |
bool | supportsExtension (const Argus::ExtensionName &extension) const |
Returns whether or not an extension is supported. | |
bool | getInfo (std::string &info) const |
Get an information string. | |
bool | getSensorMode (uint32_t sensorModeIndex, Argus::SensorMode **sensorMode) const |
Get the sensor mode for a given index. | |
Argus::Range< int32_t > | getDeviceFocusPositionRange () const |
Returns the range of focuser positions of the current device. | |
bool | getOutputSize (Argus::Size2D< uint32_t > *size) const |
Get the output size. | |
uint32_t | getDeviceCount () const |
Get the amount of available camera devices. | |
bool | createSession (TrackedUniqueObj< Argus::CaptureSession > &session, uint32_t deviceIndex) |
Create a capture session using the device index. | |
bool | waitForEvents (Argus::EventQueue *eventQueue, TimeValue timeout=TimeValue::infinite(), Argus::CaptureSession *session=NULL) |
Wait for events from the specific session. | |
bool | dumpSessionInfo () const |
Dump runtime information for a session. | |
bool | createRequest (TrackedUniqueObj< Argus::Request > &request, Argus::CaptureIntent captureIntent, Argus::CaptureSession *session=NULL) |
Create a request for a session. | |
bool | createEventQueue (const std::vector< Argus::EventType > &eventTypes, Argus::UniqueObj< Argus::EventQueue > &eventQueue, Argus::CaptureSession *session=NULL) |
create a event queue | |
bool | capture (Argus::Request *request, Argus::CaptureSession *session=NULL) |
Submits a single capture request for a session. | |
bool | startRepeat (Argus::Request *request, Argus::CaptureSession *session=NULL) |
Start a repeating request for a session. | |
bool | startRepeatBurst (const std::vector< const Argus::Request * > &requestList, Argus::CaptureSession *session=NULL) |
Start a repeating burst request for a session. | |
bool | stopRepeat (Argus::CaptureSession *session=NULL) |
Clears the repeating request for a session. | |
bool | restartActiveRequests () |
Restart the currently active requests to pick up changed settings. | |
uint32_t | maxBurstRequests (Argus::CaptureSession *session=NULL) |
Returns the maximum number of capture requests for a session that can be included in a burst capture. | |
bool | waitForIdle (Argus::CaptureSession *session=NULL) |
Wait until all pending captures for a session are complete. | |
bool | createOutputStream (Argus::Request *request, Argus::UniqueObj< Argus::OutputStream > &stream, Argus::CaptureSession *session=NULL) |
Create an output stream of an request of a session. | |
bool | enableOutputStream (Argus::Request *request, Argus::OutputStream *stream) |
Enable an output stream of an request. | |
bool | disableOutputStream (Argus::Request *request, Argus::OutputStream *stream) |
Disable an output stream of an request. | |
bool | message (const char *msg,...) |
Output a message if verbose mode is enabled. | |
![]() | |
virtual | ~Tracker () |
![]() | |
virtual | ~Tracker () |
Static Public Member Functions | |
static Dispatcher & | getInstance () |
Get the dispatcher instance. |
Public Attributes | |
Value< uint32_t > | m_deviceIndex |
the device index | |
Value< bool > | m_deviceOpen |
if set then the device is open | |
Value< bool > | m_verbose |
if set verbose mode is enabled and messages are printed | |
Value< bool > | m_kpi |
if set kpi mode is enabled and kpi number are printed | |
Value< Argus::Range< uint64_t > > | m_exposureTimeRange |
exposure time range | |
Value< Argus::Range< float > > | m_gainRange |
gain range | |
Value< uint32_t > | m_sensorModeIndex |
the sensor mode index | |
Value< float > | m_frameRate |
in frames per second | |
Value< int32_t > | m_focusPosition |
focus position | |
Value< Argus::DenoiseMode > | m_denoiseMode |
denoise mode | |
Value< float > | m_denoiseStrength |
denoise strength | |
Value< Argus::EdgeEnhanceMode > | m_edgeEnhanceMode |
edge enhancement mode | |
Value< float > | m_edgeEnhanceStrength |
edge enhancement strength | |
Value < Argus::VideoStabilizationMode > | m_vstabMode |
video stabilization mode | |
Value< Argus::AeAntibandingMode > | m_aeAntibandingMode |
auto exposure antibanding mode | |
Value< bool > | m_aeLock |
auto exposure lock | |
Value< bool > | m_awbLock |
auto white balance lock | |
Value< Argus::AwbMode > | m_awbMode |
auto white balance mode | |
Value< float > | m_exposureCompensation |
exposure compensation | |
Value< Argus::Range< float > > | m_ispDigitalGainRange |
ISP digital Gain Range. | |
Value< VideoPipeline::VideoFormat > | m_videoFormat |
the video format | |
Value < VideoPipeline::VideoFileType > | m_videoFileType |
the video file type | |
Value< uint32_t > | m_videoBitRate |
the video bit rate | |
Value< Argus::Size2D< uint32_t > > | m_outputSize |
output size | |
Value< std::string > | m_outputPath |
output path | |
Value< bool > | m_deFogEnable |
enable | |
Value< float > | m_deFogAmount |
amount of fog to be removed. Range 0.0 - 1.0 (none - all) | |
Value< float > | m_deFogQuality |
quality of the effect. Range 0.0 - 1.0 (low - high) |
Private Types | |
typedef std::list< ActiveSession > | ActiveSessionList |
Private Member Functions | |
Dispatcher () | |
~Dispatcher () | |
Dispatcher (const Dispatcher &) | |
Dispatcher & | operator= (const Dispatcher &) |
bool | initialize () |
Initialize the dispatcher. | |
bool | createSession () |
Create the internal session. | |
bool | closeSession () |
Close the internal session. | |
bool | track (Argus::CaptureSession *session) |
Start tracking a session. | |
bool | untrack (Argus::CaptureSession *session) |
No longer track a session. | |
bool | track (Argus::Request *request) |
Start tracking a request. | |
bool | untrack (Argus::Request *request) |
No longer track a request. | |
bool | registerObserver (Argus::IDenoiseSettings *iDenoiseSettings) |
Register an IDenoiseSettings observer. | |
bool | registerObserver (Argus::IEdgeEnhanceSettings *iEdgeEnhanceSettings) |
Register an IEdgeEnhanceSettings observer. | |
bool | registerObserver (Argus::IVideoStabilizationSettings *iVideoStabilizationSettings) |
Register an IVideoStabilizationSettings observer. | |
bool | registerObserver (Argus::ISourceSettings *iSourceSettings) |
Register an ISourceSettings observer. | |
bool | registerObserver (Argus::IAutoControlSettings *iAutoControlSettings) |
Register an IAutoControlSettings observer. | |
bool | registerObserver (Argus::Ext::IDeFogSettings *iDeFogSettings) |
Register an IDeFogSettings observer. | |
bool | unregisterObserver (Argus::Interface *interface) |
Unregister an interface which had been registered as an observer. | |
bool | onDeviceIndexChanged (const Observed &source) |
Callback when the device index changes. | |
bool | onSensorModeIndexChanged (const Observed &source) |
Callback when the sensor mode index changes. |
Private Attributes | |
std::vector< Argus::SensorMode * > | m_sensorModes |
sensor modes | |
Value< Argus::Range< int32_t > > | m_deviceFocusPositionRange |
device focus position range | |
Value< Argus::Range < Argus::Range< float > > > | m_deviceIspDigitalGainRange |
device isp digital gain range | |
Value< Argus::Range < Argus::Range< uint64_t > > > | m_sensorExposureTimeRange |
exposure time range | |
Value< Argus::Range < Argus::Range< float > > > | m_sensorAnalogGainRange |
analog gain range | |
Value< Argus::Range< float > > | m_sensorFrameRateRange |
frame rate range | |
bool | m_initialized |
if set the dispatcher is initialized | |
std::list < IObserverForInterface * > | m_observers |
Argus::UniqueObj < Argus::CameraProvider > | m_cameraProvider |
camera provider | |
Argus::ICameraProvider * | m_iCameraProvider |
camera provider interface | |
std::vector < Argus::CameraDevice * > | m_cameraDevices |
a list of available devices | |
TrackedUniqueObj < Argus::CaptureSession > | m_captureSession |
internal capture session | |
ActiveSessionList | m_activeSessions |
The dispatcher is called by clients like the command line interface.
It provides functions to set properties like the camera device index or the sensor mode. It also implements services to open devices, sessions and create requests. It also maintains an internal capture session which is used when only a single session is required.
Definition at line 60 of file Dispatcher.h.
|
private |
Definition at line 404 of file Dispatcher.h.
|
private |
Definition at line 745 of file Dispatcher.cpp.
|
private |
Definition at line 804 of file Dispatcher.cpp.
|
private |
bool ArgusSamples::Dispatcher::capture | ( | Argus::Request * | request, |
Argus::CaptureSession * | session = NULL |
||
) |
Submits a single capture request for a session.
request | [in] capture request |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1447 of file Dispatcher.cpp.
|
private |
Close the internal session.
Definition at line 1227 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::createEventQueue | ( | const std::vector< Argus::EventType > & | eventTypes, |
Argus::UniqueObj< Argus::EventQueue > & | eventQueue, | ||
Argus::CaptureSession * | session = NULL |
||
) |
create a event queue
eventTypes | [in] |
eventQueue | [out] created event queue |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1423 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::createOutputStream | ( | Argus::Request * | request, |
Argus::UniqueObj< Argus::OutputStream > & | stream, | ||
Argus::CaptureSession * | session = NULL |
||
) |
Create an output stream of an request of a session.
request | [in] request |
stream | [out] the created Argus output stream |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1656 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::createRequest | ( | TrackedUniqueObj< Argus::Request > & | request, |
Argus::CaptureIntent | captureIntent, | ||
Argus::CaptureSession * | session = NULL |
||
) |
Create a request for a session.
request | [out] created request |
captureIntent | [in] capture intent |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1276 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::createSession | ( | TrackedUniqueObj< Argus::CaptureSession > & | session, |
uint32_t | deviceIndex | ||
) |
Create a capture session using the device index.
Definition at line 1170 of file Dispatcher.cpp.
|
private |
Create the internal session.
Definition at line 1214 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::disableOutputStream | ( | Argus::Request * | request, |
Argus::OutputStream * | stream | ||
) |
Disable an output stream of an request.
Definition at line 1712 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::dumpSessionInfo | ( | ) | const |
Dump runtime information for a session.
Definition at line 1193 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::enableOutputStream | ( | Argus::Request * | request, |
Argus::OutputStream * | stream | ||
) |
Enable an output stream of an request.
Definition at line 1699 of file Dispatcher.cpp.
uint32_t ArgusSamples::Dispatcher::getDeviceCount | ( | ) | const |
Get the amount of available camera devices.
Definition at line 1163 of file Dispatcher.cpp.
Argus::Range< int32_t > ArgusSamples::Dispatcher::getDeviceFocusPositionRange | ( | ) | const |
Returns the range of focuser positions of the current device.
The units are focuser steps.
Definition at line 1158 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::getInfo | ( | std::string & | info | ) | const |
Get an information string.
Definition at line 1027 of file Dispatcher.cpp.
|
static |
Get the dispatcher instance.
Definition at line 810 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::getOutputSize | ( | Argus::Size2D< uint32_t > * | size | ) | const |
Get the output size.
Definition at line 1634 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::getSensorMode | ( | uint32_t | sensorModeIndex, |
Argus::SensorMode ** | sensorMode | ||
) | const |
Get the sensor mode for a given index.
sensorModeIndex | [in] |
sensorMode | [out] |
Definition at line 1146 of file Dispatcher.cpp.
|
private |
Initialize the dispatcher.
Definition at line 831 of file Dispatcher.cpp.
uint32_t ArgusSamples::Dispatcher::maxBurstRequests | ( | Argus::CaptureSession * | session = NULL | ) |
Returns the maximum number of capture requests for a session that can be included in a burst capture.
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1594 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::message | ( | const char * | msg, |
... | |||
) |
Output a message if verbose mode is enabled.
Definition at line 1813 of file Dispatcher.cpp.
|
private |
Callback when the device index changes.
Definition at line 872 of file Dispatcher.cpp.
|
private |
Callback when the sensor mode index changes.
Definition at line 964 of file Dispatcher.cpp.
|
private |
|
private |
Register an IDenoiseSettings observer.
Definition at line 1725 of file Dispatcher.cpp.
|
private |
Register an IEdgeEnhanceSettings observer.
Definition at line 1737 of file Dispatcher.cpp.
|
private |
Register an IVideoStabilizationSettings observer.
Definition at line 1749 of file Dispatcher.cpp.
|
private |
Register an ISourceSettings observer.
Definition at line 1761 of file Dispatcher.cpp.
|
private |
Register an IAutoControlSettings observer.
Definition at line 1773 of file Dispatcher.cpp.
|
private |
Register an IDeFogSettings observer.
Definition at line 1785 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::restartActiveRequests | ( | ) |
Restart the currently active requests to pick up changed settings.
Definition at line 1572 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::shutdown | ( | ) |
Shutdown, free all resources.
Definition at line 862 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::startRepeat | ( | Argus::Request * | request, |
Argus::CaptureSession * | session = NULL |
||
) |
Start a repeating request for a session.
request | [in] request |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1467 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::startRepeatBurst | ( | const std::vector< const Argus::Request * > & | requestList, |
Argus::CaptureSession * | session = NULL |
||
) |
Start a repeating burst request for a session.
requestList | [in] burst request |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1502 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::stopRepeat | ( | Argus::CaptureSession * | session = NULL | ) |
Clears the repeating request for a session.
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1538 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::supportsExtension | ( | const Argus::ExtensionName & | extension | ) | const |
Returns whether or not an extension is supported.
Definition at line 1022 of file Dispatcher.cpp.
|
privatevirtual |
Start tracking a session.
Implements ArgusSamples::Tracker< Argus::CaptureSession >.
Definition at line 1233 of file Dispatcher.cpp.
|
privatevirtual |
Start tracking a request.
Implements ArgusSamples::Tracker< Argus::Request >.
Definition at line 1358 of file Dispatcher.cpp.
|
private |
Unregister an interface which had been registered as an observer.
Definition at line 1797 of file Dispatcher.cpp.
|
privatevirtual |
No longer track a session.
Implements ArgusSamples::Tracker< Argus::CaptureSession >.
Definition at line 1239 of file Dispatcher.cpp.
|
privatevirtual |
No longer track a request.
Implements ArgusSamples::Tracker< Argus::Request >.
Definition at line 1363 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::waitForEvents | ( | Argus::EventQueue * | eventQueue, |
TimeValue | timeout = TimeValue::infinite() , |
||
Argus::CaptureSession * | session = NULL |
||
) |
Wait for events from the specific session.
eventQueue | [in] event queue to transfer events to |
timeout | [in] maximum time (in nanoseconds) to wait for new events. |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1254 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::waitForIdle | ( | Argus::CaptureSession * | session = NULL | ) |
Wait until all pending captures for a session are complete.
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1614 of file Dispatcher.cpp.
|
private |
Definition at line 405 of file Dispatcher.h.
Value<Argus::AeAntibandingMode> ArgusSamples::Dispatcher::m_aeAntibandingMode |
auto exposure antibanding mode
Definition at line 273 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_aeLock |
auto exposure lock
Definition at line 274 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_awbLock |
auto white balance lock
Definition at line 275 of file Dispatcher.h.
Value<Argus::AwbMode> ArgusSamples::Dispatcher::m_awbMode |
auto white balance mode
Definition at line 276 of file Dispatcher.h.
|
private |
a list of available devices
Definition at line 389 of file Dispatcher.h.
|
private |
camera provider
Definition at line 386 of file Dispatcher.h.
|
private |
internal capture session
Definition at line 391 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_deFogAmount |
amount of fog to be removed. Range 0.0 - 1.0 (none - all)
Definition at line 291 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_deFogEnable |
enable
Definition at line 290 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_deFogQuality |
quality of the effect. Range 0.0 - 1.0 (low - high)
Definition at line 292 of file Dispatcher.h.
Value<Argus::DenoiseMode> ArgusSamples::Dispatcher::m_denoiseMode |
denoise mode
Definition at line 262 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_denoiseStrength |
denoise strength
Definition at line 263 of file Dispatcher.h.
|
private |
device focus position range
Definition at line 234 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_deviceIndex |
the device index
Definition at line 246 of file Dispatcher.h.
|
private |
device isp digital gain range
Definition at line 236 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_deviceOpen |
if set then the device is open
Definition at line 247 of file Dispatcher.h.
Value<Argus::EdgeEnhanceMode> ArgusSamples::Dispatcher::m_edgeEnhanceMode |
edge enhancement mode
Definition at line 266 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_edgeEnhanceStrength |
edge enhancement strength
Definition at line 267 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_exposureCompensation |
exposure compensation
Definition at line 277 of file Dispatcher.h.
Value<Argus::Range<uint64_t> > ArgusSamples::Dispatcher::m_exposureTimeRange |
exposure time range
Definition at line 255 of file Dispatcher.h.
Value<int32_t> ArgusSamples::Dispatcher::m_focusPosition |
focus position
Definition at line 259 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_frameRate |
in frames per second
Definition at line 258 of file Dispatcher.h.
Value<Argus::Range<float> > ArgusSamples::Dispatcher::m_gainRange |
gain range
Definition at line 256 of file Dispatcher.h.
|
private |
camera provider interface
Definition at line 387 of file Dispatcher.h.
|
private |
if set the dispatcher is initialized
Definition at line 382 of file Dispatcher.h.
Value<Argus::Range<float> > ArgusSamples::Dispatcher::m_ispDigitalGainRange |
ISP digital Gain Range.
Definition at line 278 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_kpi |
if set kpi mode is enabled and kpi number are printed
Definition at line 252 of file Dispatcher.h.
|
private |
Definition at line 384 of file Dispatcher.h.
Value<std::string> ArgusSamples::Dispatcher::m_outputPath |
output path
Definition at line 287 of file Dispatcher.h.
Value<Argus::Size2D<uint32_t> > ArgusSamples::Dispatcher::m_outputSize |
output size
Definition at line 286 of file Dispatcher.h.
|
private |
analog gain range
Definition at line 242 of file Dispatcher.h.
|
private |
exposure time range
Definition at line 240 of file Dispatcher.h.
|
private |
frame rate range
Definition at line 243 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_sensorModeIndex |
the sensor mode index
Definition at line 257 of file Dispatcher.h.
|
private |
sensor modes
Definition at line 233 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_verbose |
if set verbose mode is enabled and messages are printed
Definition at line 250 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_videoBitRate |
the video bit rate
Definition at line 283 of file Dispatcher.h.
Value<VideoPipeline::VideoFileType> ArgusSamples::Dispatcher::m_videoFileType |
the video file type
Definition at line 282 of file Dispatcher.h.
Value<VideoPipeline::VideoFormat> ArgusSamples::Dispatcher::m_videoFormat |
the video format
Definition at line 281 of file Dispatcher.h.
Value<Argus::VideoStabilizationMode> ArgusSamples::Dispatcher::m_vstabMode |
video stabilization mode
Definition at line 270 of file Dispatcher.h.