VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvxio::FrameSource Class Referenceabstract

Detailed Description

FrameSource interface.

Common interface for reading frames from all sources.

Note
To create the object of this class call the createDefaultFrameSource method.
See also
NVXIO APIs

Definition at line 80 of file FrameSource.hpp.

Data Structures

struct  Parameters
 FrameSource parameters. More...
 

Public Types

enum  FrameStatus {
  OK,
  TIMEOUT,
  CLOSED
}
 Defines the status of read operations. More...
 
enum  SourceType {
  UNKNOWN_SOURCE,
  SINGLE_IMAGE_SOURCE,
  IMAGE_SEQUENCE_SOURCE,
  VIDEO_SOURCE,
  CAMERA_SOURCE
}
 Defines the type of source. More...
 

Public Member Functions

virtual void close ()=0
 Closes the FrameSource. More...
 
virtual FrameSource::FrameStatus fetch (vx_image image, vx_uint32 timeout=5)=0
 Fetches frames from the source. More...
 
virtual FrameSource::Parameters getConfiguration ()=0
 Gets the configuration of the FrameSource. More...
 
std::string getSourceName () const
 Returns the source name of the FrameSource. More...
 
FrameSource::SourceType getSourceType () const
 Returns the source type of the FrameSource. More...
 
virtual bool open ()=0
 Opens the FrameSource. More...
 
virtual bool setConfiguration (const FrameSource::Parameters &params)=0
 Sets the configuration of the FrameSource. More...
 
virtual ~FrameSource ()
 Destructor. More...
 

Protected Member Functions

 FrameSource (FrameSource::SourceType type=FrameSource::UNKNOWN_SOURCE, const std::string &name="Undefined")
 

Protected Attributes

const std::string sourceName
 
const FrameSource::SourceType sourceType
 

Member Enumeration Documentation

Defines the type of source.

Enumerator
UNKNOWN_SOURCE 

Indicates an unknown source.

SINGLE_IMAGE_SOURCE 

Indicates a single image.

IMAGE_SEQUENCE_SOURCE 

Indicates a sequence of images.

VIDEO_SOURCE 

Indicates a video file.

CAMERA_SOURCE 

Indicates a camera.

Definition at line 104 of file FrameSource.hpp.

Defines the status of read operations.

Enumerator
OK 

Indicates the frame has been read successfully.

TIMEOUT 

Indicates a timeout has been exceeded.

CLOSED 

Indicates the frame source has been closed.

Definition at line 116 of file FrameSource.hpp.

Constructor & Destructor Documentation

virtual nvxio::FrameSource::~FrameSource ( )
inlinevirtual

Destructor.

Definition at line 164 of file FrameSource.hpp.

nvxio::FrameSource::FrameSource ( FrameSource::SourceType  type = FrameSource::UNKNOWN_SOURCE,
const std::string &  name = "Undefined" 
)
inlineprotected

Definition at line 188 of file FrameSource.hpp.

Member Function Documentation

virtual bool nvxio::FrameSource::open ( )
pure virtual

Opens the FrameSource.

virtual FrameSource::FrameStatus nvxio::FrameSource::fetch ( vx_image  image,
vx_uint32  timeout = 5 
)
pure virtual

Fetches frames from the source.

Note
If no new frames are received within 60 seconds then FrameSource is treated as abandoned and FrameSource::fetch return a CLOSED status.
Parameters
[out]imageThe read image.
[in]timeoutSpecifies the maximum wait time for the next frame in milliseconds (ms).
Returns
A vx_status enumerator.
virtual FrameSource::Parameters nvxio::FrameSource::getConfiguration ( )
pure virtual

Gets the configuration of the FrameSource.

Returns
FrameSource::Parameters describing the current configuration of the FrameSource.
virtual bool nvxio::FrameSource::setConfiguration ( const FrameSource::Parameters params)
pure virtual

Sets the configuration of the FrameSource.

Parameters
[in]paramsA reference to the new configuration of the FrameSource.
Returns
Status of the operation (true - success).
virtual void nvxio::FrameSource::close ( )
pure virtual

Closes the FrameSource.

FrameSource::SourceType nvxio::FrameSource::getSourceType ( ) const
inline

Returns the source type of the FrameSource.

Returns
FrameSource::SourceType.

Definition at line 172 of file FrameSource.hpp.

References sourceType.

std::string nvxio::FrameSource::getSourceName ( ) const
inline

Returns the source name of the FrameSource.

Returns
Source name.

Definition at line 182 of file FrameSource.hpp.

References sourceName.

Field Documentation

const FrameSource::SourceType nvxio::FrameSource::sourceType
protected

Definition at line 193 of file FrameSource.hpp.

Referenced by getSourceType().

const std::string nvxio::FrameSource::sourceName
protected

Definition at line 194 of file FrameSource.hpp.

Referenced by getSourceName().


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