#include <Codec.h>
|
| Codec (const std::string &name) throw () |
|
Codec factory class.
- See Also
- CodecRegistry to create Codec instances.
Definition at line 27 of file Codec.h.
Back-appendable collection of std::string, optimally for static readonly data
Definition at line 38 of file Codec.h.
Audio::Codec::Codec |
( |
const std::string & |
name) | |
|
throw | ( | |
| ) | | |
|
protected |
Internal constructor
Definition at line 14 of file Codec.cpp.
Returns whether this codec instanc can handle the specified file.
- Parameters
-
path | the file to be tested |
canOpen | whether opening the file to take a peek is allowed. If not, the implementation should rely on the filename alone to do its task (ie: look for an extension). See the remarks for more details. |
Implemented in Audio::OggCodec, and Audio::FFCodec.
const std::vector< std::string > * Audio::Codec::getExtensions |
( |
) | |
const |
throw | ( | |
| ) | | |
|
virtual |
Return a list of supported extensions.
- Though supported extensions are a big help to the codec registry
- when asked to suggest codecs for a file, a null value can be returned asking the registry to always try this codec. This is useful if the codec can handle many (perhaps unknown) file types, or if there is no associated extension to the type handled.
- The base implementation does just that - returns null.
- It is expected that files named with returned extensions will pass the
- tests for canHandle(path,false). Though this may not always be true. So the final test canHandle(path,true) should never be skipped, even if the file includes an extension within the returned set.
Reimplemented in Audio::OggCodec.
Definition at line 23 of file Codec.cpp.
const std::string & Audio::Codec::getName |
( |
) | |
const |
throw | ( | |
| ) | | |
Return the descriptive name of the codec.
Definition at line 18 of file Codec.cpp.
The documentation for this class was generated from the following files: