X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcodec.h;fp=source%2Fcodec.h;h=d3737400803b700a8dd325cf5283e9adb660422d;hp=bb35b0b43528ca4eba14dc66682f43ae26bca651;hb=271ffa9434c8d9397bb5170cf1ee670c5265ec60;hpb=f9e0275e476540c1b5d61c03a6a87d521856059b diff --git a/source/codec.h b/source/codec.h index bb35b0b..d373740 100644 --- a/source/codec.h +++ b/source/codec.h @@ -160,6 +160,11 @@ public: virtual ~Codec() { } + /** + Returns the name of the encoding handled by this codec. + */ + virtual const char *get_name() const =0; + /** Creates an encoder for this codec. */ @@ -231,6 +236,12 @@ deleting the codec when it's no longer needed. */ Codec *create_codec(const std::string &); +/** +Automatically detects the encoding of a string and creates a codec for it. +The codec must be deleted when it's no longer needed. +*/ +Codec *detect_codec(const std::string &); + } // namespace Codecs } // namespace Msp