Jetson Linux Multimedia API Reference

32.4.3 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Argus::IEventProvider Class Referenceabstract

Detailed Description

Interface for an object which generates Events (such as CaptureSession).

Any generated Events are initially stored by the provider itself, and they are not copied out to public EventQueues until waitForEvents() is called. If at any time there is an event type offered by a provider that is not accepted by an active EventQueue created by that provider, all events of that type will be discarded.

Definition at line 56 of file EventProvider.h.

Inheritance diagram for Argus::IEventProvider:
Collaboration diagram for Argus::IEventProvider:

Public Member Functions

virtual Status getAvailableEventTypes (std::vector< EventType > *types) const =0
 Returns a list of event types that this provider can generate. More...
 
virtual EventQueuecreateEventQueue (const std::vector< EventType > &eventTypes, Status *status=NULL)=0
 Creates an event queue for events of the given type(s) More...
 
virtual Status waitForEvents (const std::vector< EventQueue * > &queues, uint64_t timeout=TIMEOUT_INFINITE)=0
 Waits for and transfers any pending events from the provider to the provided queues. More...
 
virtual Status waitForEvents (EventQueue *queue, uint64_t timeout=TIMEOUT_INFINITE)=0
 Variant of waitForEvents() that waits for only one EventQueue. More...
 

Static Public Member Functions

static const InterfaceIDid ()
 

Protected Member Functions

 ~IEventProvider ()
 

Constructor & Destructor Documentation

Argus::IEventProvider::~IEventProvider ( )
inlineprotected

Definition at line 117 of file EventProvider.h.

Member Function Documentation

virtual EventQueue* Argus::IEventProvider::createEventQueue ( const std::vector< EventType > &  eventTypes,
Status status = NULL 
)
pure virtual

Creates an event queue for events of the given type(s)

Parameters
[in]eventTypesThe list of event types for the queue.
[out]statusAn optional pointer to return success/status.
Returns
the new EventQueue object, or NULL on failure.
virtual Status Argus::IEventProvider::getAvailableEventTypes ( std::vector< EventType > *  types) const
pure virtual

Returns a list of event types that this provider can generate.

Parameters
[out]typesA vector that will be populated by the available event types.
Returns
success/status of the call.
static const InterfaceID& Argus::IEventProvider::id ( )
inlinestatic

Definition at line 59 of file EventProvider.h.

virtual Status Argus::IEventProvider::waitForEvents ( const std::vector< EventQueue * > &  queues,
uint64_t  timeout = TIMEOUT_INFINITE 
)
pure virtual

Waits for and transfers any pending events from the provider to the provided queues.

Ownership of all events transfered to a queue will be passed from the provider to the queue, and these event object pointers will remain valid until the queue is destroyed or until the next call to this function with that queue. In other words, any events in a queue will be destroyed when the queue is provided to another call of this function, regardless of whether or not it receives any new events, or when the queue is destroyed.

If more than one given queue accepts events of the same type, only the first of these queues will receive events of that type.

Any events that are not copied to queues by this function are left in the provider until they are queried using a queue receiving events of that type.

If there are no pending events of the requested types at the time this function is called, it will block until one is available or a timeout occurs.

Parameters
[in]queuesThe list of queues to transfer events to.
[in]timeoutThe maximum time (in nanoseconds) to wait for new events.
Returns
success/status of the call.
virtual Status Argus::IEventProvider::waitForEvents ( EventQueue queue,
uint64_t  timeout = TIMEOUT_INFINITE 
)
pure virtual

Variant of waitForEvents() that waits for only one EventQueue.


The documentation for this class was generated from the following file: