News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

run a script when exiting mythtv

Started by gaspala, May 08, 2010, 03:06:32 PM

Previous topic - Next topic

gaspala

I need to run a script every time I exit from mythtv. So, I added a response to event. I set event = 'A device is turned on or off', 'What device' = 'MythTV Player' and 'on or off?' to 0. This is not working.

I tested the commands using 'Test Command' button and that is working. I tried the MD also for 'What device'.

Any idea what is going wrong?

Note: This is in 710

jimbodude

What is the end-goal of this setup?  What does the script do, and why do you need it?

gaspala

For some unknown reason, MythTV changes MPEG decoder to 'Standard' (ffmpeg). This starts using the CPU instead of the GPU for rendering. That leads to slow response to remote control and high speed for CPU fan during live/playback of HD content. When I reset it to 'XVMC' things are bettter. So, I want to set MPEG decoder to XVMC whenever mythtv exits.

I found a work around using 'Application Exited' event on myth. But, still would like to know why 'deveice turned on or of' didn't work.

jimbodude

That doesn't work because the Player device wasn't turned off.  It's still there waiting for something to do.  The player device is not the same thing as mythtv's front end - it's a LinuxMCE device that runs all the time, waiting for you to call on it.  Then it activates mythtv as needed and sends the proper mythtv commands.

Have you looked at the graphics configuration options for the MD?  Go to web admin --> Wizard --> Devices --> Media Directors.  I believe these settings affect the MythTV configuration in 0710 - that is probably why you see the setting being changed automatically.  I think more MythTV configuration is happening automatically in 0810, by the way.

Whenever you see something changing automatically - you can be pretty sure that LinuxMCE is forcing some configuration on your behalf.  You should avoid scripting, and instead try to find the setting causing the behavior.  That way all the different components that use that setting will be properly configured for you.