[mythtv] Development thoughts + Mythtv crashing bug - during playback/delete

Isaac Richards mythtv-dev@snowman.net
Mon, 9 Sep 2002 15:52:17 -0400


On Monday 09 September 2002 02:29 pm, Grant Taylor wrote:
> Yes, please don't bother.  Mythtv is about watching TV.  Stuff like
> DVD can be handled with something trivial like
>
>   system("mplayer -dvd -blah-blah");

Yeah.  On the dvd note, I'll add support for it once playing DVDs in linux 
doesn't suck badly.

> Which brings up the point - is the frontend stuff at all scriptable?
> Currently most everything is a thread, which makes it rather hard to
> plug stuff in without writing code that runs in the same context as
> precious stuff like the timed recorder.

What would you want to do with it?

> What's more of a mystery is that I can't find what to put in my
> irxevent rc file for "space".  "KP_Space" is the only listed thing in
> the xevent docs, but that doesn't work.  Nor does "Space".  I'm quite
> sure my remote button works; irw shows it being pushed.
>
> I looked at the example ir config file, and I can see no way to use
> the supported keys to select the "Record this showing" or "Record this
> timeslot" or "Record this title" options.  Enter always exits the
> dialog - only a real space on the real keyboard seems to work, which
> is sort of awkward since my keyboard is in the basement!

I'll check that out.. haven't used the remote much lately, mainly been using a 
wireless keyboard.

> Does -g change anything else in the way the code compiles?  It might
> be a nice if the makefile defaulted to making a -g binary and then
> stripped it at install time.  This way people can gdb the unstripped
> exe and core files with symbols.

Turning on debug in settings.pro also turns off the mmx code and some other 
optimizations, which can cause problems in gdb.  It's a lot easier to debug a 
non-optimized binary.

> Also, is there something useful that can be done to snapshot a hanging
> mythtv?  A couple times a day the player will hang for about 60-120s
> when I'm in the middle of forwarding or reversing.  It just stops,
> with no sound, with the picture and "Forward" or "Reverse" osd overlay
> stuck, but it eventually continues.
>
> It's not crashing or saying anything.  I've never noticed any hang or
> jumps in whatever was recording under it at the time; seems like a
> player-specific issue.
>
> What threads are active and waiting on what during ffwd/rew modes?
>
> This is a little odd, the usual failure modes for threaded software
> are "hang forever" and "blow up occasionally".  Do you generally use
> semaphores with a 60s timeout or something?

No semaphores, but I bet the A/V sync code's getting thrown off somehow, and 
it's waiting for an abnormally long period of time before displaying the next 
frame -- happen to know if anything interesting is output to the console?

> Hmm.  The mpeg4 support does indeed work, and produces substantially
> smaller files.  There are however visible defects in the coding that
> are not present in the rtjpeg codec.  Usually, they appear as purple
> or green splotches that last for a few seconds at a frequency of
> several defects per 10 minute period.  The splotches seem to be small
> groupings of delta squares; ie they represent a small area of the
> motion between a series of similar frames.
>
> Possibly this has gone away with all the avcodec updates that went in
> over the past week; I haven't updated yet.

I did see those occasionally before I updated libavcodec, and haven't seen 
them since.  Of course, the problem could still be there and I just haven't 
been watching enough TV =)

Isaac