I've been thnking about doing this for quite some time. there are already hardware solutions that do this, without a computer.
you could probably do it this way:
find some software that records, and splits files by 10 mins. then every 11 mins, delete the last file, except if you press a button. that should do it.