Awesome app...I've got it running on my Ubuntu 8.04 server against a Tivo HD..and it works wonderfully.
I do have one issue..and my apologies if it's been addressed previously..but I've found that one has to be very careful how one exits the HME "environment". If I exit "cleanly" by hitting left arrow multiple times (waiting for each successive menu to be rendered), then everything's great...works as expected.
However, if I exit by just hitting the Tivo button (and from there doing whatever...standby, live tv, or anything else)...then the app doesn't seem to exit gracefully. In many cases, the VLC process will still be running on the ubuntu box, happily transcoding away (though a netstat -a reveals that there is no remote socket attached to the VLC process, so the Tivo has dropped the connection from its perspective). If I immediately go back to the HME app and select another stream (or even the same one, for that matter), it generally "does its thing" and changes gears successfully as I begin watching content. All seems well and good. However, if I hit the Tivo button/standby and go to bed..and try to access the HME app later on the next day...I get an error trying to open the stream (*any* stream or local file) as the VLC app has either frozen and/or crashed (probably due to some memory leak in the vlc application...been quite a problem over the years it appears from various threads dug up in a quick google search on the topic).
The HME "control" python process doesn't seem to recognize this fact...and never restarts VLC or attempts to clean up the defunct process. I've also tested with hitting the Tivo button, observing that VLC is still running..and then manually killing the VLC process. Going back into HME has the same problem...it won't start up another VLC process and again errors out when trying to open up a stream or file.
Killing the start.py and restarting it fixes the issue in all these cases, however I can't but wonder if there's a way to have the HME application sense that something's amiss and "punt" with regards to the VLC process. I took a look at the code, and I see that it's keeping some basic accounting that enumerates clients and kills the VLC when number of clients = 0..and then can subsequently start a fresh VLC process when needed. This is where I think the weakness lies...when one exits with the Tivo button, the HME process doesn't seem to be getting notified that it is disconnecting. Is there a better way to sense a "hang up"? Or perhaps a different approach is needed...one thing I thought of is instead of trying to count clients and killing the VLC process when clients=0, instead actively look at the number of sockets open (via a system call to netstat or some other way) and attached to the VLC process. When THAT number is zero, then kill the VLC process if it's still running. If no one is pulling data from VLC, then that's a sure-fire sign that the VLC process isn't needed and is going to cause problems if it hangs around.
Anyway, in the mean time I'll try to be careful how I exit the application, and I'll try to train the wife on the particulars on how to avoid the issue as well.
Thanks again for a wonderful application released for free to the public
