I am trying to run the video capture sample code here on a Samsung Galaxy S3.
At first, I discovered several errors in many operations VIDIOC(e.g., S_FMTor STREAMON) that I could solve with:
- Looking at kmsg and tracking the kernel driver code to guess what went wrong.
- Add missing operations or correct some configurations in the sample code.
Comparison of the kmsg log with the launch of the sample code with the launch of the application for the native camera helped many .. (since the latter we are sure that it works)
Now I have come to this. All iocts completed successfully, but I get 0 data. v4l2_buffer->bytesusedalways 0.
I was desperate, so I added printk logs to each function in fimc_v4l2.c and fimc_capture.c (FIMC is the Samsung V4L2 driver), and that’s all I see when using the camera application : (I only paste the part after returning from STREAMON)
@@@ fimc_dqbuf # bytesused = length = 0 0
### fimc_dqbuf_capture start # bytesused = length = 0 0
### # fimc_dqbuf_capture list empty
fimc_irq_cap [0], fimc0, cnt [0]
fimc_irq_cap [0] SKIPPED
fimc_irq_cap [1] , fimc0, cnt [1]
@@@ fimc_dqbuf # bytesused = 0 length = 65545
### fimc_dqbuf_capture start # bytesused = 0 length = 65545
### fimc_dqbuf_capture # list not empty
### fimc_dqbuf_capture # length =
655 end # length = 65545, bytesused = 0
@@@ fimc_qbuf # bytesused = 0 length = 0
### fimc_qbuf_capture start
### fimc_qbuf_capture # buf state ok
### fimc_qbuf_capture # index = 0
### fimc_qbuf_capture end
@@@ fimc_dqbuf # bytesused = 3225703951 length = 0
### fimc_dqbuf_capture start # bytesused = 3225703951 length = 0
### fimc_dqbuf_capture # list empty
fimc_irq_cap [2], fimc0, cnt [2]
@@@ fimc_2_fbu = 255_7025_51_fb_25f__bf_25f__fm___fim_2_fb_25b_255_51_fb_25f__fm_cf_2_fb_fm = 65545
### fimc_dqbuf_capture start # bytesused = 3225703951 = length 65545
### fimc_dqbuf_capture # list is not empty
### fimc_dqbuf_capture # length = 65545
### fimc_dqbuf_capture end # length = 65545, bytesused = 3225703951
@@@ fimc_qbuf # bytesused = 0 length = 0
### fimc_qbuf_capture start
### fimc_qbuf_capture # buf state ok
### fimc_qbuf_capture # index = 1
### fimc_qbuf_capture end
log : DQBUF(empty) -> IRQ -> DQBUF -> QBUF. , b->lenght b->bytesused .
v4l2, .
, , 0 b->lenght b->bytesused:
@@@fimc_dqbuf # bytesused = 0 length = 0
### fimc_dqbuf_capture start # bytesused = 0 length = 0
### fimc_dqbuf_capture # list empty
fimc_irq_cap [0], fimc0, cnt [0]
fimc_irq_cap [0] SKIPPED
fimc_irq_cap [1], fimc0, cnt [1]
@@@fimc_dqbuf # bytesused = 0 length = 0
### fimc_dqbuf_capture start # bytesused = 0 length = 0
### fimc_dqbuf_capture # list
### fimc_dqbuf_capture # length = 0
### fimc_dqbuf_capture end # length = 0, bytesused = 0
@@@fimc_qbuf # bytesused = 0 length = 0
### fimc_qbuf_capture start
### fimc_qbuf_capture # buf state ok
### fimc_qbuf_capture # index = 0
### fimc_qbuf_capture end
@@@fimc_dqbuf # bytesused = 0length = 0
### fimc_dqbuf_capture start # bytesused = 0 length = 0
### fimc_dqbuf_capture # list empty
fimc_irq_cap [2], fimc0, cnt [2]
@@@fimc_dqbuf # bytesused = 0 length = 0
### fimc_dqbuf_capture start # bytesused = 0 length = 0
### fimc_dqbuf_capture # list not empty
### fimc_dqbuf_capture # length = 0
### fimc_dqbuf_capture end # length = 0, bytesused = 0
@@@fimc_qbuf # bytesused = 0 length = 0
### fimc_qbuf_capture start
### fimc_qbuf_capture # buf state ok
### fimc_qbuf_capture # index = 1
### fimc_qbuf_capture end
grep , , bytesused, .
- ?
strlen() mmap, . , ( 1 , , 10 , , , ). , , .
, bytesused 0.