Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5745

Camera board • Re: Create camera + encoder with MMAL requests from baremetal code

$
0
0
Thanks. I would have done that, but looks like I have succeeded in making an encoder work.
The order of actions that worked was this:
1. Create all components /ports
2. Set formats to all ports - camera , encoder input, encoder output (ports disabled , component enabled)
3. Connect the camera to encoder (do not enable any port yet)
4. Set zero copy parameter to all ports - camera , encoder input, encoder output
5. enable all ports now - in my case order is enable encoder output, then encoder input, then camera port
6. Allocate and bind 1 buffer (as recommented by the port itself) to the encoder output
7. Set CAPTURE parameter on camera so camera starts generating output.
8. In BUFFER_TO_HOST callback messages send buffers back after using them with BUFFER_FROM_HOST messages.

In my previously non-working scenario - setting zero copy parameter and enablling the ports were switched (4 and 5) and that was the problem, now it seems logical, you first set the port up, then enable the port.

Also first buffer that comes with CONFIG flag looks like a valid data that will go to the header of movie file.

Statistics: Posted by valc — Sat May 11, 2024 4:53 am



Viewing all articles
Browse latest Browse all 5745

Trending Articles