Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

mxcpcStreamSource Class Reference
[mxcpc_core (Core Module - MxPEG Decoding Infrastructure)]

Abstract representation of a (media) stream source. More...

#include <mxcpcStreamSource.h>

Inheritance diagram for mxcpcStreamSource:

mxcpcCameraLiveMxPEGFastStream mxcpcStreamFile mxcpcAsynchronousCameraLiveMxPEGFastStream mxcpcCameraLiveMxPEGFastStreamPOSIX List of all members.

Public Member Functions

virtual ~mxcpcStreamSource ()
 /// // Mx clientSDK
virtual int fetchBytes (unsigned char *buffer, int num)=0
 Fetches at most num raw stream bytes from the stream source, writes them to the specified buffer, and returns the number of bytes actually fetched.
virtual bool stillUp (void)=0
 Returns whether or not the stream source is still operational.

Detailed Description

Abstract representation of a (media) stream source.

Definition at line 29 of file mxcpcStreamSource.h.


Member Function Documentation

virtual int mxcpcStreamSource::fetchBytes unsigned char *  buffer,
int  num
[pure virtual]
 

Fetches at most num raw stream bytes from the stream source, writes them to the specified buffer, and returns the number of bytes actually fetched.

A return value of 0 is not necessarily an error - maybe there simply were no more bytes available when the method was called.

However, in case of error, it is also 0 that is returned.

In case of a return value of 0, use the stillUp() method to test whether or not the stream source is still operational. If it is not, all subsequent calls to fetchBytes() will return 0.

Implemented in mxcpcCameraLiveMxPEGFastStreamPOSIX, mxcpcStreamFile, and mxcpcAsynchronousCameraLiveMxPEGFastStream.

Referenced by mxcpcFramewiseMxPEGDecoder::decode().

virtual bool mxcpcStreamSource::stillUp void   )  [pure virtual]
 

Returns whether or not the stream source is still operational.

If a stream source has become "not-up" once, it will never come up again. Instead, its fetchBytes() method will return 0 on all subsequent calls. Possible examples for a stream source that has become no longer up are an encountered EOF or read error.

Implemented in mxcpcStreamFile, and mxcpcAsynchronousCameraLiveMxPEGFastStream.

Referenced by mxcpcStreamDecoder::sourceStillUp().


The documentation for this class was generated from the following files:
Generated on Mon Jan 30 15:13:10 2006 for mxcpc by  doxygen 1.4.4