prip::MJPEGStream Class Reference

#include <IPCamera.h>

List of all members.


Detailed Description

Basic class for processing MJPEG streams.

Call start() to start the thread.

Author:
: blau

Definition at line 27 of file IPCamera.h.

Public Member Functions

 MJPEGStream (pt::instm &stream)
 initialises MJPEGStream.
virtual ~MJPEGStream (void)
void cancel (void)
 stops MJPEGStream handling.
std::string getJPEG (void) const
 retrieves the current JPEG.
int getFrameNr (void) const
 get current frame number.
void setFrameNr (int newFrameNr=0)
 Sets current frame number to an arbitrary number.
void resetFrameNr (void)
 Sets current frame number to 0.

Protected Member Functions

virtual void execute (void)
 This method is called by pt::thread::start() and can be considered the main-function of the thread.
virtual void cleanup (void)
 This function is automatically called when the thread gets destructed.

Protected Attributes

pt::instm & mStream
bool mCancel
std::string currentJPEG

Private Member Functions

void putJPEG (const std::string &newJPEG)

Private Attributes

pt::mutex mMutexJPEG
int mFrameNr


Constructor & Destructor Documentation

prip::MJPEGStream::MJPEGStream ( pt::instm &  stream  )  [inline]

initialises MJPEGStream.

Parameters:
stream the reference to the MJPEG stream

Definition at line 34 of file IPCamera.h.

virtual prip::MJPEGStream::~MJPEGStream ( void   )  [inline, virtual]

Definition at line 38 of file IPCamera.h.


Member Function Documentation

void prip::MJPEGStream::cancel ( void   )  [inline]

stops MJPEGStream handling.

the thread will stop after calling cancel();

Definition at line 49 of file IPCamera.h.

virtual void prip::MJPEGStream::cleanup ( void   )  [inline, protected, virtual]

This function is automatically called when the thread gets destructed.

Definition at line 151 of file IPCamera.h.

virtual void prip::MJPEGStream::execute ( void   )  [inline, protected, virtual]

This method is called by pt::thread::start() and can be considered the main-function of the thread.

Definition at line 104 of file IPCamera.h.

int prip::MJPEGStream::getFrameNr ( void   )  const [inline]

get current frame number.

The frame number is increased by 1 if a new image is completely retrieved. The initial value is 0.

Returns:
current frame number
See also:
resetFrameNr(), setFrameNr(int)

Definition at line 73 of file IPCamera.h.

std::string prip::MJPEGStream::getJPEG ( void   )  const [inline]

retrieves the current JPEG.

Returns:
current image (raw JPEG)
See also:
Util::raw2fipImage

Util::raw2IplImage

Definition at line 60 of file IPCamera.h.

void prip::MJPEGStream::putJPEG ( const std::string &  newJPEG  )  [inline, private]

Definition at line 163 of file IPCamera.h.

void prip::MJPEGStream::resetFrameNr ( void   )  [inline]

Sets current frame number to 0.

See also:
getFrameNr(), setFrameNr(int)

Definition at line 94 of file IPCamera.h.

void prip::MJPEGStream::setFrameNr ( int  newFrameNr = 0  )  [inline]

Sets current frame number to an arbitrary number.

Parameters:
newFrameNr the internal frame number will be set to this number
See also:
resetFrameNr(), getFrameNr()

Definition at line 84 of file IPCamera.h.


Member Data Documentation

std::string prip::MJPEGStream::currentJPEG [protected]

Definition at line 157 of file IPCamera.h.

bool prip::MJPEGStream::mCancel [protected]

Definition at line 155 of file IPCamera.h.

int prip::MJPEGStream::mFrameNr [private]

Definition at line 161 of file IPCamera.h.

pt::mutex prip::MJPEGStream::mMutexJPEG [mutable, private]

Definition at line 160 of file IPCamera.h.

pt::instm& prip::MJPEGStream::mStream [protected]

Definition at line 154 of file IPCamera.h.


The documentation for this class was generated from the following file:
Generated on Thu Nov 30 00:34:19 2006 for PRIP by  doxygen 1.4.7