STM32F4 input capture
Each signal would require it's own timer. Suitable timers must have at least 2 channels,  slave mode (reset mode) for PWM input, and the pin for channel 1 or 2 available. Pick 3 more timers from the reference manual that meet these criteria, then adapt your config function for these.