2
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010, 2011 Savoir-Faire Linux Inc.
3
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
5
* Motly borrowed from asterisk's sources (Steve Underwood <steveu@coppice.org>)
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
2
* Copyright (C) 2004-2012 Savoir-Faire Linux Inc.
3
* Author: Alexandre Savard <alexandre.savard@savoirfairelinux.com>
5
* Mostly borrowed from asterisk's sources (Steve Underwood <steveu@coppice.org>)
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 3 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
21
* Additional permission under GNU GPL version 3 section 7:
53
virtual int decode(SFLDataFormat *dst, unsigned char *src, size_t buf_size)
53
int decode(SFLDataFormat *dst, unsigned char *src, size_t buf_size)
55
55
return g722_decode(dst, src, buf_size);
58
virtual int encode(unsigned char *dst, SFLDataFormat *src, size_t /*buf_size*/)
58
int encode(unsigned char *dst, SFLDataFormat *src, size_t /*buf_size*/)
60
60
int out = g722_encode(dst, src, frameSize_);
759
759
// the class factories
760
760
// cppcheck-suppress unusedFunction
761
extern "C" sfl::Codec* CODEC_ENTRY()
761
extern "C" sfl::AudioCodec* AUDIO_CODEC_ENTRY()
766
766
// cppcheck-suppress unusedFunction
767
extern "C" void destroy(sfl::Codec* a)
767
extern "C" void destroy(sfl::AudioCodec* a)