摘要: 最简单的方式 不用拷贝PC的时区文件(/usr/share/zoneinfo/PRC文件,复制到ARM开发板中的/etc/目录下,并改名为localtime)。 1./etc/profile中增减环境变量 TZ=CST-8 export TZ 2.重启后就能生效 阅读全文
posted @ 2020-07-02 15:30 kasader 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 是因为服务器系统为64位,但是交叉编译工具链是32位。 重装glibc yum install glibc.i686 遇到报错 There was a problem importing one of the Python modulesrequired to run yum. The error 阅读全文
posted @ 2020-07-01 18:48 kasader 阅读(385) 评论(0) 推荐(0) 编辑
摘要: s32Ret = HI_MPI_VDEC_SendStream(s32ChnId, &stStream, 0); // 参数3 ,0 表示非阻塞输入 if ((HI_SUCCESS != s32Ret)) { printf("error type is 0x%#x", s32Ret); usleep 阅读全文
posted @ 2020-06-20 15:32 kasader 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 获取从1970年到现在的时间的毫秒数,用于记录视频帧实时时间 long long CSVGetLocalTime() { struct timeval time; struct timezone tz; gettimeofday(&time, &tz); printf("time is %lld\n 阅读全文
posted @ 2020-06-15 09:50 kasader 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 最简单理解:回调函数本质是一个函数指针,只是定义个函数的指针 返回值和参数,实现的话需要在用的时候实现 假如在一个libXXX.so中定义好了这个函数指针,并且想通过它来向主程序传递数据 头文件 comm.h ....... typedef void( *REALDATACALLBACK)(); . 阅读全文
posted @ 2020-05-11 18:24 kasader 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 1. 查看自己账户下的 .bashrc 内容是不是正常 一般为: # .bashrc # Source global definitionsif [ -f /etc/bashrc ]; then . /etc/bashrcfi # Uncomment the following line if yo 阅读全文
posted @ 2020-04-24 15:45 kasader 阅读(2022) 评论(0) 推荐(0) 编辑
摘要: 1. winows 下用ssh-keygen 生成公钥和秘钥(使用git Bash Here) 使用命令 ssh-keygen.exe -t rsa (可以一路Enter) 2.将公钥发送到服务器 ssh-copy-id -i .ssh/id_rsa.pub user@192.168.1.110,此 阅读全文
posted @ 2020-04-23 13:43 kasader 阅读(8556) 评论(0) 推荐(1) 编辑
摘要: 原文章 http://blog.sina.com.cn/s/blog_68f3489201014yri.html 核心代码: char *device="eth0"; //eth0是网卡设备名 unsigned char macaddr[ETH_ALEN]; //ETH_ALEN(6)是MAC地址长 阅读全文
posted @ 2020-04-10 16:37 kasader 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 临时调试可执行程序时,找不到对应的lib.so时可以写环境变量指定路径 export LD_LIBRARY_PATH=/opt/gtk/lib:$LD_LIBRARY_PATH 然后执行bin,就可以在默认lib目录找不到的情况下,从指定的目录找库文件 阅读全文
posted @ 2020-04-10 16:32 kasader 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 1.从官网下载curl源码,本次使用curl-7.69.1版本 2. 解压后执行./configure --prefix=/home/hyn/git_cvr/tmp_rebuild_make/curl-7.69.1/curl_x86_install/ (--prefix指定生成路径,要用绝对路径)如 阅读全文
posted @ 2020-04-10 16:28 kasader 阅读(343) 评论(0) 推荐(0) 编辑