Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
e14ad07a
提交
e14ad07a
authored
2月 06, 2015
作者:
Anthony Minessale
提交者:
Michael Jerris
5月 28, 2015
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-7500: move function to core
上级
8f00bd11
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
57 行增加
和
54 行删除
+57
-54
switch_core_video.h
src/include/switch_core_video.h
+1
-0
mod_fsv.c
src/mod/applications/mod_fsv/mod_fsv.c
+1
-54
switch_core_video.c
src/switch_core_video.c
+55
-0
没有找到文件。
src/include/switch_core_video.h
浏览文件 @
e14ad07a
...
...
@@ -176,6 +176,7 @@ SWITCH_DECLARE(void) switch_img_flip(switch_image_t *img);
*/
SWITCH_DECLARE
(
void
)
switch_img_free
(
switch_image_t
**
img
);
SWITCH_DECLARE
(
void
)
switch_img_add_text
(
void
*
buffer
,
int
w
,
int
x
,
int
y
,
char
*
s
);
/** @} */
...
...
src/mod/applications/mod_fsv/mod_fsv.c
浏览文件 @
e14ad07a
...
...
@@ -481,59 +481,6 @@ SWITCH_STANDARD_APP(play_fsv_function)
switch_core_session_video_reset
(
session
);
}
uint8_t
art
[
14
][
16
]
=
{
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
},
/*.*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/*:*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7E
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/*-*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/* */
};
void
tag
(
void
*
buffer
,
int
w
,
int
x
,
int
y
,
uint8_t
n
)
{
int
i
=
0
,
j
=
0
;
uint8_t
*
p
=
buffer
;
if
(
n
<
0
||
n
>
13
)
return
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
j
=
0
;
j
<
16
;
j
++
)
{
*
(
p
+
(
y
+
j
)
*
w
+
(
x
+
i
))
=
(
art
[
n
][
j
]
&
0x80
>>
i
)
?
0xFF
:
0x00
;
}
}
}
void
text
(
void
*
buffer
,
int
w
,
int
x
,
int
y
,
char
*
s
)
{
while
(
*
s
)
{
int
index
;
if
(
x
>
w
-
8
)
break
;
switch
(
*
s
)
{
case
'.'
:
index
=
10
;
break
;
case
':'
:
index
=
11
;
break
;
case
'-'
:
index
=
12
;
break
;
case
' '
:
index
=
13
;
break
;
default:
index
=
*
s
-
0x30
;
}
tag
(
buffer
,
w
,
x
,
y
,
index
);
x
+=
8
;
s
++
;
}
}
/*
\brief play YUV file in I420 (YV12) format
*/
...
...
@@ -653,7 +600,7 @@ SWITCH_STANDARD_APP(play_yuv_function)
if
(
read_frame
)
switch_core_session_write_frame
(
session
,
read_frame
,
SWITCH_IO_FLAG_NONE
,
0
);
sprintf
(
ts_str
,
"%"
SWITCH_TIME_T_FMT
,
switch_micro_time_now
()
/
1000
);
text
(
img
->
planes
[
SWITCH_PLANE_PACKED
],
width
,
20
,
20
,
ts_str
);
switch_img_add_
text
(
img
->
planes
[
SWITCH_PLANE_PACKED
],
width
,
20
,
20
,
ts_str
);
vid_frame
.
img
=
img
;
switch_core_session_write_video_frame
(
session
,
&
vid_frame
,
SWITCH_IO_FLAG_NONE
,
0
);
}
...
...
src/switch_core_video.c
浏览文件 @
e14ad07a
...
...
@@ -136,6 +136,61 @@ SWITCH_DECLARE(void) switch_img_copy(switch_image_t *img, switch_image_t **new_i
}
static
uint8_t
scv_art
[
14
][
16
]
=
{
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x40
,
0x40
,
0x40
,
0x40
,
0x40
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x00
},
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x00
},
{
0x00
,
0x7E
,
0x42
,
0x42
,
0x42
,
0x42
,
0x42
,
0x7E
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x02
,
0x7E
,
0x00
},
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
},
/*.*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/*:*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x7E
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/*-*/
{
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
},
/* */
};
static
void
scv_tag
(
void
*
buffer
,
int
w
,
int
x
,
int
y
,
uint8_t
n
)
{
int
i
=
0
,
j
=
0
;
uint8_t
*
p
=
buffer
;
if
(
n
<
0
||
n
>
13
)
return
;
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
j
=
0
;
j
<
16
;
j
++
)
{
*
(
p
+
(
y
+
j
)
*
w
+
(
x
+
i
))
=
(
scv_art
[
n
][
j
]
&
0x80
>>
i
)
?
0xFF
:
0x00
;
}
}
}
SWITCH_DECLARE
(
void
)
switch_img_add_text
(
void
*
buffer
,
int
w
,
int
x
,
int
y
,
char
*
s
)
{
while
(
*
s
)
{
int
index
;
if
(
x
>
w
-
8
)
break
;
switch
(
*
s
)
{
case
'.'
:
index
=
10
;
break
;
case
':'
:
index
=
11
;
break
;
case
'-'
:
index
=
12
;
break
;
case
' '
:
index
=
13
;
break
;
default
:
index
=
*
s
-
0x30
;
}
scv_tag
(
buffer
,
w
,
x
,
y
,
index
);
x
+=
8
;
s
++
;
}
}
/* For Emacs:
* Local Variables:
* mode:c
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论