mx::IStreamSource Class Reference
[Component Interfaces]

Interface to byte stream sources, as for example sources of (media) streams. More...

#include <IStreamSource.h>

Inheritance diagram for mx::IStreamSource:

mx::IErrorState mx::IRequiresActivation mx::IInterface mx::IInterface mx::IAsyncStreamSource mx::IStreamSourceFile mx::IHTTPGetStreamSource mx::StreamFile mx::HTTPGetStreamSourceCore mx::HTTPGetStreamSource List of all members.

Public Member Functions

virtual int fetchStreamBytes (mxm::u8 *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

Interface to byte stream sources, as for example sources of (media) streams.

Author:
[khe] Kai Hergenroether


Member Function Documentation

virtual int mx::IStreamSource::fetchStreamBytes mxm::u8 *  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 mx::HTTPGetStreamSource, and mx::StreamFile.

virtual bool mx::IStreamSource::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 mx::HTTPGetStreamSource, and mx::StreamFile.


The documentation for this class was generated from the following file:
Generated on Fri Jun 29 17:21:06 2007 for MxPEG SDK by  doxygen 1.4.6