[mythtv-users] Recording from STB that requests channel access pins

Eric Sharkey eric at lisaneric.org
Mon Jan 18 20:00:26 UTC 2016


On Sat, Jan 16, 2016 at 5:39 AM, Martin Bene <Martin.Bene at icomedias.com> wrote:
> Hi,
>
>> Lots of good feedback on this thread - I really appreciate the help.
>> I'll share my results if I get this running in an acceptable way.
>
> Turns out that this requires just a few lines of code with the right tools.

Very nicely done!  I never would have expected that to have such a
relatively simple solution.

I took a look at your script.  The one piece which seemed somewhat
brittle to me was the reliance on the mtime of the recording file
being updated at least every 30 seconds.  When an application has a
file descriptor open and is appending data to the file, I'm not sure
how often the metadata like mtime is updated.  Functions like
fdatasync specifically avoid updating the mtime when syncing data to
disk.  Depending on a number of factors, this could cause your script
to end early.  If you want to be more paranoid, you could check both
the mtime and the size of the recording file and keep going when
either has changed.

Eric


More information about the mythtv-users mailing list