Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO908-XLRStore
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4343e5ae
由
张东亮
编写于
2022-03-28 14:41:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
存储机构视频转换后台进行
1 个父辈
1a20f1b1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
5 行增加
和
5 行删除
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
source/DeviceLibrary/storeBean/boxBean/BoxEquip_Camera.cs
查看文件 @
4343e5a
...
@@ -236,8 +236,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -236,8 +236,8 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
"监控视频开始转换"
);
LogUtil
.
info
(
"监控视频开始转换"
);
Task
task1
=
ffmpegA
.
ConvertImgsToMp4
();
Task
task1
=
ffmpegA
.
ConvertImgsToMp4
();
Task
task2
=
ffmpegB
.
ConvertImgsToMp4
();
Task
task2
=
ffmpegB
.
ConvertImgsToMp4
();
Task
.
WaitAll
(
new
Task
[]
{
task1
,
task2
},
TimeSpan
.
FromMinutes
(
1
));
//
Task.WaitAll(new Task[] { task1, task2 }, TimeSpan.FromMinutes(1));
LogUtil
.
info
(
"监控视频转换完成"
);
//
LogUtil.info("监控视频转换完成");
}
}
#
endregion
#
endregion
}
}
...
@@ -286,7 +286,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -286,7 +286,6 @@ namespace OnlineStore.DeviceLibrary
/// 输出文件名带后缀
/// 输出文件名带后缀
/// </summary>
/// </summary>
public
string
OutputFileName
{
get
;
set
;
}
=
"test.mp4"
;
public
string
OutputFileName
{
get
;
set
;
}
=
"test.mp4"
;
public
string
Cmd
{
get
{
return
ExportCmd
();
}
}
public
void
SetParam
(
string
inputfolder
,
string
outputfolder
,
string
outputfilename
)
public
void
SetParam
(
string
inputfolder
,
string
outputfolder
,
string
outputfilename
)
{
{
InputFolder
=
inputfolder
;
InputFolder
=
inputfolder
;
...
@@ -305,9 +304,10 @@ namespace OnlineStore.DeviceLibrary
...
@@ -305,9 +304,10 @@ namespace OnlineStore.DeviceLibrary
}
}
public
Task
ConvertImgsToMp4
()
public
Task
ConvertImgsToMp4
()
{
{
StringBuilder
sb
=
new
StringBuilder
(
InputFolder
);
StringBuilder
sb1
=
new
StringBuilder
(
ExportCmd
());
Task
task
=
Task
.
Factory
.
StartNew
(
delegate
Task
task
=
Task
.
Factory
.
StartNew
(
delegate
{
{
StringBuilder
sb
=
new
StringBuilder
(
InputFolder
);
using
(
Process
p
=
new
Process
())
using
(
Process
p
=
new
Process
())
{
{
//(1)设置要启动的应用程序
//(1)设置要启动的应用程序
...
@@ -324,7 +324,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -324,7 +324,7 @@ namespace OnlineStore.DeviceLibrary
p
.
StartInfo
.
RedirectStandardError
=
true
;
p
.
StartInfo
.
RedirectStandardError
=
true
;
p
.
StartInfo
.
CreateNoWindow
=
true
;
p
.
StartInfo
.
CreateNoWindow
=
true
;
p
.
Start
();
p
.
Start
();
p
.
StandardInput
.
WriteLine
(
Cmd
+
"&exit"
);
p
.
StandardInput
.
WriteLine
(
sb1
.
ToString
()
+
"&exit"
);
p
.
StandardInput
.
AutoFlush
=
true
;
p
.
StandardInput
.
AutoFlush
=
true
;
p
.
StandardInput
.
Close
();
p
.
StandardInput
.
Close
();
p
.
StandardError
.
ReadToEnd
();
p
.
StandardError
.
ReadToEnd
();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论