Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ea16f82d
提交
ea16f82d
authored
5月 12, 2015
作者:
Anthony Minessale
提交者:
Michael Jerris
5月 28, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7500: move img test down into read function
上级
ff8bf014
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
15 行增加
和
7 行删除
+15
-7
switch_core_media.c
src/switch_core_media.c
+15
-7
没有找到文件。
src/switch_core_media.c
浏览文件 @
ea16f82d
...
...
@@ -211,6 +211,8 @@ struct switch_media_handle_s {
uint64_t vid_frames;
time_t vid_started;
int ready_loops;
};
...
...
@@ -4779,7 +4781,6 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
switch_image_t *blank_img = NULL;
switch_rgb_color_t bgcolor;
switch_rtp_engine_t *v_engine = NULL;
int ready_loops = 0;
const char *var;
if (!(smh = session->media_handle)) {
...
...
@@ -4883,12 +4884,6 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
if (switch_test_flag(read_frame, SFF_CNG)) {
continue;
}
if (read_frame->img && read_frame->img->d_w && read_frame->img->d_h && ++ready_loops > 5) {
switch_channel_set_flag(channel, CF_VIDEO_READY);
smh->vid_params.width = read_frame->img->d_w;
smh->vid_params.height = read_frame->img->d_h;
}
}
if (vloops < 300 && (vloops % 100) == 0) {
...
...
@@ -10377,9 +10372,15 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
switch_status_t status = SWITCH_STATUS_FALSE;
switch_io_event_hook_video_read_frame_t *ptr;
uint32_t loops = 0;
switch_media_handle_t *smh;
switch_assert(session != NULL);
if (!(smh = session->media_handle)) {
return SWITCH_STATUS_FALSE;
}
top:
loops++;
...
...
@@ -10452,6 +10453,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_read_video_frame(switch_core
(*frame)->img->w, (*frame)->img->h, (*frame)->img->d_w, (*frame)->img->d_h);
}
if ((*frame)->img && (*frame)->img->d_w && (*frame)->img->d_h && ++smh->ready_loops > 5) {
switch_channel_set_flag(session->channel, CF_VIDEO_READY);
smh->vid_params.width = (*frame)->img->d_w;
smh->vid_params.height = (*frame)->img->d_h;
}
if (switch_test_flag((*frame), SFF_WAIT_KEY_FRAME)) {
switch_core_session_request_video_refresh(session);
switch_clear_flag((*frame), SFF_WAIT_KEY_FRAME);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论