页次: 1
请问大佬,我使用的是荔枝派5.2的内核,buildroot使用的是2019.08,和你的是一样的;按照流程配置完内核和buildroot之后,能找到/dev/cedar_dev和/dev/ion,能用Cedar硬件解码并播放ban_apple,并且我能用fswebcam -S 1 -d /dev/video0 -p UYVY -r 800x600 test.jpg命令顺利拍照。但是在自己编译运行你发布的ipc_cedarc_venc应用程序之后,出现了Segmentation fault,我从debug信息中看到:error : venc <videodev_out_buf:171>:ioctl VIDIOC_DQBUF fail ret = ffffffff这样一段错误,请问问题可能出在哪里呢?求大佬指点一二~
完整log信息如下
# ./ipc_cedarc_venc 800x600 /dev/video0 rtmp://192.168.0.103/live/home
warning: venc <pix_arg_get:149>:pix_arg_get 800x600
warning: venc <main:58>:video dev :/dev/video0
warning: venc <main:59>:rtmp url :rtmp://192.168.0.103/live/home
warning: venc <videodev_init:67>:ioctl VIDIOC_G_FMT ret = 0
warning: venc <main:68>:videodev_init succ
Output #0, flv, to 'rtmp://192.168.0.103/live/home':
Stream #0:0: Video: h264 (libopenh264), nv21, 800x600, q=2-31, 2097 kb/s, 1k tbn
debug : omx_thread <createThread:123>:+++++ self->mThread: 3038561360
debug : omx_thread <OmxThread_Run:151>:thread venc start to run!
debug : omx_thread <createThread:123>:+++++ self->mT[ 8.982947] ------------[ cut here ]------------
hread: 3030168656
debug : omx_thread <OmxThread_Run:151>:threa[ 8.988878] WARNING: CPU: 0 PID: 139 at mm/page_alloc.c:4711 __alloc_pages_nodemask+0x2d4/0xd7c
d rtmp start to run!
error : venc <videodev_out_buf:171>: 9.003050] Modules linked in:
31mioctl VIDIOC_DQBUF fail ret = ffffffff
debug : ionAlloc[ 9.011652] CPU: 0 PID: 139 Comm: venc Not tainted 5.2.0-licheepi-zero+ #78
[ 9.024124] Hardware name: Allwinner sun8i Family
[ 9.028849] [<c010ede4>] (unwind_backtrace) from [<c010b774>] (show_stack+0x10/0x14)
[ 9.036589] [<c010b774>] (show_stack) from [<c07e2bd8>] (dump_stack+0x88/0x9c)
[ 9.043808] [<c07e2bd8>] (dump_stack) from [<c011ddb4>] (__warn+0xdc/0xf4)
[ 9.050677] [<c011ddb4>] (__warn) from [<c011dee4>] (warn_slowpath_null+0x40/0x48)
[ 9.058237] [<c011dee4>] (warn_slowpath_null) from [<c01fd914>] (__alloc_pages_nodemask+0x2d4/0xd7c)
[ 9.067361] [<c01fd914>] (__alloc_pages_nodemask) from [<c0114704>] (__dma_alloc_buffer.constprop.4+0x34/0x8c)
[ 9.077349] [<c0114704>] (__dma_alloc_buffer.constprop.4) from [<c0114780>] (__alloc_remap_buffer+0x24/0x9c)
[ 9.087162] [<c0114780>] (__alloc_remap_buffer) from [<c0114824>] (remap_allocator_alloc+0x2c/0x34)
[ 9.096195] [<c0114824>] (remap_allocator_alloc) from [<c01149d8>] (__dma_alloc+0x17c/0x2a0)
[ 9.104622] [<c01149d8>] (__dma_alloc) from [<c0114b74>] (arm_dma_alloc+0x40/0x48)
[ 9.112183] [<c0114b74>] (arm_dma_alloc) from [<c017ccc4>] (dma_alloc_attrs+0xd0/0x110)
[ 9.120182] [<c017ccc4>] (dma_alloc_attrs) from [<c0603a34>] (ion_cma_allocate+0x58/0x108)
[ 9.128437] [<c0603a34>] (ion_cma_allocate) from [<c0600d88>] (ion_alloc+0xec/0x438)
[ 9.136171] [<c0600d88>] (ion_alloc) from [<c06018c0>] (ion_ioctl+0x1e4/0x424)
[ 9.143386] [<c06018c0>] (ion_ioctl) from [<c022adf0>] (do_vfs_ioctl+0xac/0x8c8)
[ 9.150775] [<c022adf0>] (do_vfs_ioctl) from [<c022b640>] (ksys_ioctl+0x34/0x58)
[ 9.158162] [<c022b640>] (ksys_ioctl) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 9.165805] Exception stack(0xc2441fa8 to 0xc2441ff0)
[ 9.170852] 1fa0: b40005b8 b6f75080 00000005 c0144900 b51cbb34 00000003
[ 9.179018] 1fc0: b40005b8 b6f75080 b6f750cc 00000036 00000000 b40005b8 b6f2d138 b40005d0
[ 9.187181] 1fe0: b58a08d0 b51cbafc b6f639ac b58a08dc
<__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ion[ 9.192276] ---[ end trace 4fe1418e4497cb7c ]---
Alloc <ion_alloc_open:134>:begin ion_alloc_open
debug : ced[ 9.202445] platform cma: Fail to allocate buffer
arc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <ion_alloc_open:175>:** phy offset = 40000000
debug : cedarc <VeRelease:1253>: ve release ok
debug : cedarc <LogVersionInfo:40>:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Cedar Codec <<<<<<<<<<<<<<<<<<<<<<<<<<<<
tag : createBranch_customize_sylix
branch: CedarC-v1.1.9
commit: 4a182bd42c931bea2f77b0ff9a531d233df8541e
date : Thu May 25 15:34:03 2017 +0800
author: jenkins8080
patch :
----------------------------------------------------------------------
debug : cedarc <VeSetSpeed:1559>: *** set ve freq to 360 Mhz ***
debug : cedarc <VeInitialize:1198>: ve init ok
debug : ionAlloc <__GetIonMemOpsS:985>:*** get __GetIonMemOpsS ***
debug : ionAlloc <ion_alloc_open:134>:begin ion_alloc_open
debug : cedarc <VideoEncInit:195>: (f:VideoEncInit, l:195)
debug : cedarc <VideoEncInit:210>: (f:VideoEncInit, l:210)
error : ionAlloc <ion_alloc_palloc:335>:ION_IOC_ALLOC error
error : cedarc <BitStreamCreate:45>: pSbmBuf == NULL.
error : cedarc <H264InitMemory:904>: h264Context->pBSMamager == NULL
Segmentation fault
页次: 1