Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
68a3250a
提交
68a3250a
authored
5月 06, 2014
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Missing data modems files. They are a work in progress at this time, so don't
expect any functionality.
上级
29ea8e99
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
868 行增加
和
0 行删除
+868
-0
data_modems.c
libs/spandsp/src/data_modems.c
+641
-0
data_modems.h
libs/spandsp/src/spandsp/data_modems.h
+95
-0
data_modems.h
libs/spandsp/src/spandsp/private/data_modems.h
+132
-0
没有找到文件。
libs/spandsp/src/data_modems.c
0 → 100644
浏览文件 @
68a3250a
差异被折叠。
点击展开。
libs/spandsp/src/spandsp/data_modems.h
0 → 100644
浏览文件 @
68a3250a
/*
* SpanDSP - a series of DSP components for telephony
*
* data_modems.h - definitions for the analogue modem set for data processing
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2011 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*! \file */
#if !defined(_SPANDSP_DATA_MODEMS_H_)
#define _SPANDSP_DATA_MODEMS_H_
enum
{
DATA_MODEM_NONE
=
-
1
,
DATA_MODEM_FLUSH
=
0
,
DATA_MODEM_SILENCE
,
DATA_MODEM_CED_TONE
,
DATA_MODEM_CNG_TONE
,
DATA_MODEM_V8
,
DATA_MODEM_BELL103
,
DATA_MODEM_BELL202
,
DATA_MODEM_V21
,
DATA_MODEM_V23
,
DATA_MODEM_V22BIS
,
DATA_MODEM_V32BIS
,
DATA_MODEM_V34
};
/*!
The set of modems needed for data, plus the auxilliary stuff, like tone generation.
*/
typedef
struct
data_modems_state_s
data_modems_state_t
;
#if defined(__cplusplus)
extern
"C"
{
#endif
/* N.B. the following are currently a work in progress */
SPAN_DECLARE
(
const
char
*
)
data_modems_modulation_to_str
(
int
modulation_scheme
);
SPAN_DECLARE
(
void
)
data_modems_set_tep_mode
(
data_modems_state_t
*
s
,
int
use_tep
);
SPAN_DECLARE
(
logging_state_t
*
)
data_modems_get_logging_state
(
data_modems_state_t
*
s
);
SPAN_DECLARE
(
int
)
data_modems_restart
(
data_modems_state_t
*
s
);
SPAN_DECLARE
(
void
)
data_modems_set_async_mode
(
data_modems_state_t
*
s
,
int
data_bits
,
int
parity_bits
,
int
stop_bits
);
SPAN_DECLARE
(
void
)
data_modems_set_modem_type
(
data_modems_state_t
*
s
,
int
which
,
int
baud_rate
,
int
bit_rate
);
SPAN_DECLARE
(
int
)
data_modems_rx
(
data_modems_state_t
*
s
,
const
int16_t
amp
[],
int
len
);
SPAN_DECLARE
(
int
)
data_modems_rx_fillin
(
data_modems_state_t
*
s
,
int
len
);
SPAN_DECLARE
(
int
)
data_modems_tx
(
data_modems_state_t
*
s
,
int16_t
amp
[],
int
max_len
);
SPAN_DECLARE
(
data_modems_state_t
*
)
data_modems_init
(
data_modems_state_t
*
s
,
bool
calling_party
,
put_msg_func_t
put_msg
,
get_msg_func_t
get_msg
,
void
*
user_data
);
SPAN_DECLARE
(
int
)
data_modems_release
(
data_modems_state_t
*
s
);
SPAN_DECLARE
(
int
)
data_modems_free
(
data_modems_state_t
*
s
);
#if defined(__cplusplus)
}
#endif
#endif
/*- End of file ------------------------------------------------------------*/
libs/spandsp/src/spandsp/private/data_modems.h
0 → 100644
浏览文件 @
68a3250a
/*
* SpanDSP - a series of DSP components for telephony
*
* private/data_modems.h - definitions for the analogue modem set for data processing
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2011 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*! \file */
#if !defined(_SPANDSP_PRIVATE_DATA_MODEMS_H_)
#define _SPANDSP_PRIVATE_DATA_MODEMS_H_
/*!
The set of modems needed for data, plus the auxilliary stuff, like tone generation.
*/
struct
data_modems_state_s
{
bool
calling_party
;
/*! True is talker echo protection should be sent for the modems which support this */
bool
use_tep
;
/*! If true, transmit silence when there is nothing else to transmit. If false return only
the actual generated audio. Note that this only affects untimed silences. Timed silences
(e.g. the 75ms silence between V.21 and a high speed modem) will alway be transmitted as
silent audio. */
bool
transmit_on_idle
;
get_bit_func_t
get_bit
;
void
*
get_user_data
;
put_bit_func_t
put_bit
;
void
*
put_user_data
;
void
*
user_data
;
put_msg_func_t
put_msg
;
get_msg_func_t
get_msg
;
v42_state_t
v42
;
v42bis_state_t
v42bis
;
int
use_v14
;
async_tx_state_t
async_tx
;
async_rx_state_t
async_rx
;
union
{
v8_state_t
v8
;
struct
{
/*! \brief Tone generator */
modem_connect_tones_tx_state_t
tx
;
/*! \brief Tone detector */
modem_connect_tones_rx_state_t
rx
;
}
tones
;
struct
{
/*! \brief FSK transmit modem context used for 103, V.21 and V.23. */
fsk_tx_state_t
tx
;
/*! \brief FSK receive modem context used for 103, V.21 and V.23. */
fsk_rx_state_t
rx
;
}
fsk
;
/*! \brief V.22bis modem context */
v22bis_state_t
v22bis
;
#if defined(SPANDSP_SUPPORT_V32BIS)
/*! \brief V.32bis modem context */
v32bis_state_t
v32bis
;
#endif
#if defined(SPANDSP_SUPPORT_V34)
/*! \brief V.22bis modem context */
v34_state_t
v34
;
#endif
/*! \brief Used to insert timed silences. */
silence_gen_state_t
silence_gen
;
}
modems
;
/*! \brief */
dc_restore_state_t
dc_restore
;
int
current_modem
;
int
queued_modem
;
int
queued_baud_rate
;
int
queued_bit_rate
;
/*! \brief The currently select receiver type */
int
current_rx_type
;
/*! \brief The currently select transmitter type */
int
current_tx_type
;
/*! \brief True if a carrier is present. Otherwise false. */
bool
rx_signal_present
;
/*! \brief True if a modem has trained correctly. */
bool
rx_trained
;
/*! \brief True if an HDLC frame has been received correctly. */
bool
rx_frame_received
;
/*! The current receive signal handler */
span_rx_handler_t
rx_handler
;
/*! The current receive missing signal fill-in handler */
span_rx_fillin_handler_t
rx_fillin_handler
;
void
*
rx_user_data
;
/*! The current transmit signal handler */
span_tx_handler_t
tx_handler
;
void
*
tx_user_data
;
/*! \brief Audio logging file handle for received audio. */
int
audio_rx_log
;
/*! \brief Audio logging file handle for transmitted audio. */
int
audio_tx_log
;
/*! \brief Error and flow logging control */
logging_state_t
logging
;
};
#endif
/*- End of file ------------------------------------------------------------*/
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论