Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
78efac81
提交
78efac81
authored
8月 22, 2014
作者:
Seven Du
提交者:
Michael Jerris
5月 28, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7514: not hardcoded H264 anymore
上级
282b04a8
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
17 行增加
和
22 行删除
+17
-22
mod_vlc.c
src/mod/formats/mod_vlc/mod_vlc.c
+17
-22
没有找到文件。
src/mod/formats/mod_vlc/mod_vlc.c
浏览文件 @
78efac81
...
...
@@ -694,7 +694,7 @@ SWITCH_STANDARD_APP(play_video_function)
switch_channel_t
*
channel
=
switch_core_session_get_channel
(
session
);
switch_memory_pool_t
*
pool
=
switch_core_session_get_pool
(
session
);
switch_frame_t
audio_frame
=
{
0
},
video_frame
=
{
0
};
switch_codec_t
codec
=
{
0
},
vid_codec
=
{
0
},
*
read_vid_codec
;
switch_codec_t
codec
=
{
0
},
*
read_vid_codec
;
switch_timer_t
timer
=
{
0
};
switch_payload_t
pt
=
0
;
switch_dtmf_t
dtmf
=
{
0
};
...
...
@@ -800,20 +800,6 @@ SWITCH_STANDARD_APP(play_video_function)
goto
end
;
}
if
(
switch_core_codec_init
(
&
vid_codec
,
"H264"
,
NULL
,
0
,
0
,
1
,
SWITCH_CODEC_FLAG_ENCODE
|
SWITCH_CODEC_FLAG_DECODE
,
NULL
,
switch_core_session_get_pool
(
session
))
==
SWITCH_STATUS_SUCCESS
)
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_DEBUG
,
"Video Codec Activation Success
\n
"
);
}
else
{
switch_log_printf
(
SWITCH_CHANNEL_SESSION_LOG
(
session
),
SWITCH_LOG_ERROR
,
"Video Codec Activation Fail
\n
"
);
switch_channel_set_variable
(
channel
,
SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE
,
"Video codec activation failed"
);
goto
end
;
}
audio_datalen
=
codec
.
implementation
->
actual_samples_per_second
/
1000
*
(
read_impl
.
microseconds_per_packet
/
1000
);
context
->
session
=
session
;
...
...
@@ -957,10 +943,6 @@ end:
switch_core_codec_destroy
(
&
codec
);
}
if
(
switch_core_codec_ready
(
&
vid_codec
))
{
switch_core_codec_destroy
(
&
vid_codec
);
}
switch_channel_clear_flag
(
channel
,
CF_VIDEO_PASSIVE
);
}
...
...
@@ -1196,7 +1178,7 @@ static switch_call_cause_t vlc_outgoing_channel(switch_core_session_t *session,
char
name
[
256
];
vlc_private_t
*
tech_pvt
=
NULL
;
switch_caller_profile_t
*
caller_profile
;
// const char *err
;
const
char
*
codec_str
=
NULL
;
switch_assert
(
vlc_endpoint_interface
);
...
...
@@ -1223,7 +1205,6 @@ static switch_call_cause_t vlc_outgoing_channel(switch_core_session_t *session,
caller_profile
=
switch_caller_profile_clone
(
*
new_session
,
outbound_profile
);
switch_channel_set_caller_profile
(
channel
,
caller_profile
);
if
(
switch_core_codec_init
(
&
tech_pvt
->
read_codec
,
"L16"
,
NULL
,
...
...
@@ -1248,8 +1229,22 @@ static switch_call_cause_t vlc_outgoing_channel(switch_core_session_t *session,
goto
fail
;
}
codec_str
=
switch_event_get_header
(
var_event
,
"absolute_codec_string"
);
if
(
!
codec_str
&&
session
)
{
switch_codec_t
*
codec
=
switch_core_session_get_video_read_codec
(
session
);
if
(
codec
)
{
codec_str
=
codec
->
implementation
->
iananame
;
}
}
if
(
!
codec_str
)
{
switch_log_printf
(
SWITCH_CHANNEL_LOG
,
SWITCH_LOG_ERROR
,
"No video codec?
\n
"
);
goto
fail
;
}
if
(
switch_core_codec_init
(
&
tech_pvt
->
video_codec
,
"H264"
,
codec_str
,
NULL
,
90000
,
0
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论