fix mod_lpc10 module build (part of MODAPP-44)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6126 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d910962593
commit
6ae43f954e
|
@ -24,14 +24,18 @@
|
||||||
* Contributor(s):
|
* Contributor(s):
|
||||||
*
|
*
|
||||||
* Brian K. West <brian.west@mac.com>
|
* Brian K. West <brian.west@mac.com>
|
||||||
|
* Bret McDanel <trixter AT 0xdecafbad.com>
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* mod_lpc10.c -- LPC10 Codec Module
|
* mod_lpc10.c -- LPC10 Codec Module
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "switch.h"
|
#include <switch.h>
|
||||||
#include "lpc10.h"
|
#include <lpc10.h>
|
||||||
|
|
||||||
|
SWITCH_MODULE_LOAD_FUNCTION(mod_lpc10_load);
|
||||||
|
SWITCH_MODULE_DEFINITION(mod_lpc10, mod_lpc10_load, NULL, NULL);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SamplesPerFrame = 180,
|
SamplesPerFrame = 180,
|
||||||
|
@ -44,8 +48,6 @@ enum {
|
||||||
#define MaxSampleValue 32767.0
|
#define MaxSampleValue 32767.0
|
||||||
#define MinSampleValue -32767.0
|
#define MinSampleValue -32767.0
|
||||||
|
|
||||||
static const char modname[] = "mod_lpc10";
|
|
||||||
|
|
||||||
struct lpc10_context {
|
struct lpc10_context {
|
||||||
struct lpc10_encoder_state encoder_object;
|
struct lpc10_encoder_state encoder_object;
|
||||||
struct lpc10_decoder_state decoder_object;
|
struct lpc10_decoder_state decoder_object;
|
||||||
|
@ -177,24 +179,13 @@ static switch_codec_implementation_t lpc10_implementation = {
|
||||||
/*.destroy */ switch_lpc10_destroy,
|
/*.destroy */ switch_lpc10_destroy,
|
||||||
};
|
};
|
||||||
|
|
||||||
const switch_codec_interface_t lpc10_codec_interface = {
|
SWITCH_MODULE_LOAD_FUNCTION(mod_lpc10_load)
|
||||||
/*.interface_name */ "LPC-10 2.4kbps",
|
|
||||||
/*.implementations */ &lpc10_implementation,
|
|
||||||
};
|
|
||||||
|
|
||||||
static switch_loadable_module_interface_t lpc10_module_interface = {
|
|
||||||
/*.module_name */ modname,
|
|
||||||
/*.endpoint_interface */ NULL,
|
|
||||||
/*.timer_interface */ NULL,
|
|
||||||
/*.dialplan_interface */ NULL,
|
|
||||||
/*.codec_interface */ &lpc10_codec_interface,
|
|
||||||
/*.application_interface */ NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
|
||||||
{
|
{
|
||||||
|
switch_codec_interface_t *codec_interface;
|
||||||
|
|
||||||
/* connect my internal structure to the blank pointer passed to me */
|
/* connect my internal structure to the blank pointer passed to me */
|
||||||
*module_interface = &lpc10_module_interface;
|
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||||
|
SWITCH_ADD_CODEC(codec_interface, "LPC-10 2.4kbps", &lpc10_implementation);
|
||||||
|
|
||||||
/* indicate that the module should continue to be loaded */
|
/* indicate that the module should continue to be loaded */
|
||||||
return SWITCH_STATUS_SUCCESS;
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue