Compare commits

1 Commits
Author SHA1 Message Date
xu 6e231f099e suzhou项目:画面翻转180,增加录屏功能 2026-09-18 11:28:47 +08:00
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;
Binary file not shown.
@@ -732,7 +732,7 @@ if((port == 20000) && (strcmp(fSubsession.mediumName(), "audio") == 0)){
for(i=0;i<iter;i++){
sendto(socket_descriptor,&fReceiveBuffer[i*1472],1472,0,(struct sockaddr *)&address,sizeof(address));
#if 0 //luzhi
#if 1 //luzhi
if(port == 20000){
sendto(socket_descriptor,&fReceiveBuffer[i*1472],1472,0,(struct sockaddr *)&address1,sizeof(address1));
}
@@ -750,7 +750,7 @@ if((port == 20000) && (strcmp(fSubsession.mediumName(), "audio") == 0)){
if(rem > 0){
sendto(socket_descriptor,&fReceiveBuffer[i*1472],rem,0,(struct sockaddr *)&address,sizeof(address));
#if 0
#if 1
if(port == 20000){
sendto(socket_descriptor,&fReceiveBuffer[i*1472],rem,0,(struct sockaddr *)&address1,sizeof(address1));
}
+4 -4
View File
@@ -331,10 +331,10 @@ static td_s32 sample_start_vpss(ot_vpss_grp *vpss_grp, td_u32 vpss_grp_num, td_b
vpss_chn_attr[1].frame_rate.src_frame_rate = -1;
vpss_chn_attr[1].frame_rate.dst_frame_rate = -1;
vpss_chn_attr[1].depth = 0;
vpss_chn_attr[1].mirror_en = TD_FALSE; //TD_TRUE; //180
vpss_chn_attr[1].flip_en = TD_FALSE; //TD_TRUE; //180
// vpss_chn_attr[1].mirror_en = TD_TRUE; //TD_TRUE; //180
// vpss_chn_attr[1].flip_en = TD_TRUE; //TD_TRUE; //180
// vpss_chn_attr[1].mirror_en = TD_FALSE; //TD_TRUE; //180
// vpss_chn_attr[1].flip_en = TD_FALSE; //TD_TRUE; //180
vpss_chn_attr[1].mirror_en = TD_TRUE; //TD_TRUE; //180
vpss_chn_attr[1].flip_en = TD_TRUE; //TD_TRUE; //180
vpss_chn_attr[1].border_en = TD_FALSE;
vpss_chn_attr[1].aspect_ratio.mode = OT_ASPECT_RATIO_NONE;
}
Binary file not shown.