rtmp: Factorize the code by adding find_tracked_method