Coding Spirit

一位程序员,比较帅的那种

gpio-keys is part of Linux input subsystem that can be used as key driver which can generate gpio interrupt. Comparing with user-implemented drivers base on GPIO subsystem, gpio-keys is much easier to use since it supports features like debounce/autorepeat by default.

Read more »

To add FFMPEG(libav) into CMake project, we can use pkgconfig:

1
2
3
4
5
6
7
8
9
10
11
12
13
find_package(PkgConfig REQUIRED)
pkg_check_modules(FFMPEG REQUIRED IMPORTED_TARGET
libavdevice
libavformat
libavcodec
libavutil
libavfilter
libswresample
libswscale
)

target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE PkgConfig::FFMPEG)
target_link_libraries(${PROJECT_NAME} PRIVATE PkgConfig::FFMPEG)

Maybe not all libs are required by your project. Remove unnecessary libs if you want.

0%