mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
move some modules to use the new module interface macros.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5343 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -32,7 +32,9 @@
|
||||
*
|
||||
*/
|
||||
#include "switch.h"
|
||||
static const char modname[] = "mod_amr";
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_amr, mod_amr_load, NULL, NULL);
|
||||
|
||||
#ifndef AMR_PASSTHROUGH
|
||||
#include "amr/interf_enc.h"
|
||||
@@ -322,7 +324,7 @@ static switch_loadable_module_interface_t amr_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_amr_load)
|
||||
{
|
||||
#ifndef AMR_PASSTHROUGH
|
||||
char *cf = "amr.conf";
|
||||
|
@@ -32,8 +32,8 @@
|
||||
#include <switch.h>
|
||||
#include <g7xx/g711.h>
|
||||
|
||||
|
||||
static const char modname[] = "mod_g711";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g711_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_g711, mod_g711_load, NULL, NULL);
|
||||
|
||||
|
||||
static switch_status_t switch_g711u_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
||||
@@ -415,7 +415,7 @@ static switch_loadable_module_interface_t g711_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g711_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &g711_module_interface;
|
||||
|
@@ -33,7 +33,8 @@
|
||||
#include <switch.h>
|
||||
#include "g7xx/g722.h"
|
||||
|
||||
static const char modname[] = "mod_g722";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g722_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_g722, mod_g722_load, NULL, NULL);
|
||||
|
||||
struct g722_context {
|
||||
g722_decode_state_t decoder_object;
|
||||
@@ -172,7 +173,7 @@ static switch_loadable_module_interface_t g722_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g722_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &g722_module_interface;
|
||||
|
@@ -49,7 +49,8 @@ Flag UseVx = True;
|
||||
enum Crate WrkRate = Rate63;
|
||||
#endif
|
||||
|
||||
static const char modname[] = "mod_g723_1";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g723_1_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_g723_1, mod_g723_1_load, NULL, NULL);
|
||||
|
||||
#ifndef G723_PASSTHROUGH
|
||||
struct g723_context {
|
||||
@@ -202,7 +203,7 @@ static switch_loadable_module_interface_t g723_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g723_1_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &g723_module_interface;
|
||||
|
@@ -33,7 +33,8 @@
|
||||
#include "g72x.h"
|
||||
#include "switch_bitpack.h"
|
||||
|
||||
static const char modname[] = "mod_g726";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g726_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_g726, mod_g726_load, NULL, NULL);
|
||||
|
||||
typedef int (*encoder_t) (int, int, g726_state *);
|
||||
typedef int (*decoder_t) (int, int, g726_state *);
|
||||
@@ -427,7 +428,7 @@ static switch_loadable_module_interface_t g726_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g726_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &g726_module_interface;
|
||||
|
@@ -31,11 +31,11 @@
|
||||
* mod_g729.c -- G729 Codec Module
|
||||
*
|
||||
*/
|
||||
|
||||
static const char modname[] = "mod_g729";
|
||||
|
||||
#include "switch.h"
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g729_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_g729, mod_g729_load, NULL, NULL);
|
||||
|
||||
#ifndef G729_PASSTHROUGH
|
||||
#include "g729/g729.h"
|
||||
|
||||
@@ -310,7 +310,7 @@ static switch_loadable_module_interface_t g729_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_g729_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &g729_module_interface;
|
||||
|
@@ -31,7 +31,10 @@
|
||||
*/
|
||||
#include "switch.h"
|
||||
#include "gsm.h"
|
||||
static const char modname[] = "mod_gsm";
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_gsm_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_gsm, mod_gsm_load, NULL, NULL);
|
||||
|
||||
struct gsm_context {
|
||||
gsm encoder;
|
||||
gsm decoder;
|
||||
@@ -162,7 +165,8 @@ static switch_loadable_module_interface_t gsm_module_interface = {
|
||||
/*.codec_interface */ &gsm_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_MODULE_LOAD_FUNCTION(mod_gsm_load)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
|
@@ -31,8 +31,8 @@
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static const char modname[] = "mod_h26x";
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_h26x_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_h26x, mod_h26x_load, NULL, NULL);
|
||||
|
||||
static switch_status_t switch_h26x_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
||||
{
|
||||
@@ -132,8 +132,7 @@ static switch_loadable_module_interface_t h26x_module_interface = {
|
||||
/*.api_interface */ NULL,
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_h26x_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &h26x_module_interface;
|
||||
|
@@ -34,7 +34,8 @@
|
||||
#include "iLBC_decode.h"
|
||||
#include "iLBC_define.h"
|
||||
|
||||
static const char modname[] = "mod_ilbc";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_ilbc_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_ilbc, mod_ilbc_load, NULL, NULL);
|
||||
|
||||
struct ilbc_context {
|
||||
iLBC_Enc_Inst_t encoder;
|
||||
@@ -314,9 +315,7 @@ static switch_loadable_module_interface_t ilbc_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_ilbc_load)
|
||||
{
|
||||
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
|
@@ -31,8 +31,8 @@
|
||||
*/
|
||||
#include <switch.h>
|
||||
|
||||
static const char modname[] = "mod_l16";
|
||||
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_l16_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_l16, mod_l16_load, NULL, NULL);
|
||||
|
||||
static switch_status_t switch_raw_init(switch_codec_t *codec, switch_codec_flag_t flags, const switch_codec_settings_t *codec_settings)
|
||||
{
|
||||
@@ -424,7 +424,7 @@ static switch_loadable_module_interface_t raw_module_interface = {
|
||||
};
|
||||
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_l16_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &raw_module_interface;
|
||||
|
@@ -33,7 +33,8 @@
|
||||
#include <speex/speex.h>
|
||||
#include <speex/speex_preprocess.h>
|
||||
|
||||
static const char modname[] = "mod_speex";
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load);
|
||||
SWITCH_MODULE_DEFINITION(mod_speex, mod_speex_load, NULL, NULL);
|
||||
|
||||
static const switch_codec_settings_t default_codec_settings = {
|
||||
/*.quality */ 5,
|
||||
@@ -403,7 +404,7 @@ static switch_loadable_module_interface_t speex_module_interface = {
|
||||
/*.application_interface */ NULL
|
||||
};
|
||||
|
||||
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
|
||||
SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load)
|
||||
{
|
||||
/* connect my internal structure to the blank pointer passed to me */
|
||||
*module_interface = &speex_module_interface;
|
||||
|
Reference in New Issue
Block a user