|
| DynamicMemoryBufferT (bool ParentAutoDelete=true) |
| Default constructor. More...
|
|
virtual | ~DynamicMemoryBufferT () |
| Destructor. More...
|
|
virtual void | NextBlock (const char *Buffer, size_type Size) |
| Add a buffer to the frame file memory image. More...
|
|
virtual void | Reset () |
| Initialize buffer to accumulate a frame file.
|
|
| DynamicMemoryBufferT (bool ParentAutoDelete=true) |
| Default constructor. More...
|
|
virtual | ~DynamicMemoryBufferT () |
| Destructor.
|
|
virtual void | NextBlock (const char *Buffer, size_type Size) |
| Add a buffer to the frame file memory image. More...
|
|
virtual void | Reset () |
| Initialize buffer to accumulate a frame file.
|
|
bool | FilterInternally () const |
| Returns true if filtering happens internally; false otherwise. More...
|
|
bool | FilterInternally () const |
| Returns true if filtering happens internally; false otherwise.
|
|
virtual void | FilterAdd (FrameCPP::Common::StreamFilter *Filter) |
| Adds a filter to the stream. More...
|
|
virtual void | FilterAdd (FrameCPP::Common::StreamFilter *Filter) |
| Adds a filter to the stream. More...
|
|
virtual void | FilterRemove (FrameCPP::Common::StreamFilter *Filter) |
| Removes a filter from the stream. More...
|
|
virtual void | FilterRemove (FrameCPP::Common::StreamFilter *Filter) |
| Removes a filter from the stream. More...
|
|
const std::string & | BufferId () const |
| Retrieve the string identification of the buffer. More...
|
|
const std::string & | BufferId () const |
| Retrieve the string identification of the buffer. More...
|
|
delta_t_type | DeltaT () const |
| Retrieve the duration of the stream.
|
|
delta_t_type | DeltaT () const |
| Retrieve the duration of the stream.
|
|
size_type | NextBlockSize () const |
| Return the number of bytes to be made available.
|
|
size_type | NextBlockSize () const |
| Return the number of bytes to be made available.
|
|
size_type | Position () const |
| Return the current position in the stream being scanned.
|
|
size_type | Position () const |
| Return the current position in the stream being scanned.
|
|
bool | Ready () const |
| Check if a complete frame file is ready for processing.
|
|
bool | Ready () const |
| Check if a complete frame file is ready for processing.
|
|
start_time_type | StartTime () const |
| Retrieve the start time of the stream.
|
|
start_time_type | StartTime () const |
| Retrieve the start time of the stream.
|
|
template<typename BT = std::stringbuf>
class FrameCPP::Common::DynamicMemoryBufferT< BT >
Buffer appropriate for caching frame data.
If the buffer is for input, then the buffer needs to be initialized with the contents. The initialization needs to be done as via by reading chuncks of data and having the class stitch them together until a complete frame file object is available for processing.
mb.Reset( );
boost::scoped_array read_buffer;
std::ifstream s;
s.open( filename.c_str( ) );
while ( ! mb.Ready( ) )
{
read_size = mb.NextBlockSize( );
if ( read_buffer_size < read_size )
{
read_buffer.reset( new char[ read_size ] );
read_buffer_size = read_size;
}
s.read( read_buffer.get( ), read_size );
mb.NextBlock( read_buffer.get( ), read_size );
}
s.close( );