需求:freeswitch放音和录音使用远程文件,不可再本地生成文件,不可挂载
1.前期思路 放音:在文件内存处将文件变成语音流并上传至freeswitch内存中
录音:使用远程写入文件的方式,重写写入函数
freeswitch模块mod_shout支持流式录放音
https://freeswitch.org/confluence/display/FREESWITCH/mod_shout
icecast流媒体服务器
修改一下配置 fileroot是自行修改代码后加的配置项,存储录音文件的路径
放音文件放在webroot下
0.0.0.0
/home/umg/icecast/log
/usr/local/share/icecast/web
/home/umg/icecastfile
/usr/local/share/icecast/admin
修改代码 source.c
.
//if (mountinfo && mountinfo->dumpfile) //huangzl
{
char *filename = source->dumpfilename;
ice_config_t *config = config_get_config_unlocked ();
source->dumpfilename = malloc(strlen(config->fileroot_dir) + strlen(source->mount)+1);
sprintf(source->dumpfilename, "%s%s", config->fileroot_dir, source->mount);
//source->dumpfilename = strdup (mountinfo->dumpfile);
free (filename);
}
//else
// source->dumpfilename = NULL;
修改代码 cfgfile.c
.
else if (xmlStrcm