Could NOT find CARES

When I built wireshark in ubuntu, it emitted this error.

The correct packages to install are

1
2
3
4
5
sudo apt install libgcrypt20-dev libc-ares-dev libpcap-dev
mkdir bld
cd bld
cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/installed -DCMAKE_PREFIX_PATH=/home/work/3rdParty/qt/5.15.2/gcc_64
#.

VS Code memo

launch.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "dbg a.out",
			"type": "cppdbg",
			"request": "launch",
			"program": "${workspaceRoot}/path/to/a.out",
			"args": [
				"-b",
				"sim"
			],
			"stopAtEntry": false,
			"cwd": "${workspaceRoot}/path/to/",
			"environment": [
				{
					"name": "LD_LIBRARY_PATH",
					"value": "./:${workspaceRoot}/path/to/:/usr/local/cuda-11.1/lib64"
				},
				{
					"name": "GST_DEBUG_DUMP_DOT_DIR",
					"value": "/home/work/tmp"
				}
			],
			"externalConsole": false,
			"MIMode": "gdb",
			"setupCommands": [
				{
					"description": "Enable pretty-printing for gdb",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			]
		},
		{
			"name": "C++ Attach (GDB)",
			"type": "cppdbg",
			"request": "attach",
			"targetArchitecture": "x64",
			"program": "${workspaceRoot}/path/to/a.out",
			"processId": "${command:pickProcess}"
		}
	]
}

Don't translate tab to spaces,

1
File -> Preferences -> Settings -> Text Editor -> Insert Spaces / Detect Indentation

Display std::string or std::vector content

1
-exec -enable-pretty-printing

Build FFMpeg in Windows

In MSYS2 x64 bash,

pacman -S mingw-w64-x86_64-toolchain
pacman -S base-devel
pacman -S yasm nasm gcc

basedir=/d/work/open

cd ${basedir}/x264
./configure --prefix=${basedir}/x264_install --enable-static --extra-cflags="-O0 -g3" --enable-debug
make
make install

cd ${basedir}/ffmpeg
./configure --prefix=${basedir}/ffmpeg_install --enable-static --disable-shared --extra-cflags=-I${basedir}/x264_install/include --extra-ldflags=-L${basedir}/x264_install/lib
make
make install

refer to:
http://events.jianshu.io/p/53ecc4dbe7d0
https://www.videolan.org/developers/x264.html
http://ffmpeg.org/download.html
https://www.msys2.org/
https://git-scm.com/download/win

Rtsp memo

Terms,

1
2
3
4
5
6
7
8
CC: CSRC Counter
CSRC: Contributing Source
SSRC: Synchronization Source
FIR: Full Intra Request, rfc5104
FCI: Feedback Control Information
REMB: Receiver Estimated Max Bitrate
TWCC: Transport wide Congestion Control
RTX: retransmission

Sdp example

v=0
o=- 17618512456233465749 1 IN IP4 127.0.0.1
s=Session streamed with GStreamer
i=rtsp-server
t=0 0
a=tool:GStreamer
a=type:broadcast
a=control:*
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:3000
a=rtpmap:96 H264/90000
a=framerate:30
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=J2QAFKwrYKD9gIgAAAMACAAAAwHnQgAW4gAC3G173wdocKuA,KO48sA==;profile-level-id=640014;level-asymmetry-allowed=1
a=control:stream=0
a=ts-refclk:local
a=mediaclk:sender
a=ssrc:4060724388 cname:user1571168269@host-d3352119

refer to:
https://www.rfc-editor.org/rfc/rfc3550
https://www.rfc-editor.org/rfc/rfc3551
https://www.rfc-editor.org/rfc/rfc2326
https://www.rfc-editor.org/rfc/rfc4588
https://www.rfc-editor.org/rfc/rfc4585
https://www.rfc-editor.org/rfc/rfc7273
https://blog.csdn.net/weixin_42462202/article/details/98986535
https://github.com/fanxiushu/xdisp_virt
https://www.ngui.cc/el/72647.html

onnx relocation R_X86_64_TPOFF32 against hidden symbol

1
2
3
export CMAKE_ARGS="-DONNX_USE_PROTOBUF_SHARED_LIBS=ON"
apt-get install libprotobuf-dev protobuf-compiler
pip install onnx -i https://pypi.tuna.tsinghua.edu.cn/simple

MacOs 3d presentation in VMWare

Although VMWare can't support hardware accelerated 3d rendering for macos, I happened to see Garageband running in my old laptop, it indicates 'macOS Catalina (Version 10.15.4)' supports middle layer OpenGL software simulation, while up-to-date macOS deviates from this style.

Build GStreamer in Windows

1
2
3
4
5
6
7
8
9
10
11
12
python -m pip install meson
python -m pip install ninja
 
git clone https://gitlab.freedesktop.org/gstreamer/gstreamer.git
cd gstreamer
 
rd /S /Q build
meson --buildtype=release -Dprefix=%CD%/installed -Dlibav=enabled -Dgst-plugins-ugly:x264=enabled -Dgst-plugins-bad:nvcodec=enabled build
 
meson compile -C build
 
meson install -C build

refer to:
https://gstreamer.freedesktop.org/documentation/installing/building-from-source-using-meson.html
http://dljz.nicethemes.cn/news/show-62582.html
https://blog.csdn.net/yuwg_le/article/details/126147636