V2.0.5
1.在录像信息文件里没有老师视频或学生视频时,把老师视频或学生视频的大小设为320x240,避免在一对多布局时出现错误
正在显示
3 个修改的文件
包含
11 行增加
和
1 行删除
| @@ -29,6 +29,8 @@ int pip_x_reduce = 3; | @@ -29,6 +29,8 @@ int pip_x_reduce = 3; | ||
| 29 | int pip_y_reduce = 3; | 29 | int pip_y_reduce = 3; |
| 30 | int pip_x_border = 4; | 30 | int pip_x_border = 4; |
| 31 | 31 | ||
| 32 | +#define ensure_no_zero(x, v) if(!x) x = v | ||
| 33 | + | ||
| 32 | CAVTranscoder::CAVTranscoder(bool bOne2One, int width_teacher, int height_teacher, int width_student, int height_student, bool has_teacher, int max_audio) : | 34 | CAVTranscoder::CAVTranscoder(bool bOne2One, int width_teacher, int height_teacher, int width_student, int height_student, bool has_teacher, int max_audio) : |
| 33 | _start_time(INT64_MAX), | 35 | _start_time(INT64_MAX), |
| 34 | _all_processed(true), | 36 | _all_processed(true), |
| @@ -48,6 +50,11 @@ _studentFrame(NULL), | @@ -48,6 +50,11 @@ _studentFrame(NULL), | ||
| 48 | _pip_width(0), | 50 | _pip_width(0), |
| 49 | _pip_height(0) | 51 | _pip_height(0) |
| 50 | { | 52 | { |
| 53 | + ensure_no_zero(width_teacher, 320); | ||
| 54 | + ensure_no_zero(height_teacher, 240); | ||
| 55 | + ensure_no_zero(width_student, 320); | ||
| 56 | + ensure_no_zero(height_student, 240); | ||
| 57 | + | ||
| 51 | _teacher_width = width_teacher; | 58 | _teacher_width = width_teacher; |
| 52 | _teacher_height = height_teacher; | 59 | _teacher_height = height_teacher; |
| 53 | _student_width = width_student; | 60 | _student_width = width_student; |
| @@ -1202,7 +1202,7 @@ int process_av_files(char * record_info, int piptype) | @@ -1202,7 +1202,7 @@ int process_av_files(char * record_info, int piptype) | ||
| 1202 | int main(int argc, char * argv[]) | 1202 | int main(int argc, char * argv[]) |
| 1203 | { | 1203 | { |
| 1204 | if (argc < 2) { | 1204 | if (argc < 2) { |
| 1205 | - printf(" merge_pip 2.0.4\n"); | 1205 | + printf(" merge_pip 2.0.5\n"); |
| 1206 | printf(" merge video files to one pip video according to record info file,\nusage:"); | 1206 | printf(" merge video files to one pip video according to record info file,\nusage:"); |
| 1207 | printf("\n %s record_info_filename [-t {0,1,2}] [-c codec.cfg]", argv[0]); | 1207 | printf("\n %s record_info_filename [-t {0,1,2}] [-c codec.cfg]", argv[0]); |
| 1208 | printf("\n\n"); | 1208 | printf("\n\n"); |
-
请 注册 或 登录 后发表评论