__attribute__

2021年10月5日 · 701 字 · 2 分钟

The keyword attribute allows you to specify special properties of variables, function parameters, or structure, union, and, in C++, class members. This attribute keyword is followed by an attribute specification enclosed in double parentheses. Some attributes are currently defined generically for variables. Other attributes are defined for variables on particular target systems. Other attributes are available for functions (see Function Attributes), labels (see Label Attributes), enumerators (see Enumerator Attributes), statements (see Statement Attributes), and for types (see Type Attributes). Other front ends might define more attributes (see Extensions to the C++ Language).

Specifying Attributes of Variables

GoogleTest 的简单使用

2021年10月4日 · 613 字 · 2 分钟

The reliability and robustness of SQLite is achieved in part by thorough and careful testing.

As of version 3.33.0 (2020-08-14), the SQLite library consists of approximately 143.4 KSLOC of C code. (KSLOC means thousands of “Source Lines Of Code” or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 640 times as much test code and test scripts - 91911.0 KSLOC.

上文出自How SQLite Is Tested

v4l2loopback 简单使用

2021年10月1日 · 474 字 · 1 分钟

笔记本升级 Ubuntu:21.10 后,自带的摄像头检测不到了。物理摄像头虽然有贴纸盖着,一般不用,但有时需要测试 webrtc 推流,没有视频采集源也是个麻烦事。winmac 平台都有虚拟摄像头软件,linux 必然也有。网上搜了一下,有个 v4l2loopback 的工具,配合 ffmpeg 可以虚拟摄像头供相关软件采集。

pulseaudio-utils 的简单使用

2021年9月30日 · 1048 字 · 3 分钟

使用 Pulse Audio:

  • 查看 sinks, sources
  • 播放 wav 文件,
  • 录制系统输出的声音
  • 录制指定软件输出的声音
  • 通过代码(c),录制和播放 pcm 数据

Terminal 快捷键

2021年9月19日 · 96 字 · 1 分钟

Tab 联想 ; ctrl+z 切后台,相当于& ctrl+c 停止 ; ctrl+u 删除至行首 ctrl+d 登出/退出 ; ctrl+k 删除至行尾 ctrl+l 清屏 ; ctrl+w 删除一个单词 ctrl+a 光标移至行首 ; ctrl+y 粘贴删除的内容 ctrl+e 光标

FFmpeg 播放 mp3 和 LRC 时音乐歌词不同步?

2021年9月19日 · 709 字 · 2 分钟

NO. 歌曲 歌词 1 🎵 see you again 📝 2 🎵 那些年 📝 上面两首歌和其对应的歌词,在用 ffmpeg/ffplay 播放的时候,发现第一首两者同步,第二首音乐和歌词不同步。播放命令如下 ffplay -vf subtitles=filename=xxxx.lrc

Bash 脚本学习

2021年9月2日 · 1282 字 · 3 分钟

工作和生活中用的电脑都是 ubuntu(18.04) 系统,时不时需要编写一些 Bash 脚本,目的当然是为了减少重复作业。为了避免每次都 临时低效 地检索,索性自己整理一下。互联网中资料是海量的,但是垃圾信息也越来越多了,感觉现在上网找答案都好难,到处都是广告,无脑转载,标题党……

Linux 常用命令

2021年5月25日 · 1995 字 · 4 分钟

Linux 命令行下有很多常用工具,每个工具又有各种使用方法。这里记录一些常用工具的常用使用方法。对于较为复杂的工具,比如 ffmpeg 则记录在单独的日志里。

FFmpeg Makefile to CMakeLists.txt

2021年5月23日 · 1034 字 · 3 分钟

想了解学习下 FFmpeg 的源码,并希望可以自己编译调试。

官网介绍的开发环境中 IDE 是 Eclipse, 本人不熟悉。自己常用的是 CLion/CMake。但是 FFmpeg 是基于 Makefile 文件构建的, CLion 好像不支持,(已经支持了,我也是写这篇日志的时候才知道,详见官网说明,感觉还没开始就已经结束了,汗~)。