Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
f4e013e2
提交
f4e013e2
authored
2月 11, 2008
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tweak
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7582
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
217a70e4
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
2 行删除
+18
-2
switch_module_interfaces.h
src/include/switch_module_interfaces.h
+1
-0
mod_fsv.c
src/mod/applications/mod_fsv/mod_fsv.c
+9
-2
sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_glue.c
+8
-0
没有找到文件。
src/include/switch_module_interfaces.h
浏览文件 @
f4e013e2
...
@@ -509,6 +509,7 @@ struct switch_codec {
...
@@ -509,6 +509,7 @@ struct switch_codec {
switch_memory_pool_t
*
memory_pool
;
switch_memory_pool_t
*
memory_pool
;
/*! private data for the codec module to store handle specific info */
/*! private data for the codec module to store handle specific info */
void
*
private_info
;
void
*
private_info
;
switch_payload_t
agreed_pt
;
};
};
/*! \brief A table of settings and callbacks that define a paticular implementation of a codec */
/*! \brief A table of settings and callbacks that define a paticular implementation of a codec */
...
...
src/mod/applications/mod_fsv/mod_fsv.c
浏览文件 @
f4e013e2
...
@@ -216,12 +216,13 @@ SWITCH_STANDARD_APP(play_fsv_function)
...
@@ -216,12 +216,13 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_frame_t
write_frame
=
{
0
},
vid_frame
=
{
0
};
switch_frame_t
write_frame
=
{
0
},
vid_frame
=
{
0
};
int
fd
=
-
1
;
int
fd
=
-
1
;
int
bytes
;
int
bytes
;
switch_codec_t
*
read_codec
=
NULL
,
codec
=
{
0
},
vid_codec
=
{
0
};
switch_codec_t
*
read_codec
=
NULL
,
codec
=
{
0
},
vid_codec
=
{
0
}
,
*
read_vid_codec
;
unsigned
char
*
aud_buffer
;
unsigned
char
*
aud_buffer
;
unsigned
char
*
vid_buffer
;
unsigned
char
*
vid_buffer
;
struct
file_header
h
;
struct
file_header
h
;
uint32_t
ts
=
0
,
last
=
0
;
uint32_t
ts
=
0
,
last
=
0
;
switch_timer_t
timer
=
{
0
};
switch_timer_t
timer
=
{
0
};
switch_payload_t
pt
=
0
;
aud_buffer
=
switch_core_session_alloc
(
session
,
SWITCH_RECOMMENDED_BUFFER_SIZE
);
aud_buffer
=
switch_core_session_alloc
(
session
,
SWITCH_RECOMMENDED_BUFFER_SIZE
);
vid_buffer
=
switch_core_session_alloc
(
session
,
SWITCH_RECOMMENDED_BUFFER_SIZE
);
vid_buffer
=
switch_core_session_alloc
(
session
,
SWITCH_RECOMMENDED_BUFFER_SIZE
);
...
@@ -243,6 +244,10 @@ SWITCH_STANDARD_APP(play_fsv_function)
...
@@ -243,6 +244,10 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_channel_set_variable
(
channel
,
"sip_force_video_fmtp"
,
h
.
video_fmtp
);
switch_channel_set_variable
(
channel
,
"sip_force_video_fmtp"
,
h
.
video_fmtp
);
switch_channel_answer
(
channel
);
switch_channel_answer
(
channel
);
if
((
read_vid_codec
=
switch_core_session_get_video_read_codec
(
session
)))
{
pt
=
read_vid_codec
->
agreed_pt
;
}
write_frame
.
codec
=
&
codec
;
write_frame
.
codec
=
&
codec
;
write_frame
.
data
=
aud_buffer
;
write_frame
.
data
=
aud_buffer
;
...
@@ -304,7 +309,9 @@ SWITCH_STANDARD_APP(play_fsv_function)
...
@@ -304,7 +309,9 @@ SWITCH_STANDARD_APP(play_fsv_function)
}
}
ts
=
ntohl
(
h
->
ts
);
ts
=
ntohl
(
h
->
ts
);
h
->
pt
=
vid_codec
.
implementation
->
ianacode
;
if
(
pt
)
{
h
->
pt
=
pt
;
}
if
(
switch_channel_test_flag
(
channel
,
CF_VIDEO
))
{
if
(
switch_channel_test_flag
(
channel
,
CF_VIDEO
))
{
switch_core_session_write_video_frame
(
session
,
&
vid_frame
,
-
1
,
0
);
switch_core_session_write_video_frame
(
session
,
&
vid_frame
,
-
1
,
0
);
}
}
...
...
src/mod/endpoints/mod_sofia/sofia_glue.c
浏览文件 @
f4e013e2
...
@@ -1065,6 +1065,9 @@ switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int
...
@@ -1065,6 +1065,9 @@ switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int
tech_pvt
->
video_read_frame
.
codec
=
&
tech_pvt
->
video_read_codec
;
tech_pvt
->
video_read_frame
.
codec
=
&
tech_pvt
->
video_read_codec
;
tech_pvt
->
video_fmtp_out
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
video_write_codec
.
fmtp_out
);
tech_pvt
->
video_fmtp_out
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
video_write_codec
.
fmtp_out
);
tech_pvt
->
video_write_codec
.
agreed_pt
=
tech_pvt
->
video_agreed_pt
;
tech_pvt
->
video_read_codec
.
agreed_pt
=
tech_pvt
->
video_agreed_pt
;
switch_core_session_set_video_read_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
video_read_codec
);
switch_core_session_set_video_read_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
video_read_codec
);
switch_core_session_set_video_write_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
video_write_codec
);
switch_core_session_set_video_write_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
video_write_codec
);
}
}
...
@@ -1137,6 +1140,9 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
...
@@ -1137,6 +1140,9 @@ switch_status_t sofia_glue_tech_set_codec(private_object_t *tech_pvt, int force)
);
);
tech_pvt
->
read_frame
.
codec
=
&
tech_pvt
->
read_codec
;
tech_pvt
->
read_frame
.
codec
=
&
tech_pvt
->
read_codec
;
tech_pvt
->
write_codec
.
agreed_pt
=
tech_pvt
->
agreed_pt
;
tech_pvt
->
read_codec
.
agreed_pt
=
tech_pvt
->
agreed_pt
;
switch_core_session_set_read_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
read_codec
);
switch_core_session_set_read_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
read_codec
);
switch_core_session_set_write_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
write_codec
);
switch_core_session_set_write_codec
(
tech_pvt
->
session
,
&
tech_pvt
->
write_codec
);
tech_pvt
->
fmtp_out
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
write_codec
.
fmtp_out
);
tech_pvt
->
fmtp_out
=
switch_core_session_strdup
(
tech_pvt
->
session
,
tech_pvt
->
write_codec
.
fmtp_out
);
...
@@ -1903,6 +1909,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
...
@@ -1903,6 +1909,8 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
switch_channel_set_variable
(
tech_pvt
->
channel
,
SWITCH_REMOTE_VIDEO_IP_VARIABLE
,
tech_pvt
->
remote_sdp_audio_ip
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
SWITCH_REMOTE_VIDEO_IP_VARIABLE
,
tech_pvt
->
remote_sdp_audio_ip
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
SWITCH_REMOTE_VIDEO_PORT_VARIABLE
,
tmp
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
SWITCH_REMOTE_VIDEO_PORT_VARIABLE
,
tmp
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"sip_video_fmtp"
,
tech_pvt
->
video_rm_fmtp
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"sip_video_fmtp"
,
tech_pvt
->
video_rm_fmtp
);
switch_snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
tech_pvt
->
video_agreed_pt
);
switch_channel_set_variable
(
tech_pvt
->
channel
,
"sip_video_pt"
,
tmp
);
break
;
break
;
}
else
{
}
else
{
vmatch
=
0
;
vmatch
=
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论