rework of capture.c: better seperation of sync and capture pipe by using