胡斌

V2.0.12

1.在一对一时,强制老师和学生的视频大小一致,且宽高比均为4:3,当不为4:3时,保持视频原始宽高比,水平或垂直居中
... ... @@ -34,7 +34,7 @@ int g_fps;
#define ensure_no_zero(x, v) if(!x) x = v
CAVTranscoder::CAVTranscoder(bool bOne2One, bool one2one_same_size, bool one2many_inflat, int width_teacher, int height_teacher, int width_student, int height_student, bool has_teacher, int max_audio) :
CAVTranscoder::CAVTranscoder(bool bOne2One, bool one2one_same_size, bool one2many_inflat, int width_teacher, int height_teacher, int width_student, int height_student, bool has_teacher, int max_audio,int keep_4_3) :
_start_time(INT64_MAX),
_all_processed(true),
_nOutputWidth(320),
... ... @@ -90,7 +90,12 @@ _one2one_same_size(one2one_same_size)
double max_ratio = max(wh_ratio_teacher, wh_ratio_student);
_teacher_width = _student_width = max_width;
_teacher_height = _student_height = (int)(max_width / max_ratio + 0.5);
if (keep_4_3){
_teacher_height = _student_height = _teacher_width * 3 / 4;
}
else{
_teacher_height = _student_height = (int)(max_width / max_ratio + 0.5);
}
}
_nOutputHeight = _teacher_height + _student_height;
... ...
... ... @@ -5,7 +5,7 @@
class CAVTranscoder
{
public:
CAVTranscoder(bool bOne2One, bool one2one_same_size, bool one2many_inflat, int width_teacher, int height_teacher, int student_width,int student_height, bool has_teacher, int max_audio);
CAVTranscoder(bool bOne2One, bool one2one_same_size, bool one2many_inflat, int width_teacher, int height_teacher, int student_width, int student_height, bool has_teacher, int max_audio, int keep_4_3= true);
virtual ~CAVTranscoder();
int add(media_info & info);
... ...
... ... @@ -98,4 +98,7 @@ V2.0.10
2.一对多布局时,支持对不同分辨率的老师视频进行缩放,统一到相同分辨率
V2.0.11
1.修改1对多布局时,缺省不扩大合成视频大小,-t 3参数时才根据学生数量扩大合成视频大小
\ No newline at end of file
1.修改1对多布局时,缺省不扩大合成视频大小,-t 3参数时才根据学生数量扩大合成视频大小
V2.0.12
1.在一对一时,强制老师和学生的视频大小一致,且宽高比均为4:3,当不为4:3时,保持视频原始宽高比,水平或垂直居中
\ No newline at end of file
... ...
... ... @@ -1223,7 +1223,7 @@ int process_av_files(char * record_info, int piptype, bool one2one_same_size, in
int main(int argc, char * argv[])
{
if (argc < 2) {
printf(" merge_pip 2.0.11\n");
printf(" merge_pip 2.0.12\n");
printf(" merge video files to one pip video according to record info file,\nusage:");
printf("\n %s record_info_filename [-t {0,1,2,3}] [-c codec.cfg] [-s {1,0}]", argv[0]);
printf("\n\n");
... ...