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
胡斌
2019-01-05 23:06:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
90cb05a4a41ecc0b1cb7c84658353dca85a40c5d
90cb05a4
1 parent
d117a170
use width and height of image from record file instead of fixed 320x240
but at present,only support landscape layout
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
25 行增加
和
7 行删除
pip/AVTranscoder.cpp
pip/AVTranscoder.h
pip/merge_pip.cpp
pip/AVTranscoder.cpp
查看文件 @
90cb05a
...
...
@@ -13,17 +13,13 @@ uint8_t blank_r = 0x16;
uint8_t
blank_g
=
0x5a
;
uint8_t
blank_b
=
0x82
;
CAVTranscoder
::
CAVTranscoder
(
bool
bOne2One
)
:
CAVTranscoder
::
CAVTranscoder
(
bool
bOne2One
,
int
width
,
int
height
)
:
_start_time
(
INT64_MAX
),
_all_processed
(
true
),
_nOutputWidth
(
320
),
_cur_out_v_ts
(
0
),
_cur_out_a_ts
(
0
),
_max_audio
(
1
),
_scaled_width
(
100
),
_scaled_height
(
75
),
_src_width
(
320
),
_src_height
(
240
),
_sws_ctx_w_h
(
NULL
),
_sws_ctx_h_w
(
NULL
),
_sws_ctx_h_h
(
NULL
),
...
...
@@ -34,6 +30,10 @@ _last_videos_got(-1),
_teacherFrame
(
NULL
),
_studentFrame
(
NULL
)
{
_src_width
=
width
;
_src_height
=
height
;
_scaled_width
=
_src_width
*
10
/
32
;
_scaled_height
=
_src_height
*
10
/
32
;
_one2one
=
bOne2One
;
if
(
_one2one
)
{
_nOutputHeight
=
_src_height
*
2
;
...
...
pip/AVTranscoder.h
查看文件 @
90cb05a
...
...
@@ -5,7 +5,7 @@
class
CAVTranscoder
{
public
:
CAVTranscoder
(
bool
bOne2One
);
CAVTranscoder
(
bool
bOne2One
,
int
width
,
int
height
);
virtual
~
CAVTranscoder
();
int
add
(
media_info
&
info
);
...
...
pip/merge_pip.cpp
查看文件 @
90cb05a
...
...
@@ -627,6 +627,8 @@ int count_audio_files(float mid)
}
int
max_audio
=
1
;
int
width
=
0
;
int
height
=
0
;
void
add_media_infos
()
{
...
...
@@ -684,6 +686,22 @@ void add_media_infos()
it
=
sorted_media_with_end
.
begin
();
for
(;
it
!=
sorted_media_with_end
.
end
();
it
++
){
printf
(
"
\n
%2d %8.3f %s %4d %4d %3d %s"
,
it
->
sorted_index
,
it
->
type_time
,
it
->
name
.
c_str
(),
it
->
width
,
it
->
height
,
it
->
rotate
,
it
->
t_type
==
tt_start
?
"start"
:
"end"
);
if
(
it
->
width
>
it
->
height
)
{
if
(
width
<
it
->
width
)
{
width
=
it
->
width
;
}
if
(
height
<
it
->
height
)
{
height
=
it
->
height
;
}
}
else
{
//set the image to landscape
if
(
width
<
it
->
height
)
{
width
=
it
->
height
;
}
if
(
height
<
it
->
width
)
{
height
=
it
->
width
;
}
}
}
printf
(
"
\n
-------------------------
\n
"
);
...
...
@@ -1050,7 +1068,7 @@ int process_av_files(char * record_info, int piptype)
}
}
CAVTranscoder
videoTranscoder
(
one2one
);
CAVTranscoder
videoTranscoder
(
one2one
,
width
,
height
);
videoTranscoder
.
set_max_audio
(
max_audio
);
int64_t
cur_time
=
0
;
...
...
请
注册
或
登录
后发表评论