sliver-chen / mpp_linux_cpp

a demo shows that how to use rockchip mpp framework in linux
54 stars 63 forks source link

is it working in Tinker Board RK3288 ? #2

Closed johlim closed 5 years ago

johlim commented 5 years ago

I built this with a few modifications on rk3288 board(Tinker OS)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3fac5d4..2f0bb75 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,6 +3,11 @@ cmake_minimum_required(VERSION 2.8)
 project(mpp_linux_demo)

 set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_C_COMPILER "/usr/bin/arm-linux-gnueabihf-gcc" )
+set(CMAKE_CXX_COMPILER "/usr/bin/arm-linux-gnueabihf-g++" )
+
+include_directories( "/usr/local/include/rockchip")
+include_directories( "/usr/include/libdrm")

 set(SOURCE_FILES main.cpp
         mpp/Codec.cpp
@@ -13,4 +18,4 @@ set(SOURCE_FILES main.cpp
         rkdrm/modeset.c)

 add_executable(mpp_linux_demo ${SOURCE_FILES})
-target_link_libraries(mpp_linux_demo mpp pthread drm)
\ No newline at end of file
+target_link_libraries(mpp_linux_demo rockchip_mpp pthread drm)

Question. It does not seem to work properly. Does not work on the debian Tinker Board?

linaro@tinkerboard:~/GitHub/mpp_linux_cpp/build$ ./mpp_linux_demo
mpi: mpp version: a340f34 author: Jacob Chen DEBIAN-ONLY: [osal]: drm: fix 64bit wrong offset
hal_h264d_api: hal_h264d_init mpp_buffer_group_get_internal used ion In
failed to open rga dev /dev/v4l/by-path/platform-ff680000.rga-video-index0.
failed to exec mRGA->init -1.
failed to init codec
mpp_meta: Assertion list_empty(&mlist_meta) failed at ~MppMetaService:129
mpp_buffer: mpp_group 0xb620ce60 tag hal_h264d_api_2 caller hal_h264d_init mode internal type ion deinit with 4040 bytes not released
mpp_buffer:
dumping buffer group 0xb620ce60 id 2
mpp_buffer: mode internal
mpp_buffer: type ion
mpp_buffer: limit size 0 count 0
mpp_buffer: used buffer count 1
mpp_buffer: buffer 0xb620e3a0 fd    9 size       4040 ref_count   1 discard 0 caller vdpu1_h264d_init
mpp_buffer: unused buffer count 0
mpp_buffer: Assertion buffer->ref_count == 0 failed at deinit_buffer_no_lock:184
Segmentation fault
dmitry1945 commented 5 years ago

This device /dev/v4l/by-path/platform-ff680000.rga-video-index0 does not exist. Anyone found solution?

sliver-chen commented 5 years ago

@johlim hi johlim this demo can run on almost all rk platforms,but you need to modify some places. i dont know the segment fault show in your log occur where,you need to find it first.

sliver-chen commented 5 years ago

@dmitry1945 please confirm if your bsp supports rga driver.

sliver-chen commented 5 years ago

@dmitry1945 rga driver is used to resize yuv,if your bsp don't support it. you can delete mRGA->swscale,but send srcFrm to drm'show.

johlim commented 5 years ago

I did not get a solution for this. But Thank for your reply