Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fa9a59a8
提交
fa9a59a8
authored
5月 24, 2010
作者:
Michael Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
initial checkin of mod_fax/mod_voipcodecs merge into mod_spandsp
上级
5a845c83
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
3801 行增加
和
2 行删除
+3801
-2
modules.conf.in
build/modules.conf.in
+1
-0
modules.conf.xml
conf/autoload_configs/modules.conf.xml
+1
-0
configure.in
configure.in
+1
-0
.gitignore
src/mod/.gitignore
+3
-2
Makefile.am
src/mod/applications/mod_spandsp/Makefile.am
+24
-0
mod_spandsp.2008.vcproj
src/mod/applications/mod_spandsp/mod_spandsp.2008.vcproj
+299
-0
mod_spandsp.c
src/mod/applications/mod_spandsp/mod_spandsp.c
+2756
-0
udptl.c
src/mod/applications/mod_spandsp/udptl.c
+563
-0
udptl.h
src/mod/applications/mod_spandsp/udptl.h
+153
-0
没有找到文件。
build/modules.conf.in
浏览文件 @
fa9a59a8
...
...
@@ -9,6 +9,7 @@ applications/mod_enum
#applications/mod_osp
applications/mod_fifo
#applications/mod_fax
#applications/mod_spandsp
#applications/mod_curl
applications/mod_voicemail
#applications/mod_directory
...
...
conf/autoload_configs/modules.conf.xml
浏览文件 @
fa9a59a8
...
...
@@ -46,6 +46,7 @@
<load
module=
"mod_voicemail"
/>
<!--<load module="mod_directory"/>-->
<!--<load module="mod_fax"/>-->
<!--<load module="mod_spandsp"/>-->
<!--<load module="mod_lcr"/>-->
<load
module=
"mod_limit"
/>
<load
module=
"mod_esf"
/>
...
...
configure.in
浏览文件 @
fa9a59a8
...
...
@@ -875,6 +875,7 @@ AC_CONFIG_FILES([Makefile
src/mod/applications/mod_enum/Makefile
src/mod/applications/mod_expr/Makefile
src/mod/applications/mod_fax/Makefile
src/mod/applications/mod_spandsp/Makefile
src/mod/applications/mod_stress/Makefile
src/mod/endpoints/mod_portaudio/Makefile
src/mod/endpoints/mod_skinny/Makefile
...
...
src/mod/.gitignore
浏览文件 @
fa9a59a8
...
...
@@ -2,6 +2,9 @@
/Makefile.in
/applications/mod_fax/Makefile
/applications/mod_fax/Makefile.in
/applications/mod_spandsp/Makefile
/applications/mod_spandsp/Makefile.in
/applications/mod_spandsp/mod_spandsp.log
/applications/mod_commands/Makefile
/applications/mod_conference/Makefile
/applications/mod_dptools/Makefile
...
...
@@ -16,8 +19,6 @@
/applications/mod_limit/Makefile
/applications/mod_stress/Makefile
/applications/mod_stress/Makefile.in
/applications/mod_t38gateway/Makefile
/applications/mod_t38gateway/Makefile.in
/applications/mod_valet_parking/Makefile
/applications/mod_voicemail/Makefile
/asr_tts/mod_unimrcp/Makefile
...
...
src/mod/applications/mod_spandsp/Makefile.am
0 → 100644
浏览文件 @
fa9a59a8
include
$(top_srcdir)/build/modmake.rulesam
MODNAME
=
mod_spandsp
TIFF_DIR
=
$(switch_srcdir)
/libs/tiff-3.8.2
TIFF_BUILDDIR
=
$(switch_builddir)
/libs/tiff-3.8.2
TIFF_LA
=
$(TIFF_BUILDDIR)
/libtiff/libtiff.la
SPANDSP_DIR
=
$(switch_srcdir)
/libs/spandsp
SPANDSP_BUILDDIR
=
$(switch_builddir)
/libs/spandsp
SPANDSP_LA
=
$(SPANDSP_BUILDDIR)
/src/libspandsp.la
mod_LTLIBRARIES
=
mod_spandsp.la
mod_spandsp_la_SOURCES
=
mod_spandsp.c udptl.c
mod_spandsp_la_CFLAGS
=
$(AM_CFLAGS)
-I
$(SPANDSP_DIR)
/src
-I
$(TIFF_DIR)
/libtiff
-I
$(SPANDSP_BUILDDIR)
/src
-I
$(TIFF_BUILDDIR)
/libtiff
-I
.
mod_spandsp_la_LIBADD
=
$(switch_builddir)
/libfreeswitch.la
$(SPANDSP_LA)
$(TIFF_LA)
mod_spandsp_la_LDFLAGS
=
-avoid-version
-module
-no-undefined
-shared
-ljpeg
$(SPANDSP_LA)
:
$(TIFF_LA) $(SPANDSP_DIR) $(SPANDSP_DIR)/.update
cd
$(SPANDSP_BUILDDIR)
&&
$(MAKE)
-j1
$(TOUCH_TARGET)
$(TIFF_LA)
:
$(TIFF_DIR) $(TIFF_DIR)/.update
cd
$(TIFF_BUILDDIR)
&&
$(MAKE)
-j1
$(TOUCH_TARGET)
src/mod/applications/mod_spandsp/mod_spandsp.2008.vcproj
0 → 100644
浏览文件 @
fa9a59a8
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"9.00"
Name=
"mod_spandsp"
ProjectGUID=
"{7877EFC8-4807-484B-B573-D7B7FD058FAA}"
RootNamespace=
"mod_spandsp"
Keyword=
"Win32Proj"
TargetFrameworkVersion=
"131072"
>
<Platforms>
<Platform
Name=
"Win32"
/>
<Platform
Name=
"x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name=
"Debug|Win32"
ConfigurationType=
"2"
InheritedPropertySheets=
"..\..\..\..\w32\module_debug.vsprops"
CharacterSet=
"0"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
UsePrecompiledHeader=
"0"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"ws2_32.lib"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Debug|x64"
ConfigurationType=
"2"
InheritedPropertySheets=
"..\..\..\..\w32\module_debug.vsprops"
CharacterSet=
"0"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
UsePrecompiledHeader=
"0"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"ws2_32.lib"
OutputFile=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
ConfigurationType=
"2"
InheritedPropertySheets=
"..\..\..\..\w32\module_release.vsprops"
CharacterSet=
"0"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
UsePrecompiledHeader=
"0"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"ws2_32.lib"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|x64"
ConfigurationType=
"2"
InheritedPropertySheets=
"..\..\..\..\w32\module_release.vsprops"
CharacterSet=
"0"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""$(InputDir)..\..\..\..\libs\spandsp\src\msvc";"$(InputDir)..\..\..\..\libs\spandsp\src";"$(InputDir)..\..\..\..\libs\tiff-3.8.2\libtiff""
UsePrecompiledHeader=
"0"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"ws2_32.lib"
OutputFile=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)/mod/$(ProjectName).dll"
RandomizedBaseAddress=
"1"
DataExecutionPrevention=
"0"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
".\mod_spandsp.c"
>
</File>
<File
RelativePath=
".\udptl.c"
>
</File>
<File
RelativePath=
".\udptl.h"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
src/mod/applications/mod_spandsp/mod_spandsp.c
0 → 100644
浏览文件 @
fa9a59a8
差异被折叠。
点击展开。
src/mod/applications/mod_spandsp/udptl.c
0 → 100644
浏览文件 @
fa9a59a8
差异被折叠。
点击展开。
src/mod/applications/mod_spandsp/udptl.h
0 → 100644
浏览文件 @
fa9a59a8
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2009, Steve Underwood <steveu@coppice.org>
*
* Version: MPL 1.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Contributor(s):
*
* Steve Underwood <steveu@coppice.org>
*
* udptl.h -- UDPTL handling for T.38
*
*/
#if !defined(FREESWITCH_UDPTL_H)
#define FREESWITCH_UDPTL_H
#define LOCAL_FAX_MAX_DATAGRAM 400
#define LOCAL_FAX_MAX_FEC_PACKETS 5
#define UDPTL_BUF_MASK 15
typedef
int
(
udptl_rx_packet_handler_t
)
(
void
*
user_data
,
const
uint8_t
msg
[],
int
len
,
int
seq_no
);
typedef
struct
{
int
buf_len
;
uint8_t
buf
[
LOCAL_FAX_MAX_DATAGRAM
];
}
udptl_fec_tx_buffer_t
;
typedef
struct
{
int
buf_len
;
uint8_t
buf
[
LOCAL_FAX_MAX_DATAGRAM
];
int
fec_len
[
LOCAL_FAX_MAX_FEC_PACKETS
];
uint8_t
fec
[
LOCAL_FAX_MAX_FEC_PACKETS
][
LOCAL_FAX_MAX_DATAGRAM
];
int
fec_span
;
int
fec_entries
;
}
udptl_fec_rx_buffer_t
;
struct
udptl_state_s
{
udptl_rx_packet_handler_t
*
rx_packet_handler
;
void
*
user_data
;
/*! This option indicates the error correction scheme used in transmitted UDPTL
packets. */
int
error_correction_scheme
;
/*! This option indicates the number of error correction entries transmitted in
UDPTL packets. */
int
error_correction_entries
;
/*! This option indicates the span of the error correction entries in transmitted
UDPTL packets (FEC only). */
int
error_correction_span
;
/*! This option indicates the maximum size of a datagram that can be accepted by
the remote device. */
int
far_max_datagram_size
;
/*! This option indicates the maximum size of a datagram that we are prepared to
accept. */
int
local_max_datagram_size
;
int
verbose
;
int
tx_seq_no
;
int
rx_seq_no
;
int
rx_expected_seq_no
;
udptl_fec_tx_buffer_t
tx
[
UDPTL_BUF_MASK
+
1
];
udptl_fec_rx_buffer_t
rx
[
UDPTL_BUF_MASK
+
1
];
};
enum
{
UDPTL_ERROR_CORRECTION_NONE
,
UDPTL_ERROR_CORRECTION_FEC
,
UDPTL_ERROR_CORRECTION_REDUNDANCY
};
typedef
struct
udptl_state_s
udptl_state_t
;
#if defined(__cplusplus)
extern
"C"
{
#endif
/*! \brief Process an arriving UDPTL packet.
\param s The UDPTL context.
\param buf The UDPTL packet buffer.
\param len The length of the packet.
\return 0 for OK. */
int
udptl_rx_packet
(
udptl_state_t
*
s
,
const
uint8_t
buf
[],
int
len
);
/*! \brief Construct a UDPTL packet, ready for transmission.
\param s The UDPTL context.
\param buf The UDPTL packet buffer.
\param msg The primary packet.
\param len The length of the primary packet.
\return The length of the constructed UDPTL packet. */
int
udptl_build_packet
(
udptl_state_t
*
s
,
uint8_t
buf
[],
const
uint8_t
msg
[],
int
msg_len
);
/*! \brief Change the error correction settings of a UDPTL context.
\param s The UDPTL context.
\param ec_scheme One of the optional error correction schemes.
\param span The packet span over which error correction should be applied.
\param entries The number of error correction entries to include in packets.
\return 0 for OK. */
int
udptl_set_error_correction
(
udptl_state_t
*
s
,
int
ec_scheme
,
int
span
,
int
entries
);
/*! \brief Check the error correction settings of a UDPTL context.
\param s The UDPTL context.
\param ec_scheme One of the optional error correction schemes.
\param span The packet span over which error correction is being applied.
\param entries The number of error correction being included in packets.
\return 0 for OK. */
int
udptl_get_error_correction
(
udptl_state_t
*
s
,
int
*
ec_scheme
,
int
*
span
,
int
*
entries
);
int
udptl_set_local_max_datagram
(
udptl_state_t
*
s
,
int
max_datagram
);
int
udptl_get_local_max_datagram
(
udptl_state_t
*
s
);
int
udptl_set_far_max_datagram
(
udptl_state_t
*
s
,
int
max_datagram
);
int
udptl_get_far_max_datagram
(
udptl_state_t
*
s
);
/*! \brief Initialise a UDPTL context.
\param s The UDPTL context.
\param ec_scheme One of the optional error correction schemes.
\param span The packet span over which error correction should be applied.
\param entries The number of error correction entries to include in packets.
\param rx_packet_handler The callback function, used to report arriving IFP packets.
\param user_data An opaque pointer supplied to rx_packet_handler.
\return A pointer to the UDPTL context, or NULL if there was a problem. */
udptl_state_t
*
udptl_init
(
udptl_state_t
*
s
,
int
ec_scheme
,
int
span
,
int
entries
,
udptl_rx_packet_handler_t
rx_packet_handler
,
void
*
user_data
);
/*! \brief Release a UDPTL context.
\param s The UDPTL context.
\return 0 for OK. */
int
udptl_release
(
udptl_state_t
*
s
);
#if defined(__cplusplus)
}
#endif
#endif
/*- End of file ------------------------------------------------------------*/
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论