Create hd-pivr.c

Initial drop of code from old google code repo.