kuento 学习-kms-pointerdetector 编译-运行-调试
程序员文章站
2022-07-14 20:33:45
...
1、编译
1、下载代码
2、复制到kms-omni-build# 目录下
3、修改kms-omni-build# vi CMakeLists.txt
../kms-omni-build# vi CMakeLists.txt
...
dd_subdirectory(kms-pointerdetector)
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_BINARY_DIR}/kms-pointerdetector/src/server")
list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_BINARY_DIR}/kms-pointerdetector")
list(INSERT CMAKE_PREFIX_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/kms-pointerdetector")
set(KMSFILTERS_BINARY_DIR_PREFIX "${CMAKE_CURRENT_BINARY_DIR}" CACHE PATH "Path prefix used to look for binary files" FORCE)
set(KMSFILTERS_SOURCE_DIR_PREFIX "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH "Path prefix used to look for source files" FORCE)
set(KURENTO_MODULES_DIR "${KURENTO_MODULES_DIR};${CMAKE_CURRENT_BINARY_DIR}/kms-pointerdetector/src/server/kmd" CACHE PATH "Directory where kurento modules descriptors can be found" FF
ORCE)
...
2、编译错误及解决办法
问题 1、
Make Error at kms-pointerdetector/tests/check/CMakeLists.txt:11 (target_link_libraries):
Attempt to add link library "glib-2.0" to target "kmstestutils" which is
not built in this directory.
解决办法:不用编译tests 模块, 在CMakefile.txt中注释掉
../kms-omni-build/kms-pointerdetector# vi CMakeLists.txt
add_subdirectory(src)
#add_subdirectory(tests)
问题 2、
/home/sandra/kms/kms-omni-build/kms-pointerdetector/src/gst-plugins/pointerdetector/kmspointerdetector.c:163:3: error: ‘soup_session_sync_new’ is deprecated: Use 'soup_session_new' in]
session = soup_session_sync_new ();
解决办法: session = soup_session_sync_new (); 改为 soup_session_new ();
SoupSession *session;
SoupMessage *msg;
FILE *dst;
session = soup_session_sync_new ();
msg = soup_message_new ("GET", url);
soup_session_send_message (session, msg);
dst = fopen (file_name, "w+");
SoupSession *session;
SoupMessage *msg;
FILE *dst;
session = soup_session_new ();//soup_session_sync_new (); //wanli
msg = soup_message_new ("GET", url);
soup_session_send_message (session, msg);
dst = fopen (file_name, "w+");
问题 4、
/home/sandra/kms/kms-omni-build/kms-pointerdetector/src/gst-plugins/pointerdetector/kmspointerdetector.c:890:9: error: implicit declaration of function ‘sqrt’ [-Werror=implicit-function-declaration]
sqrt (((abs (pointerdetector->priv->finalPointerPosition.x - p[0]) -
^~~~
解决办法:加#include<math.h>
问题 5、
/home/sandra/kms/kms-omni-build/kms-pointerdetector/src/gst-plugins/pointerdetector/kmspointerdetector.c:188:9: error: implicit declaration of function ‘cvLoadImage’; did you mean ‘cvShowImage’? [-]
aux = cvLoadImage (uri, CV_LOAD_IMAGE_UNCHANGED);
^~~~~~~~~~~
cvShowImage
make[2]: Circular kms-core/src/server/core.kmd.json <- kms-core/src/server/core.kmd.json dependency dropped.
/home/sandra/kms/kms-omni-build/kms-pointerdetector/src/gst-plugins/pointerdetector/kmspointerdetector.c:188:27: error: ‘CV_LOAD_IMAGE_UNCHANGED’ undeclared (first use in this function)
aux = cvLoadImage (uri, CV_LOAD_IMAGE_UNCHANGED);
解决办法:加头文件#include<opencv2/imgcodecs/imgcodecs_c.h>
编译通过,main: Kurento Media Server started
0:00:00.177768647 60803 0x55a9cbbb04c0 INFO KurentoServerMethods ServerMethods.cpp:90:ServerMethods: Using above 80.00% of system limits will throw NOT_ENOUGH_RESOURCES exception
0:00:00.177787795 60803 0x55a9cbbb04c0 INFO KurentoServerMethods ServerMethods.cpp:109:ServerMethods: System limits: 188862 threads, 1024 files
0:00:00.178427751 60803 0x55a9cbbb04c0 INFO KurentoServerMethods ServerMethods.cpp:144:ServerMethods: RPC Request Cache is ENABLED
0:00:00.178596046 60803 0x55a9cbbb04c0 INFO KurentoWebSocketTransport WebSocketTransport.cpp:152:WebSocketTransport: WebSocket server listening on address '::', port 8888
0:00:00.178607142 60803 0x55a9cbbb04c0 INFO KurentoWebSocketTransport WebSocketTransport.cpp:249:WebSocketTransport: Secure websocket server not enabled
0:00:00.179009475 60803 0x55a9cbbb04c0 INFO KurentoMediaServer main.cpp:259:main: Kurento Media Server started
但是,kurento-pointerdetector 运行不成功,查看控制台信息插件没有加载成功
./libpointerdetector.so cannot be loaded
tor/libpointerdetector.so cannot be loaded: /home/sandra/kms/kms-omni-build/build-Debug/kms-pointerdetector/src/gst-plugins/pointerdetector/libpointerdetector.so: undefined symbol: cvRound
0:00:00.158384422 60803 0x55a9cbbb04c0 INFO KurentoModuleManager ModuleManager.cpp:137:loadModule: Loaded module: pointerdetector, version: 6.7.1~11.gc10dd93, date: Mar 3 2020 13:54:13
0:00:00.162656164 60803 0x55a9cbbb04c0 WARN KurentoModuleManager ModuleManager.cpp:65:loadModule: Module /home/sandra/kms/kms-omni-build/build-Debug/kms-pointerdetector/src/gst-plugins/pointerdetector/libpointerdetector.so cannot be loaded: /home/sandra/kms/kms-omni-build/build-Debug/kms-pointerdetector/src/gst-plugins/pointerdetector/libpointerdetector.so: undefined symbol: cvRound
0:00:00.170224472 60803 0x55a9cbbb04c0 INFO KurentoModuleManager ModuleManager.cpp:90:loadModule: Load file: /home/sandra/kms/kms-omni-build/build-Debug/kms-elements/src/server/libkmselementsmodule.so, module name: /home/sandra/kms/kms-omni-build/build-Debug/kms-elements/src/server/libkmselementsmodule.so
0:00:00.170266314 60803 0x55a9cbbb04c0 INFO KurentoModuleManager ModuleManager.cpp:137:loadModule: Loaded module: elements, version: 6.13.1~3.g5ef161f, date: Mar 3 2020 13:54:13
下一篇: Hudi 系列(二)- 编译 hudi
推荐阅读
-
快速建立Servlet和JSP的运行、调试和编译环境
-
kuento 学习-kms-pointerdetector 编译-运行-调试
-
嵌入式系统及应用Linux学习笔记(三)— GCC/G++编译器与调试器
-
linux学习笔记——在ubuntu系统下编译运行c程序并使用makefile管理项目
-
Windows下使用VS Code 编译、运行和调试C/C++
-
C语言学习2:Windows通过命令行编译运行c程序(Hello World)及程序详解
-
Linux下C程序的编辑,编译和运行以及调试(c++使用g++)
-
快速建立Servlet和JSP的运行、调试和编译环境_MySQL
-
java学习_使用记事本编译运行报错(找不到或无法加载主类)
-
快速建立Servlet和JSP的运行、调试和编译环境_MySQL