Skip to content
Snippets Groups Projects
Commit 316c088d authored by Tristan Matthews's avatar Tristan Matthews
Browse files

Codec.h: removed unused function

parent be6314a0
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#ifndef __SFL_CODEC_H__ #ifndef __SFL_CODEC_H__
#define __SFL_CODEC_H__ #define __SFL_CODEC_H__
#include <cc++/digest.h> #include <cc++/config.h> // for types
/** /**
* Interface for both audio codecs as well as video codecs. * Interface for both audio codecs as well as video codecs.
...@@ -65,36 +65,6 @@ class Codec ...@@ -65,36 +65,6 @@ class Codec
* @return The bitrate for which this codec is configured // TODO deal with VBR case. * @return The bitrate for which this codec is configured // TODO deal with VBR case.
*/ */
virtual double getBitRate() const = 0; virtual double getBitRate() const = 0;
/**
* Build a unique hash code for identifying the codec uniquely.
* Note that if multiple implementations of codec are provided,
* one should override this function in order to avoid conflicting
* hash codes.
*
* Hash code is a CRC32 digest made from :
* MIME "." MIME SUBTYPE "." PAYLOAD TYPE "." PAYLOAD CLOCKRATE
*
* @return a unique hash code identifying this codec.
*/
virtual std::string hashCode() const {
ost::CRC32Digest digest;
std::ostringstream os;
os << getMimeType()
<< "." << getMimeSubtype()
<< "." << getPayloadType()
<< "." << getClockRate();
std::string concat = os.str();
digest.putDigest ( (const unsigned char*) concat.c_str(), concat.length());
std::ostringstream buffer;
buffer << digest;
return buffer.str();
}
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment