namespace NLayer
{
///
/// Defines a standard way of representing a MPEG frame to the decoder
///
public interface IMpegFrame
{
///
/// Sample rate of this frame
///
int SampleRate { get; }
///
/// The samplerate index (directly from the header)
///
int SampleRateIndex { get; }
///
/// Frame length in bytes
///
int FrameLength { get; }
///
/// Bit Rate
///
int BitRate { get; }
///
/// MPEG Version
///
MpegVersion Version { get; }
///
/// MPEG Layer
///
MpegLayer Layer { get; }
///
/// Channel Mode
///
MpegChannelMode ChannelMode { get; }
///
/// The number of samples in this frame
///
int ChannelModeExtension { get; }
///
/// The channel extension bits
///
int SampleCount { get; }
///
/// The bitrate index (directly from the header)
///
int BitRateIndex { get; }
///
/// Whether the Copyright bit is set
///
bool IsCopyrighted { get; }
///
/// Whether a CRC is present
///
bool HasCrc { get; }
///
/// Whether the CRC check failed (use error concealment strategy)
///
bool IsCorrupted { get; }
///
/// Resets the bit reader so frames can be reused
///
void Reset();
///
/// Provides sequential access to the bitstream in the frame (after the header and optional CRC)
///
/// The number of bits to read
/// -1 if the end of the frame has been encountered, otherwise the bits requested
int ReadBits(int bitCount);
}
}