Add Capi wrapper controlled by enable-capi

better check p bfore call p->stop()