[mythtv-users] Stop / Start Athcool just Befor / After a Recording
Bob
spam at homeurl.co.uk
Wed Nov 23 20:14:11 EST 2005
Erik Karlin wrote:
> On Wed, Nov 23, 2005 at 09:06:40AM +0800, Bob wrote:
>>chris at cpr.homelinux.net wrote:
>>>On Tue, Nov 22, 2005 at 04:08:29PM +0800, Bob wrote:
>>>
>>>>Is there a way to run a script just before a recording starts and
>>>>another after it ends, ideally this would be specific to a capture
>>>>source as my next card (PVR 500) may not have this issue?
>>>
>>>I don't know how to trigger scripts when a recording starts, and
>>>managing sequential recordings would be a problem because you could end
>>>up with a race condition. It would be easier to use a cron job that
>>>parses http://localhost:6544/xml once per minute and looks for the
>>>appropriate tuner status:
>>>
>>>$ lynx -dump http://localhost:6544/xml | head -n 5
>>><!DOCTYPE Status>
>>><Status version="0.18.1.20050510-1" protoVer="15" time="6:15 AM"
>>>date="11/22/2005" >
>>><Encoders count="1" >
>>><Encoder local="1" connected="1" id="1" state="0" lowOnFreeSpace="0"
>>>hostname="linuxbox" />
>>></Encoders>
>>>
>>>You would want to look for the appropriate "Encoder" record and toggle
>>>the external program based on the state field.
>>
>>That could work, but it's a bit expensive and inelegant.
>>
>>If it were possible to run a shell script when a recording starts and
>>ends, the end script could use your method to check if there is an
>>imminent recording and not restart Athcool if there is, that would fix
>>the potential race condition you highlighted.
>
> you could just hijack the channel change "script" functionality and
> create a user job when the recording completes. The problem of
> back-to-back recordings is still possible. maybe some clever file
> locking scheme between a channel change (start) and user job (end) could
> do the trick.
That's not a bad idea, the other one that occurred to me is doesn't myth
un-mute the line in at the commencement of a recording and re-mute it at
the end? Presumably the race condition has been fixed in that script
already.
--
tveeprom: Hauppauge: model = 34132, rev = J158,
tveeprom: tuner = Philips FM1236 MK3 (idx = 58, type = 4)
tveeprom: audio_processor = MSP3416 (type = 14)
(new type Model 401)
model name : mobile AMD Athlon(tm) XP Processor
cpu MHz : 2277.214
cache size : 512 KB
(Plenty o' grunt on an ECS k7s5a MB)
Knoppmyth R5A16 (unmodified)
http://mysettopbox.tv/CHANGELOG.txt
MythTV 0.18.1
More information about the mythtv-users
mailing list