A class for pluggable stream type resolution.
This class is used to extend TagLib's very basic file name based file type resolution.
This can be accomplished with:
{
{
if(someCheckForAnMP3File(fileName))
return nullptr;
}
{
if(someCheckForAnMP3Stream(s))
return nullptr;
}
}
ReadStyle
Definition: audioproperties.h:56
virtual File * createFile(FileName fileName, bool readAudioProperties=true, AudioProperties::ReadStyle audioPropertiesStyle=AudioProperties::Average) const =0
A class for pluggable stream type resolution.
Definition: fileref.h:140
virtual File * createFileFromStream(IOStream *stream, bool readAudioProperties=true, AudioProperties::ReadStyle audioPropertiesStyle=AudioProperties::Average) const =0
static const FileTypeResolver * addFileTypeResolver(const FileTypeResolver *resolver)
A file class with some useful methods for tag manipulation.
Definition: tfile.h:51
An abstract class that provides operations on a sequence of bytes.
Definition: tiostream.h:65
An MPEG file class with some useful methods specific to MPEG.
Definition: mpegfile.h:54
const char * FileName
Definition: tiostream.h:59
Naturally a less contrived example would be slightly more complex. This can be used to plug in mime-type detection systems or to add new file types to TagLib.