WaveFileSink Class Reference

EssenceSink that writes a wave file to the currently open file. More...

Inheritance diagram for WaveFileSink:

EssenceSink RefCount IRefCount List of all members.

Public Member Functions

 WaveFileSink (FileHandle File, unsigned int Channels, UInt32 SamplesPerSec, unsigned int BitsPerSample, UInt32 DataSize=0)
virtual ~WaveFileSink ()
 Clean up.
virtual bool PutEssenceData (UInt8 *const Buffer, size_t BufferSize, bool EndOfItem=true)
 Receive the next "installment" of essence data.
virtual bool EndOfData (void)
 Called once all data exhausted.

Protected Attributes

FileHandle File
 The file to write.
unsigned int ChannelCount
 The number of audio channels.
UInt32 SamplesPerSec
 The sample rate in smaples per second.
unsigned int BitsPerSample
 The number of bits per sample, per channel.
UInt32 DataSize
 The size of the entire data chunk of the finished wave file (if known), else 0.
bool HeaderWritten
 Set true once the wave header has been written.
bool EndCalled
 True once EndOfData is called.

Private Member Functions

 WaveFileSink ()

Detailed Description

EssenceSink that writes a wave file to the currently open file.


Constructor & Destructor Documentation

WaveFileSink (  )  [private]

WaveFileSink ( FileHandle  File,
unsigned int  Channels,
UInt32  SamplesPerSec,
unsigned int  BitsPerSample,
UInt32  DataSize = 0 
) [inline]

virtual ~WaveFileSink (  )  [inline, virtual]

Clean up.


Member Function Documentation

bool PutEssenceData ( UInt8 *const   Buffer,
size_t  BufferSize,
bool  EndOfItem = true 
) [virtual]

Receive the next "installment" of essence data.

This will recieve a buffer containing thhe next bytes of essence data

Parameters:
Buffer The data buffer
BufferSize The number of bytes in the data buffer
EndOfItem This buffer is the last in this wrapping item
Returns:
True if all is OK, else false
Note:
The first call may well fail if the sink has not been fully configured.

If false is returned the caller should make no more calls to this function, but the function should be implemented such that it is safe to do so

Implements EssenceSink.

bool EndOfData ( void   )  [virtual]

Called once all data exhausted.

Returns:
true if all is OK, else false
Note:
This function must also be called from the derived class' destructor in case it is never explicitly called

Implements EssenceSink.


Member Data Documentation

FileHandle File [protected]

The file to write.

unsigned int ChannelCount [protected]

The number of audio channels.

UInt32 SamplesPerSec [protected]

The sample rate in smaples per second.

unsigned int BitsPerSample [protected]

The number of bits per sample, per channel.

UInt32 DataSize [protected]

The size of the entire data chunk of the finished wave file (if known), else 0.

bool HeaderWritten [protected]

Set true once the wave header has been written.

bool EndCalled [protected]

True once EndOfData is called.


The documentation for this class was generated from the following file:
Generated on Mon Apr 2 15:21:02 2007 for MXFLib by  doxygen 1.5.1-p1