Tool/software: Linux
Hi,
I recompile the dual-camera-demo in topdir of sdk4.2.0.9 with :make dual-camera-demo
I changed the "default_parameters" in loopback.c to our own device:
/* Main camera */
cap0_device.memory_mode = V4L2_MEMORY_DMABUF;
cap0_device.num_buffers = NBUF;
strcpy(cap0_device.dev_name,"/dev/video2");
strcpy(cap0_device.name,"Capture 0");
cap0_device.buffers = NULL;
cap0_device.fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;
cap0_device.width = 1920;
cap0_device.height = 1080;
And I uncomment "#define USE_CMEM_BUF" to capture frames to .jpeg .
It display fine.But when I tried to click Capture the app will be crash:
root@am57xx-evm:/opt# ./dual_camera -platform linuxfb
CRTCs size: 1920x1080
Capture 0: Opened Channel
Capture 0: Capable of streaming
Capture 0: Init done successfully
allocating cmem buffer of size 0x3f4800
allocating cmem buffer of size 0x3f4800
Capture 1: Opened Channel
Capture 1: Capable of streaming
VIDIOC_G_PARM: Inappropriate ioctl for device
allocating cmem buffer of size 0x3f4800Only one camera detected
Running the demo on am57xx processor
w=1920, h=1080
//click "Capture " here
Segmentation fault (core dumped)
There is a image0.jpg in /usr/share/camera-images/ ,but nothing can be stored.
And I tried to read the buf from the cmem pointer "buf->cmem".There is still nothing in cmem.
We are anxious to use cmem to read picture from V4L2 quickly and then display the proccessed picture.
But we can't read the picture in this demo.Please help us.
Best Regards.