Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
20531a09
提交
20531a09
authored
7月 02, 2013
作者:
Steve Underwood
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added a "nation" parameter to v18_init(), in preparation for automoding.
上级
ba96b391
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
183 行增加
和
172 行删除
+183
-172
v18.h
libs/spandsp/src/spandsp/private/v18.h
+1
-0
v18.h
libs/spandsp/src/spandsp/v18.h
+10
-2
v18.c
libs/spandsp/src/v18.c
+2
-0
lenna-colour-bilevel.tif
libs/spandsp/test-data/local/lenna-colour-bilevel.tif
+0
-0
v18_tests.c
libs/spandsp/tests/v18_tests.c
+167
-167
mod_spandsp_dsp.c
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
+3
-3
没有找到文件。
libs/spandsp/src/spandsp/private/v18.h
浏览文件 @
20531a09
...
@@ -31,6 +31,7 @@ struct v18_state_s
...
@@ -31,6 +31,7 @@ struct v18_state_s
/*! \brief TRUE if we are the calling modem */
/*! \brief TRUE if we are the calling modem */
int
calling_party
;
int
calling_party
;
int
mode
;
int
mode
;
int
nation
;
put_msg_func_t
put_msg
;
put_msg_func_t
put_msg
;
void
*
user_data
;
void
*
user_data
;
int
repeat_shifts
;
int
repeat_shifts
;
...
...
libs/spandsp/src/spandsp/v18.h
浏览文件 @
20531a09
...
@@ -54,12 +54,16 @@ enum
...
@@ -54,12 +54,16 @@ enum
/* V.18 Annex F - V.21 text telephone, V.21, duplex, ASCII (Sweden, Norway and Finland). */
/* V.18 Annex F - V.21 text telephone, V.21, duplex, ASCII (Sweden, Norway and Finland). */
V18_MODE_V21TEXTPHONE
=
7
,
V18_MODE_V21TEXTPHONE
=
7
,
/* V.18 Annex G - V.18 text telephone mode. */
/* V.18 Annex G - V.18 text telephone mode. */
V18_MODE_V18TEXTPHONE
=
8
V18_MODE_V18TEXTPHONE
=
8
,
/* Use repetitive shift characters where character set shifts are used */
V18_MODE_REPETITIVE_SHIFTS_OPTION
=
0x1000
};
};
/* Automoding sequences for different countries */
/* Automoding sequences for different countries */
enum
enum
{
{
V18_AUTOMODING_GLOBAL
=
0
,
/* 5-bit, V.21, V.23, EDT, DTMF, Bell 103 */
/* 5-bit, V.21, V.23, EDT, DTMF, Bell 103 */
V18_AUTOMODING_AUSTRALIA
,
V18_AUTOMODING_AUSTRALIA
,
V18_AUTOMODING_IRELAND
,
V18_AUTOMODING_IRELAND
,
...
@@ -89,7 +93,9 @@ enum
...
@@ -89,7 +93,9 @@ enum
/* V.23, EDT, DTMF, 5-bit, V.21, Bell 103 */
/* V.23, EDT, DTMF, 5-bit, V.21, Bell 103 */
V18_AUTOMODING_FRANCE
,
V18_AUTOMODING_FRANCE
,
V18_AUTOMODING_BELGIUM
V18_AUTOMODING_BELGIUM
,
V18_AUTOMODING_END
};
};
#if defined(__cplusplus)
#if defined(__cplusplus)
...
@@ -104,6 +110,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s);
...
@@ -104,6 +110,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s);
\param s The V.18 context.
\param s The V.18 context.
\param calling_party TRUE if caller mode, else answerer mode.
\param calling_party TRUE if caller mode, else answerer mode.
\param mode Mode of operation.
\param mode Mode of operation.
\param nation National variant for automoding.
\param put_msg A callback routine called to deliver the received text
\param put_msg A callback routine called to deliver the received text
to the application.
to the application.
\param user_data An opaque pointer for the callback routine.
\param user_data An opaque pointer for the callback routine.
...
@@ -111,6 +118,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s);
...
@@ -111,6 +118,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s);
SPAN_DECLARE
(
v18_state_t
*
)
v18_init
(
v18_state_t
*
s
,
SPAN_DECLARE
(
v18_state_t
*
)
v18_init
(
v18_state_t
*
s
,
int
calling_party
,
int
calling_party
,
int
mode
,
int
mode
,
int
nation
,
put_msg_func_t
put_msg
,
put_msg_func_t
put_msg
,
void
*
user_data
);
void
*
user_data
);
...
...
libs/spandsp/src/v18.c
浏览文件 @
20531a09
...
@@ -954,6 +954,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s)
...
@@ -954,6 +954,7 @@ SPAN_DECLARE(logging_state_t *) v18_get_logging_state(v18_state_t *s)
SPAN_DECLARE
(
v18_state_t
*
)
v18_init
(
v18_state_t
*
s
,
SPAN_DECLARE
(
v18_state_t
*
)
v18_init
(
v18_state_t
*
s
,
int
calling_party
,
int
calling_party
,
int
mode
,
int
mode
,
int
nation
,
put_msg_func_t
put_msg
,
put_msg_func_t
put_msg
,
void
*
user_data
)
void
*
user_data
)
{
{
...
@@ -1024,6 +1025,7 @@ SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
...
@@ -1024,6 +1025,7 @@ SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
fsk_rx_init
(
&
s
->
fskrx
,
&
preset_fsk_specs
[
FSK_V21CH1
],
FSK_FRAME_MODE_7E1_FRAMES
,
v18_textphone_put_async_byte
,
s
);
fsk_rx_init
(
&
s
->
fskrx
,
&
preset_fsk_specs
[
FSK_V21CH1
],
FSK_FRAME_MODE_7E1_FRAMES
,
v18_textphone_put_async_byte
,
s
);
break
;
break
;
}
}
s
->
nation
=
nation
;
queue_init
(
&
s
->
queue
.
queue
,
128
,
QUEUE_READ_ATOMIC
|
QUEUE_WRITE_ATOMIC
);
queue_init
(
&
s
->
queue
.
queue
,
128
,
QUEUE_READ_ATOMIC
|
QUEUE_WRITE_ATOMIC
);
return
s
;
return
s
;
}
}
...
...
libs/spandsp/test-data/local/lenna-colour-bilevel.tif
0 → 100644
浏览文件 @
20531a09
File added
libs/spandsp/tests/v18_tests.c
浏览文件 @
20531a09
差异被折叠。
点击展开。
src/mod/applications/mod_spandsp/mod_spandsp_dsp.c
浏览文件 @
20531a09
...
@@ -206,7 +206,7 @@ switch_status_t spandsp_tdd_send_session(switch_core_session_t *session, const c
...
@@ -206,7 +206,7 @@ switch_status_t spandsp_tdd_send_session(switch_core_session_t *session, const c
return
SWITCH_STATUS_FALSE
;
return
SWITCH_STATUS_FALSE
;
}
}
tdd_state
=
v18_init
(
NULL
,
TRUE
,
get_v18_mode
(
session
),
put_text_msg
,
NULL
);
tdd_state
=
v18_init
(
NULL
,
TRUE
,
get_v18_mode
(
session
),
V18_AUTOMODING_GLOBAL
,
put_text_msg
,
NULL
);
v18_put
(
tdd_state
,
text
,
-
1
);
v18_put
(
tdd_state
,
text
,
-
1
);
...
@@ -253,7 +253,7 @@ switch_status_t spandsp_tdd_encode_session(switch_core_session_t *session, const
...
@@ -253,7 +253,7 @@ switch_status_t spandsp_tdd_encode_session(switch_core_session_t *session, const
}
}
pvt
->
session
=
session
;
pvt
->
session
=
session
;
pvt
->
tdd_state
=
v18_init
(
NULL
,
TRUE
,
get_v18_mode
(
session
),
put_text_msg
,
NULL
);
pvt
->
tdd_state
=
v18_init
(
NULL
,
TRUE
,
get_v18_mode
(
session
),
V18_AUTOMODING_GLOBAL
,
put_text_msg
,
NULL
);
pvt
->
head_lead
=
TDD_LEAD
;
pvt
->
head_lead
=
TDD_LEAD
;
v18_put
(
pvt
->
tdd_state
,
text
,
-
1
);
v18_put
(
pvt
->
tdd_state
,
text
,
-
1
);
...
@@ -331,7 +331,7 @@ switch_status_t spandsp_tdd_decode_session(switch_core_session_t *session)
...
@@ -331,7 +331,7 @@ switch_status_t spandsp_tdd_decode_session(switch_core_session_t *session)
}
}
pvt
->
session
=
session
;
pvt
->
session
=
session
;
pvt
->
tdd_state
=
v18_init
(
NULL
,
FALSE
,
get_v18_mode
(
session
),
put_text_msg
,
pvt
);
pvt
->
tdd_state
=
v18_init
(
NULL
,
FALSE
,
get_v18_mode
(
session
),
V18_AUTOMODING_GLOBAL
,
put_text_msg
,
pvt
);
if
((
status
=
switch_core_media_bug_add
(
session
,
"spandsp_tdd_decode"
,
NULL
,
if
((
status
=
switch_core_media_bug_add
(
session
,
"spandsp_tdd_decode"
,
NULL
,
tdd_decode_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
tdd_decode_callback
,
pvt
,
0
,
SMBF_READ_REPLACE
|
SMBF_NO_PAUSE
,
&
bug
))
!=
SWITCH_STATUS_SUCCESS
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论