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. | |
Argus::Range< int32_t > | getDeviceApertureMotorStepRange () const |
Returns the range of aperture step positions of the current device. | |
Argus::Range< float > | getDeviceApertureMotorSpeedRange () const |
Returns the range of aperture step 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, bool enableMetadata, 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_sensorModeValid |
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< int32_t > | m_apertureMotorStep |
aperture motor step position | |
Value< float > | m_apertureMotorSpeed |
aperture motor steps/second | |
Value< Argus::PixelFormat > | m_captureYuvFormat |
NV12 vs. P016 YUV color depth. | |
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::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< StillFileType > | m_stillFileType |
the still image file format | |
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::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< int32_t > > | m_deviceApertureMotorStepRange |
device aperture motor step range | |
Value< Argus::Range< float > > | m_deviceApertureMotorSpeedRange |
device aperture motor speed range | |
Value< Argus::Range< float > > | m_deviceExposureCompensationRange |
exposure compensation 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 420 of file Dispatcher.h.
|
private |
Definition at line 768 of file Dispatcher.cpp.
|
private |
Definition at line 837 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 1567 of file Dispatcher.cpp.
|
private |
Close the internal session.
Definition at line 1361 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 1543 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::createOutputStream | ( | Argus::Request * | request, |
bool | enableMetadata, | ||
Argus::UniqueObj< Argus::OutputStream > & | stream, | ||
Argus::CaptureSession * | session = NULL |
||
) |
Create an output stream of an request of a session.
request | [in] request |
enableMetadata | [in] whether or not to enable meatdata for the stream |
stream | [out] the created Argus output stream |
session | [in] capture session (optional, if NULL the internal session is used) |
Definition at line 1776 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 1410 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 1304 of file Dispatcher.cpp.
|
private |
Create the internal session.
Definition at line 1348 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::disableOutputStream | ( | Argus::Request * | request, |
Argus::OutputStream * | stream | ||
) |
Disable an output stream of an request.
Definition at line 1833 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::dumpSessionInfo | ( | ) | const |
Dump runtime information for a session.
Definition at line 1327 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::enableOutputStream | ( | Argus::Request * | request, |
Argus::OutputStream * | stream | ||
) |
Enable an output stream of an request.
Definition at line 1820 of file Dispatcher.cpp.
Argus::Range< float > ArgusSamples::Dispatcher::getDeviceApertureMotorSpeedRange | ( | ) | const |
Returns the range of aperture step positions of the current device.
The units are aperture motor steps/second.
Definition at line 1292 of file Dispatcher.cpp.
Argus::Range< int32_t > ArgusSamples::Dispatcher::getDeviceApertureMotorStepRange | ( | ) | const |
Returns the range of aperture step positions of the current device.
The units are aperture motor steps.
Definition at line 1287 of file Dispatcher.cpp.
uint32_t ArgusSamples::Dispatcher::getDeviceCount | ( | ) | const |
Get the amount of available camera devices.
Definition at line 1297 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 1282 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::getInfo | ( | std::string & | info | ) | const |
Get an information string.
Definition at line 1110 of file Dispatcher.cpp.
|
static |
Get the dispatcher instance.
Definition at line 843 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::getOutputSize | ( | Argus::Size2D< uint32_t > * | size | ) | const |
Get the output size.
Definition at line 1754 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 1270 of file Dispatcher.cpp.
|
private |
Initialize the dispatcher.
Definition at line 864 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 1714 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::message | ( | const char * | msg, |
... | |||
) |
Output a message if verbose mode is enabled.
Definition at line 1922 of file Dispatcher.cpp.
|
private |
Callback when the device index changes.
Definition at line 916 of file Dispatcher.cpp.
|
private |
Callback when the sensor mode index changes.
Definition at line 1045 of file Dispatcher.cpp.
|
private |
|
private |
Register an IDenoiseSettings observer.
Definition at line 1846 of file Dispatcher.cpp.
|
private |
Register an IEdgeEnhanceSettings observer.
Definition at line 1858 of file Dispatcher.cpp.
|
private |
Register an ISourceSettings observer.
Definition at line 1870 of file Dispatcher.cpp.
|
private |
Register an IAutoControlSettings observer.
Definition at line 1882 of file Dispatcher.cpp.
|
private |
Register an IDeFogSettings observer.
Definition at line 1894 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::restartActiveRequests | ( | ) |
Restart the currently active requests to pick up changed settings.
Definition at line 1692 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::shutdown | ( | ) |
Shutdown, free all resources.
Definition at line 896 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 1587 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 1622 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 1658 of file Dispatcher.cpp.
bool ArgusSamples::Dispatcher::supportsExtension | ( | const Argus::ExtensionName & | extension | ) | const |
Returns whether or not an extension is supported.
Definition at line 1105 of file Dispatcher.cpp.
|
privatevirtual |
Start tracking a session.
Implements ArgusSamples::Tracker< Argus::CaptureSession >.
Definition at line 1367 of file Dispatcher.cpp.
|
privatevirtual |
Start tracking a request.
Implements ArgusSamples::Tracker< Argus::Request >.
Definition at line 1485 of file Dispatcher.cpp.
|
private |
Unregister an interface which had been registered as an observer.
Definition at line 1906 of file Dispatcher.cpp.
|
privatevirtual |
No longer track a session.
Implements ArgusSamples::Tracker< Argus::CaptureSession >.
Definition at line 1373 of file Dispatcher.cpp.
|
privatevirtual |
No longer track a request.
Implements ArgusSamples::Tracker< Argus::Request >.
Definition at line 1490 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 1388 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 1734 of file Dispatcher.cpp.
|
private |
Definition at line 421 of file Dispatcher.h.
Value<Argus::AeAntibandingMode> ArgusSamples::Dispatcher::m_aeAntibandingMode |
auto exposure antibanding mode
Definition at line 291 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_aeLock |
auto exposure lock
Definition at line 292 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_apertureMotorSpeed |
aperture motor steps/second
Definition at line 279 of file Dispatcher.h.
Value<int32_t> ArgusSamples::Dispatcher::m_apertureMotorStep |
aperture motor step position
Definition at line 278 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_awbLock |
auto white balance lock
Definition at line 293 of file Dispatcher.h.
Value<Argus::AwbMode> ArgusSamples::Dispatcher::m_awbMode |
auto white balance mode
Definition at line 294 of file Dispatcher.h.
|
private |
a list of available devices
Definition at line 405 of file Dispatcher.h.
|
private |
camera provider
Definition at line 402 of file Dispatcher.h.
|
private |
internal capture session
Definition at line 407 of file Dispatcher.h.
Value<Argus::PixelFormat> ArgusSamples::Dispatcher::m_captureYuvFormat |
NV12 vs. P016 YUV color depth.
Definition at line 280 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 312 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_deFogEnable |
enable
Definition at line 311 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_deFogQuality |
quality of the effect. Range 0.0 - 1.0 (low - high)
Definition at line 313 of file Dispatcher.h.
Value<Argus::DenoiseMode> ArgusSamples::Dispatcher::m_denoiseMode |
denoise mode
Definition at line 283 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_denoiseStrength |
denoise strength
Definition at line 284 of file Dispatcher.h.
|
private |
device aperture motor speed range
Definition at line 250 of file Dispatcher.h.
|
private |
device aperture motor step range
Definition at line 249 of file Dispatcher.h.
|
private |
exposure compensation range
Definition at line 251 of file Dispatcher.h.
|
private |
device focus position range
Definition at line 248 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_deviceIndex |
the device index
Definition at line 263 of file Dispatcher.h.
|
private |
device isp digital gain range
Definition at line 253 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_deviceOpen |
if set then the device is open
Definition at line 264 of file Dispatcher.h.
Value<Argus::EdgeEnhanceMode> ArgusSamples::Dispatcher::m_edgeEnhanceMode |
edge enhancement mode
Definition at line 287 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_edgeEnhanceStrength |
edge enhancement strength
Definition at line 288 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_exposureCompensation |
exposure compensation
Definition at line 295 of file Dispatcher.h.
Value<Argus::Range<uint64_t> > ArgusSamples::Dispatcher::m_exposureTimeRange |
exposure time range
Definition at line 273 of file Dispatcher.h.
Value<int32_t> ArgusSamples::Dispatcher::m_focusPosition |
focus position
Definition at line 277 of file Dispatcher.h.
Value<float> ArgusSamples::Dispatcher::m_frameRate |
in frames per second
Definition at line 276 of file Dispatcher.h.
Value<Argus::Range<float> > ArgusSamples::Dispatcher::m_gainRange |
gain range
Definition at line 274 of file Dispatcher.h.
|
private |
camera provider interface
Definition at line 403 of file Dispatcher.h.
|
private |
if set the dispatcher is initialized
Definition at line 398 of file Dispatcher.h.
Value<Argus::Range<float> > ArgusSamples::Dispatcher::m_ispDigitalGainRange |
ISP digital Gain Range.
Definition at line 296 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_kpi |
if set kpi mode is enabled and kpi number are printed
Definition at line 270 of file Dispatcher.h.
|
private |
Definition at line 400 of file Dispatcher.h.
Value<std::string> ArgusSamples::Dispatcher::m_outputPath |
output path
Definition at line 308 of file Dispatcher.h.
Value<Argus::Size2D<uint32_t> > ArgusSamples::Dispatcher::m_outputSize |
output size
Definition at line 307 of file Dispatcher.h.
|
private |
analog gain range
Definition at line 259 of file Dispatcher.h.
|
private |
exposure time range
Definition at line 257 of file Dispatcher.h.
|
private |
frame rate range
Definition at line 260 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_sensorModeIndex |
the sensor mode index
Definition at line 275 of file Dispatcher.h.
|
private |
sensor modes
Definition at line 247 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_sensorModeValid |
Definition at line 265 of file Dispatcher.h.
Value<StillFileType> ArgusSamples::Dispatcher::m_stillFileType |
the still image file format
Definition at line 299 of file Dispatcher.h.
Value<bool> ArgusSamples::Dispatcher::m_verbose |
if set verbose mode is enabled and messages are printed
Definition at line 268 of file Dispatcher.h.
Value<uint32_t> ArgusSamples::Dispatcher::m_videoBitRate |
the video bit rate
Definition at line 304 of file Dispatcher.h.
Value<VideoPipeline::VideoFileType> ArgusSamples::Dispatcher::m_videoFileType |
the video file type
Definition at line 303 of file Dispatcher.h.
Value<VideoPipeline::VideoFormat> ArgusSamples::Dispatcher::m_videoFormat |
the video format
Definition at line 302 of file Dispatcher.h.