修改:信号包独立发包,周期100ms;
布局切换按键,增加开机读取电平状态
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
#define REF_NUM 2
|
||||
#define DISPLAY_NUM 2
|
||||
|
||||
#if 1
|
||||
#if 0
|
||||
|
||||
#define NOSIGNAL_YUV_PATH "./nosignal.yuv"
|
||||
|
||||
@@ -333,6 +333,8 @@ static td_s32 sample_start_vpss(ot_vpss_grp *vpss_grp, td_u32 vpss_grp_num, td_b
|
||||
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].border_en = TD_FALSE;
|
||||
vpss_chn_attr[1].aspect_ratio.mode = OT_ASPECT_RATIO_NONE;
|
||||
}
|
||||
@@ -565,7 +567,7 @@ static td_s32 sample_start_vdec(sample_vdec_attr *sample_vdec, td_u32 vdec_chn_n
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#if 0
|
||||
/* ==================== no-signal 占位图 ==================== */
|
||||
|
||||
/* 启动时调用:读源图 nosignal.yuv(1920x1200) 到 VB,填成 user pic frame_info */
|
||||
@@ -681,7 +683,7 @@ td_s32 vdec_set_nosignal_userpic(ot_vdec_chn chn)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void* h265_vdec_vpss_vo()
|
||||
{
|
||||
@@ -716,9 +718,9 @@ void* h265_vdec_vpss_vo()
|
||||
}
|
||||
|
||||
/* 新增:启动读源图并 set user pic(set 前必须先 disable) */
|
||||
if (load_nosignal_src() != TD_SUCCESS) {
|
||||
printf("[nosignal] load src fail, nosignal disabled\n");
|
||||
}
|
||||
// if (load_nosignal_src() != TD_SUCCESS) {
|
||||
// printf("[nosignal] load src fail, nosignal disabled\n");
|
||||
// }
|
||||
|
||||
|
||||
/************************************************
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
#include "sample_comm.h"
|
||||
|
||||
extern td_s32 vdec_set_nosignal_userpic(ot_vdec_chn chn);
|
||||
// extern td_s32 vdec_set_nosignal_userpic(ot_vdec_chn chn);
|
||||
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ void *net_recv1(void *arg)
|
||||
int len = sizeof(clientAddr);
|
||||
unsigned char buf[2048];
|
||||
static int count_time_out=0;
|
||||
static int nosignal_on = 0; //nosignal satuts
|
||||
// static int nosignal_on = 0; //nosignal satuts
|
||||
ot_vdec_stream stream;
|
||||
int ret;
|
||||
|
||||
@@ -231,16 +231,16 @@ void *net_recv1(void *arg)
|
||||
i = recvfrom(socket_descriptor[0],buf, 1472, 0, (struct sockaddr*)&clientAddr, &len);
|
||||
if(i>0){
|
||||
switch_video[2] = 0xAA;
|
||||
if (nosignal_on == 1) {
|
||||
ret = ss_mpi_vdec_disable_user_pic(0);
|
||||
printf("[nosignal] disable_user_pic ret=%#x\n", ret);
|
||||
ret = ss_mpi_vdec_start_recv_stream(0);
|
||||
printf("[nosignal] start_recv_stream ret=%#x\n", ret);
|
||||
nosignal_on = 0;
|
||||
printf("[nosignal] -> back to normal decode\n");
|
||||
}
|
||||
// if (nosignal_on == 1) {
|
||||
// ret = ss_mpi_vdec_disable_user_pic(0);
|
||||
// printf("[nosignal] disable_user_pic ret=%#x\n", ret);
|
||||
// ret = ss_mpi_vdec_start_recv_stream(0);
|
||||
// printf("[nosignal] start_recv_stream ret=%#x\n", ret);
|
||||
// nosignal_on = 0;
|
||||
// printf("[nosignal] -> back to normal decode\n");
|
||||
// }
|
||||
|
||||
#if 0
|
||||
#if 0
|
||||
stream.pts = 0;
|
||||
stream.addr = buf;
|
||||
stream.len = i;
|
||||
@@ -252,17 +252,17 @@ void *net_recv1(void *arg)
|
||||
ret = ss_mpi_vdec_send_stream(0, &stream, 0);
|
||||
// usleep(1000);
|
||||
} while (ret != TD_SUCCESS);
|
||||
#endif
|
||||
#endif
|
||||
assemble_nal1(buf,i);
|
||||
}
|
||||
if(i<=0){
|
||||
if (nosignal_on == 0) {
|
||||
ss_mpi_vdec_stop_recv_stream(0);
|
||||
ss_mpi_vdec_disable_user_pic(0); /* 文档:set 前先 disable */
|
||||
vdec_set_nosignal_userpic(0); /* 通道已停,此时 set 才合法 */
|
||||
ss_mpi_vdec_enable_user_pic(0, 1); /* 立即显示占位图 */
|
||||
nosignal_on = 1;
|
||||
}
|
||||
// if (nosignal_on == 0) {
|
||||
// ss_mpi_vdec_stop_recv_stream(0);
|
||||
// ss_mpi_vdec_disable_user_pic(0); /* 文档:set 前先 disable */
|
||||
// vdec_set_nosignal_userpic(0); /* 通道已停,此时 set 才合法 */
|
||||
// ss_mpi_vdec_enable_user_pic(0, 1); /* 立即显示占位图 */
|
||||
// nosignal_on = 1;
|
||||
// }
|
||||
switch_video[2] = 0x55;
|
||||
printf("net1 recv timeout %d\n",i);
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user