Commit 636fd386 authored by Emmanuel Milou's avatar Emmanuel Milou

Each codec sends its bitrate and bandwidth

!!!!!!!!!!!!!!!!!!!!!!!!!!!
REMOVE ILBC CODEC FROM INSTALLATION DIRECTORY (ie libdir/sflphone/codecs ) TO MAKE IT WORK
parent 98d0f226
......@@ -33,8 +33,8 @@ libcodec_ilbc_so_LDFLAGS = -shared ilbc/*.o -lc
SUBDIRS = ilbc
install-exec-local: install-libcodec_ulaw_so install-libcodec_alaw_so $(INSTALL_GSM_RULE) $(INSTALL_SPEEX_RULE) install-libcodec_ilbc_so
uninstall-local: uninstall-libcodec_ulaw_so uninstall-libcodec_alaw_so uninstall-libcodec_gsm_so uninstall-libcodec_speex_so uninstall-libcodec_ilbc_so
install-exec-local: install-libcodec_ulaw_so install-libcodec_alaw_so $(INSTALL_GSM_RULE) $(INSTALL_SPEEX_RULE)
uninstall-local: uninstall-libcodec_ulaw_so uninstall-libcodec_alaw_so uninstall-libcodec_gsm_so uninstall-libcodec_speex_so
install-libcodec_ulaw_so: libcodec_ulaw.so
mkdir -p $(sflcodecdir)
......@@ -45,8 +45,8 @@ install-libcodec_gsm_so: libcodec_gsm.so
$(INSTALL_PROGRAM) libcodec_gsm.so $(sflcodecdir)
install-libcodec_speex_so: libcodec_speex.so
$(INSTALL_PROGRAM) libcodec_speex.so $(sflcodecdir)
install-libcodec_ilbc_so: libcodec_ilbc.so
$(INSTALL_PROGRAM) libcodec_ilbc.so $(sflcodecdir)
#install-libcodec_ilbc_so: libcodec_ilbc.so
# $(INSTALL_PROGRAM) libcodec_ilbc.so $(sflcodecdir)
uninstall-libcodec_ulaw_so:
......@@ -57,7 +57,7 @@ uninstall-libcodec_gsm_so:
rm -f $(sflcodecdir)/libcodec_gsm.so
uninstall-libcodec_speex_so:
rm -f $(sflcodecdir)/libcodec_speex.so
uninstall-libcodec_ilbc_so:
rm -f $(sflcodecdir)/libcodec_ilbc.so
rm -rf $(sflcodecdir)
#uninstall-libcodec_ilbc_so:
# rm -f $(sflcodecdir)/libcodec_ilbc.so
......@@ -29,6 +29,8 @@ public:
{
_clockRate = 8000;
_channel = 1;
_bitrate = 64;
_bandwidth = 80;
}
virtual ~Alaw(){}
......
......@@ -16,12 +16,13 @@ protected:
/** Number of channel 1 = mono, 2 = stereo */
unsigned int _channel;
double _bitrate;
double _bandwidth;
private:
int _payload;
bool _hasDynamicPayload;
bool _state;
double _bitrate;
double _bandwidth;
public:
AudioCodec(int payload, const std::string &codecName)
......
......@@ -33,6 +33,8 @@ public:
Gsm (int payload=3): AudioCodec(payload, "GSM"){
_clockRate = 8000;
_channel = 1;
_bitrate = 13.3;
_bandwidth = 29.2;
if (!(_decode_gsmhandle = gsm_create() ))
printf("ERROR: decode_gsm_create\n");
......
......@@ -12,6 +12,8 @@ public:
: AudioCodec(payload, "iLBC"){
_clockRate = 8000;
_channel = 1;
_bitrate = 13.3;
_bandwidth = 31.3;
initILBC();
......
......@@ -29,6 +29,8 @@ public:
{
_clockRate = 8000;
_channel = 1;
_bitrate = 0;
_bandwidth = 0;
initSpeex();
}
......
......@@ -31,6 +31,8 @@ public:
{
_clockRate = 8000;
_channel = 1;
_bitrate = 64;
_bandwidth = 80;
}
virtual int codecDecode (short *dst, unsigned char *src, unsigned int size) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment