I'm implementing a bare metal environment that allows me to access the camera of the PI. I know it's not that easy, however I'm quite close to get it to work. I've implemented a - let's call it lean - VCHIQ that does not use the IOCTL stuff as linux does. Also I'm not intending to differ between user space and kernel space memory as such. It will be a boxed environment ...
I already get the red light of the camera "glowing" indicating that the camera is active and able to send the image data to my application.
As far as I understand the MMAL implementation for the camera I need to send a buffer to the camera where the image data should be stored. This is done in VCHIQ using a "BULK" transfer/recieve mechanism. There I'm struggeling as my implementation of the VCHIQ does not seem to recieve any valid data in the buffer I'm passing.
As far as I've seen in the Circle and Ultibo source code you guys do have your implementation matching more or less the linux features there. However, one is using the "CREATE_PAGELIST" to pass the buffer the bulk recieve should store the data and one does not. I've no clue what this function does and whether one of you ever had successfully used the features of your VCHIQ implementations to recieve bulk data from a VC component.
I know it's hard to support without any kind of source code but I would like to know if someone got this to work already and might want to share your experience here...
Roughly speeking I'm already able to do this on pseudo code:
Code: Select all
camera_component_create camera_port_parameter_set(width=64, height=64) camera_encoding_set(encoding = ENCODING_RGB16, variant = ENCODING_RGB16) camera_enable camera_port_enable camera_send_buffer --> this triggers the video callback.... ... video_buffer_callback(BUFFER* buffer) => the buffer that has been passed to the camera could be accessed here
The recieved flag in the buffer is set to MMAL_BUFFER_HEADER_FLAG_FRAME_END | MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED but I don't know what is the reason for the failing transmission. Is the any trace/logging I could activate on VC/GPU side to track down the root cause??
I've also seen that the flag in the buffer is set to MMAL_BUFFER_HEADER_FLAG_FRAME_END only, but still no image data.
I'd really appreciate if someone has also tried this and may have some experience to share ...
Looking forward to get the hopefully last small pieces together to access the camera and video streams from my baremetal environment
Thanks in advance