Fraxinus  16.5.0-fx-rc9
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cx::VideoSourceSHM Class Reference

VideoSource for connecting to shared memory. More...

#include <cxVideoSourceSHM.h>

Inheritance diagram for cx::VideoSourceSHM:
cx::VideoSource

Public Member Functions

 VideoSourceSHM (int width=0, int height=0, int depth=24)
 
virtual ~VideoSourceSHM ()
 
int width () const
 
int height () const
 
int depth () const
 
virtual QString getUid ()
 
virtual QString getName ()
 
virtual vtkImageDataPtr getVtkImageData ()
 
virtual double getTimestamp ()
 
virtual QString getInfoString () const
 Returns a short info message. More...
 
virtual QString getStatusString () const
 Returns a short status message. More...
 
virtual void start ()
 start streaming More...
 
virtual void stop ()
 stop streaming More...
 
virtual bool validData () const
 return true is data stream is ok to display. This is a heuristic based on the data rate. More...
 
virtual bool isConnected () const
 return true when a connection to the data source is established. More...
 
virtual bool isStreaming () const
 return true when the source is streaming data. More...
 
void connectServer (const QString &key)
 
void disconnectServer ()
 
virtual void setResolution (double resolution)
 
- Public Member Functions inherited from cx::VideoSource
virtual ~VideoSource ()
 
virtual TimeInfo getAdvancedTimeInfo ()=0
 

Protected Member Functions

void update ()
 

Protected Attributes

int mImageWidth
 
int mImageHeight
 
int mImageColorDepth
 

Additional Inherited Members

- Signals inherited from cx::VideoSource
void streaming (bool on)
 emitted when streaming started/stopped More...
 
void connected (bool on)
 emitted when source is connected/disconnected More...
 
void newFrame ()
 emitted when a new frame has arrived (getVtkImageData() returns something new). info/status/name/valid might also have changed More...
 

Detailed Description

VideoSource for connecting to shared memory.

Contains data assosiated with a shared memory video stream

Definition at line 73 of file cxVideoSourceSHM.h.

Constructor & Destructor Documentation

cx::VideoSourceSHM::VideoSourceSHM ( int  width = 0,
int  height = 0,
int  depth = 24 
)

Definition at line 49 of file cxVideoSourceSHM.cpp.

cx::VideoSourceSHM::~VideoSourceSHM ( )
virtual

Definition at line 69 of file cxVideoSourceSHM.cpp.

Member Function Documentation

void cx::VideoSourceSHM::connectServer ( const QString &  key)

Connects to a shared memory server end, described by a unique key string. Connects signals and slots on success.

Definition at line 184 of file cxVideoSourceSHM.cpp.

int cx::VideoSourceSHM::depth ( ) const
inline

Definition at line 84 of file cxVideoSourceSHM.h.

void cx::VideoSourceSHM::disconnectServer ( )

Disconnects from current shared memory server end. Disconnects signals and slots.

Definition at line 203 of file cxVideoSourceSHM.cpp.

QString cx::VideoSourceSHM::getInfoString ( ) const
virtual

Returns a short info message.

Implements cx::VideoSource.

Definition at line 96 of file cxVideoSourceSHM.cpp.

QString cx::VideoSourceSHM::getName ( )
virtual

Implements cx::VideoSource.

Definition at line 80 of file cxVideoSourceSHM.cpp.

QString cx::VideoSourceSHM::getStatusString ( ) const
virtual

Returns a short status message.

Implements cx::VideoSource.

Definition at line 102 of file cxVideoSourceSHM.cpp.

double cx::VideoSourceSHM::getTimestamp ( )
virtual

Implements cx::VideoSource.

Definition at line 90 of file cxVideoSourceSHM.cpp.

QString cx::VideoSourceSHM::getUid ( )
virtual

Implements cx::VideoSource.

Definition at line 75 of file cxVideoSourceSHM.cpp.

vtkImageDataPtr cx::VideoSourceSHM::getVtkImageData ( )
virtual

Implements cx::VideoSource.

Definition at line 85 of file cxVideoSourceSHM.cpp.

int cx::VideoSourceSHM::height ( ) const
inline

Definition at line 83 of file cxVideoSourceSHM.h.

bool cx::VideoSourceSHM::isConnected ( ) const
virtual

return true when a connection to the data source is established.

Implements cx::VideoSource.

Definition at line 145 of file cxVideoSourceSHM.cpp.

bool cx::VideoSourceSHM::isStreaming ( ) const
virtual

return true when the source is streaming data.

Implements cx::VideoSource.

Definition at line 150 of file cxVideoSourceSHM.cpp.

void cx::VideoSourceSHM::setResolution ( double  mmPerPixel)
virtual

Set the resolution of the incoming video in mm/pixel

Reimplemented from cx::VideoSource.

Definition at line 225 of file cxVideoSourceSHM.cpp.

void cx::VideoSourceSHM::start ( )
virtual

start streaming

Implements cx::VideoSource.

Definition at line 107 of file cxVideoSourceSHM.cpp.

void cx::VideoSourceSHM::stop ( )
virtual

stop streaming

Implements cx::VideoSource.

Definition at line 125 of file cxVideoSourceSHM.cpp.

void cx::VideoSourceSHM::update ( )
protected

Grabs latest video source frame (if it exists) and signals a new frame Must call release on this when buffer no longer is needed

Definition at line 159 of file cxVideoSourceSHM.cpp.

bool cx::VideoSourceSHM::validData ( ) const
virtual

return true is data stream is ok to display. This is a heuristic based on the data rate.

Implements cx::VideoSource.

Definition at line 139 of file cxVideoSourceSHM.cpp.

int cx::VideoSourceSHM::width ( ) const
inline

Definition at line 82 of file cxVideoSourceSHM.h.

Member Data Documentation

int cx::VideoSourceSHM::mImageColorDepth
protected

Definition at line 111 of file cxVideoSourceSHM.h.

int cx::VideoSourceSHM::mImageHeight
protected

Definition at line 110 of file cxVideoSourceSHM.h.

int cx::VideoSourceSHM::mImageWidth
protected

Definition at line 109 of file cxVideoSourceSHM.h.


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