Back when my colleagues and I developed the original ReplayTV (which was not Linux-based, alas), we used the same concept to implement the variable-sized live-TV rewind buffer. Some of the engineers wanted to use a fixed-size file as a circular buffer, but I pointed out that if we used hole-punching (and 64-bit file offsets), the live-TV buffer could potentially use all otherwise unused disk space, and that as we needed to reclaim space for new video, we could just punch a hole at the beginning of the file. Effectively, the conceptual beginning of the file moves forward as the oldest video in the buffer is discarded.
This worked out really well, though I'm not sure whether they continued to use this approach when they switched to VxWorks for the 4000-series and later units.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds