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

Revert "* #6295: removed unused clone method"

This reverts commit d04bf094.
parent d04bf094
Branches
Tags
No related merge requests found
......@@ -32,6 +32,8 @@
#include "MimeParameters.h" // TODO Move to some higher directory
#include <tr1/memory>
#include <cc++/digest.h>
/**
......@@ -59,6 +61,11 @@ class Codec : public virtual MimeParameters
*/
virtual std::string getDescription() const = 0;
/**
* @return A copy of the current codec.
*/
virtual Codec* clone() const = 0;
/**
* Build a unique hash code for identifying the codec uniquely.
* Note that if multiple implementations of codec are provided,
......
......@@ -135,6 +135,15 @@ class Alaw : public sfl::AudioCodec
std::string getDescription() const {
return "audio/PCMA 8000 (\"alaw\") codec.";
}
/**
* @Override
*/
Alaw* clone() const {
return new Alaw (*this);
}
};
// the class factories
......
......@@ -133,6 +133,11 @@ class AudioCodec : public Codec
*/
unsigned int getFrameSize() const;
/**
* @Override
*/
virtual AudioCodec* clone() const = 0;
protected:
/** Holds SDP-compliant codec name */
std::string _codecName; // what we put inside sdp
......
......@@ -156,6 +156,14 @@ class Celt : public sfl::AudioCodec
return "audio/celt 32000 (\"HD\") codec. Based on libcelt, by Jean-Marc Valin.";
}
/**
* @Override
*/
Celt* clone() const {
return new Celt (*this);
}
private:
CELTMode *_mode;
......
......@@ -829,6 +829,14 @@ class G722 : public sfl::AudioCodec
return "G722 codec. Most of the code comes from Steve Underwood (<steveu@coppice.org>) for the Asterisk project.";
}
/**
* @Override
*/
G722* clone() const {
return new G722 (*this);
}
private:
g722_decode_state_t *decode_s;
......
......@@ -93,6 +93,14 @@ class Gsm : public sfl::AudioCodec
return "GSM codec. Based on libgsm, (C) Jutta Degener and Carsten Bormann, Technische Universitaet Berlin.";
}
/**
* @Override
*/
Gsm* clone() const {
return new Gsm (*this);
}
private:
gsm _decode_gsmhandle;
gsm _encode_gsmhandle;
......
......@@ -121,6 +121,14 @@ class Speex : public sfl::AudioCodec
return "audio/speex 8000 (\"narrow band\") codec. Based on libspeex, by Jean-Marc Valin.";
}
/**
* @Override
*/
Speex* clone() const {
return new Speex (*this);
}
private:
const SpeexMode* _speexModePtr;
SpeexBits _speex_dec_bits;
......
......@@ -123,6 +123,14 @@ class Speex : public sfl::AudioCodec
return "audio/speex 32000 (\"ultra wide band\") codec. Based on libspeex, by Jean-Marc Valin.";
}
/**
* @Override
*/
Speex* clone() const {
return new Speex (*this);
}
private:
const SpeexMode* _speexModePtr;
SpeexBits _speex_dec_bits;
......
......@@ -122,6 +122,13 @@ class Speex : public sfl::AudioCodec
return "audio/speex 16000 (\"wide band\") codec. Based on libspeex, by Jean-Marc Valin.";
}
/**
* @Override
*/
Speex* clone() const {
return new Speex (*this);
}
private:
const SpeexMode* _speexModePtr;
SpeexBits _speex_dec_bits;
......
......@@ -130,6 +130,14 @@ class Ulaw : public sfl::AudioCodec
std::string getDescription() const {
return "audio/PCMU 8000 (\"ulaw\") codec.";
}
/**
* @Override
*/
Ulaw* clone() const {
return new Ulaw (*this);
}
};
// the class factories
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment