CLAM::AudioCodecs::Codec Class Reference

A codec implements a file audio format support. More...

#include <AudioCodec.hxx>

List of all members.

Public Member Functions

virtual ~Codec ()
virtual bool IsReadable (std::string filename) const =0
 Returns whether the filename is readable by the codec.
virtual bool IsWritable (std::string filename, const AudioFileHeader &) const =0
 Returns whether codec can write a file with such name and header parameters.
virtual StreamGetStreamFor (const AudioFile &)=0
 Returns an Stream object to read or write on.
virtual void RetrieveHeaderData (std::string uri, AudioFileHeader &)=0
 Returns a header structure containing file information (length, encoding.
virtual void RetrieveTextDescriptors (std::string uri, AudioTextDescriptors &)
 Returns textual meta information embedded on the audio file such ID3 tags.

Static Public Member Functions

static bool FileExists (std::string filename)

Detailed Description

A codec implements a file audio format support.

Subclasses should reimplement its methods to support a concrete audio file format.

Definition at line 43 of file AudioCodec.hxx.


Constructor & Destructor Documentation

CLAM::AudioCodecs::Codec::~Codec (  )  [virtual]

Definition at line 24 of file AudioCodec.cxx.

Referenced by FileExists().


Member Function Documentation

bool CLAM::AudioCodecs::Codec::FileExists ( std::string  filename  )  [static]

Definition at line 29 of file AudioCodec.cxx.

References NULL, and ~Codec().

virtual Stream* CLAM::AudioCodecs::Codec::GetStreamFor ( const AudioFile  )  [pure virtual]

Returns an Stream object to read or write on.

Implemented in CLAM::AudioCodecs::MpegCodec, CLAM::AudioCodecs::OggVorbisCodec, and CLAM::AudioCodecs::PCMCodec.

virtual bool CLAM::AudioCodecs::Codec::IsReadable ( std::string  filename  )  const [pure virtual]

Returns whether the filename is readable by the codec.

Implemented in CLAM::AudioCodecs::MpegCodec, CLAM::AudioCodecs::OggVorbisCodec, and CLAM::AudioCodecs::PCMCodec.

Referenced by CLAM::AudioFile::GetStream().

virtual bool CLAM::AudioCodecs::Codec::IsWritable ( std::string  filename,
const AudioFileHeader  
) const [pure virtual]

Returns whether codec can write a file with such name and header parameters.

Implemented in CLAM::AudioCodecs::MpegCodec, CLAM::AudioCodecs::OggVorbisCodec, and CLAM::AudioCodecs::PCMCodec.

virtual void CLAM::AudioCodecs::Codec::RetrieveHeaderData ( std::string  uri,
AudioFileHeader  
) [pure virtual]

Returns a header structure containing file information (length, encoding.

..)

Implemented in CLAM::AudioCodecs::MpegCodec, CLAM::AudioCodecs::OggVorbisCodec, and CLAM::AudioCodecs::PCMCodec.

void CLAM::AudioCodecs::Codec::RetrieveTextDescriptors ( std::string  uri,
AudioTextDescriptors tdesc 
) [virtual]

Returns textual meta information embedded on the audio file such ID3 tags.

Reimplemented in CLAM::AudioCodecs::MpegCodec, and CLAM::AudioCodecs::OggVorbisCodec.

Definition at line 50 of file AudioCodec.cxx.


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3