Author Topic: run a script when exiting mythtv  (Read 3152 times)

gaspala

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
run a script when exiting mythtv
« on: May 08, 2010, 03:06:32 pm »
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

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: run a script when exiting mythtv
« Reply #1 on: May 10, 2010, 03:36:07 pm »
What is the end-goal of this setup?  What does the script do, and why do you need it?

gaspala

  • Regular Poster
  • **
  • Posts: 20
    • View Profile
Re: run a script when exiting mythtv
« Reply #2 on: May 11, 2010, 04:41:04 pm »
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

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: run a script when exiting mythtv
« Reply #3 on: May 11, 2010, 05:24:41 pm »
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.