VisionWorks Toolkit Reference

April 8, 2016 | 1.4 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 115 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 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 151 of file FrameSource.hpp.

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 139 of file FrameSource.hpp.

Constructor & Destructor Documentation

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

Destructor.

Definition at line 196 of file FrameSource.hpp.

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

Definition at line 220 of file FrameSource.hpp.

Member Function Documentation

virtual void nvxio::FrameSource::close ( )
pure virtual

Closes the FrameSource.

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

Fetches frames from the source.

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.
std::string nvxio::FrameSource::getSourceName ( ) const
inline

Returns the source name of the FrameSource.

Returns
Source name.

Definition at line 214 of file FrameSource.hpp.

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

Returns the source type of the FrameSource.

Returns
FrameSource::SourceType.

Definition at line 204 of file FrameSource.hpp.

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

Opens 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).

Field Documentation

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

Definition at line 226 of file FrameSource.hpp.

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

Definition at line 225 of file FrameSource.hpp.


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