longo92 wrote: ↑
Mon Sep 03, 2018 4:13 pm
OK, but the program blocks on mmal_disable_port on resizer output port (the port "linked" to the callback), possible reasons?
At a guess you've called the mmal_port_disable from the callback context.
Disable has to be able to return all the buffers, calling the callback on each of them, and it won't complete until it has done that. If you've blocked the callback context by calling mmal_port_disable from it, then it will stall.
Have a look at https://github.com/raspberrypi/userland ... _basic_2.c
as a basic example. That is decoding an H264 encoded video clip where the resolution of the clip isn't known in advance. MMAL will send it a buffer with buffer->cmd == MMAL_EVENT_FORMAT_CHANGED, and it then actions disabling the port, destroying the pool, reconfiguring the port, create a new pool, and then enabling the port again and giving it those buffers.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.