suzhou项目:画面翻转180,增加录屏功能

This commit is contained in:
xu
2026-09-18 11:28:47 +08:00
parent 8dd17a5b9a
commit 6e231f099e
5 changed files with 32 additions and 6 deletions
+26
View File
@@ -470,6 +470,7 @@ void vo_chn_switch(int vo_channel , int priority, int mux ){
return;
}
#if 0
if (mux == 1) {
/* 双屏窗口 960x720:chn0 在左,chn1 在右 */
chn_attr.rect.x = (vo_channel == 0) ? 0 : 960;
@@ -491,6 +492,29 @@ void vo_chn_switch(int vo_channel , int priority, int mux ){
chn_attr.rect.width = 1280;
chn_attr.rect.height = 720;
}
#endif
if (mux == 1) {
/* 双屏 960x720:180° 后 chn0 右下、chn1 左下 */
chn_attr.rect.x = (vo_channel == 0) ? 960 : 0;
chn_attr.rect.y = 480; /* 1200 - 720 */
chn_attr.rect.width = 960;
chn_attr.rect.height = 720;
} else if (mux == 0) {
/* 全屏 1920x1200:中心对称后仍为整屏,位置不动 */
chn_attr.rect.x = 0;
chn_attr.rect.y = 0;
chn_attr.rect.width = 1920;
chn_attr.rect.height = 1200;
} else if (mux == 2) {
/* 原右上角 1280x720 → 180° 后落到左下角 */
chn_attr.rect.x = 0; /* 1920 - 640 - 1280 */
chn_attr.rect.y = 480; /* 1200 - 0 - 720 */
chn_attr.rect.width = 1280;
chn_attr.rect.height = 720;
}
chn_attr.priority = priority;
@@ -897,6 +921,8 @@ static td_s32 sample_comm_vo_get_vo_layer_attr(sample_vo_cfg *vo_config, ot_vo_v
if (memcmp(&vo_config->disp_rect, &def_disp_rect, sizeof(ot_rect)) != 0) {
layer_attr->display_rect.width = vo_config->disp_rect.width;
layer_attr->display_rect.height = vo_config->disp_rect.height;
layer_attr->display_rect.width = vo_config->disp_rect.width;
layer_attr->display_rect.height = vo_config->disp_rect.height;
}
layer_attr->img_size.width = layer_attr->display_rect.width;