Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
merge_av
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
胡斌
2018-12-15 19:32:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c5ce7c92fed9508a203865ef0edf825894e4f873
c5ce7c92
1 parent
7cc4ca0d
output encoded duration every 60s,
improved adding new file when start time reached
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
23 行增加
和
5 行删除
pip/merge_pip.cpp
pip/merge_pip.cpp
查看文件 @
c5ce7c9
...
...
@@ -1020,9 +1020,15 @@ int process_av_files(char * record_info, int piptype)
int64_t
cur_time
=
0
;
bool
has_file
=
sorted_media
.
size
()
!=
0
;
std
::
string
out_media_file
,
first_media_file
;
int64_t
nextfile_start_time_ms
;
int
encode_loop_count
=
0
;
if
(
has_file
)
{
media_info
info
=
sorted_media
.
front
();
first_media_file
=
info
.
name
;
nextfile_start_time_ms
=
info
.
start_time_ms
;
out_media_file
=
get_outmedia_file_name
(
record_info
);
printf
(
"open output file:%s
\n
"
,
out_media_file
.
c_str
());
int
ret
=
videoTranscoder
.
open_output_file
(
out_media_file
.
c_str
());
...
...
@@ -1035,26 +1041,38 @@ int process_av_files(char * record_info, int piptype)
}
}
while
(
has_file
){
while
(
has_file
){
media_info
info
=
sorted_media
.
front
();
if
(
info
.
start_time_ms
-
cur_time
<
MIN_TIME_INTERVAL
)
{
if
(
nextfile_start_time_ms
-
cur_time
<
MIN_TIME_INTERVAL
)
{
media_info
info
=
sorted_media
.
front
();
sorted_media
.
pop_front
();
videoTranscoder
.
add
(
info
);
has_file
=
sorted_media
.
size
()
!=
0
;
if
(
has_file
)
{
nextfile_start_time_ms
=
sorted_media
.
front
().
start_time_ms
;
}
}
else
{
break
;
}
has_file
=
sorted_media
.
size
()
!=
0
;
}
cur_time
=
videoTranscoder
.
transcode
();
encode_loop_count
++
;
if
(
encode_loop_count
==
1200
)
{
encode_loop_count
=
0
;
printf
(
"
\n
encoded : %d seconds
\n
"
,
cur_time
/
1000
);
}
}
while
(
!
videoTranscoder
.
all_processed
()){
cur_time
=
videoTranscoder
.
transcode
();
encode_loop_count
++
;
if
(
encode_loop_count
==
1200
)
{
encode_loop_count
=
0
;
printf
(
"
\n
encoded : %d seconds
\n
"
,
cur_time
/
1000
);
}
}
videoTranscoder
.
close
();
...
...
请
注册
或
登录
后发表评论