[mythtv] Re: [mythtv-commits] Re: Ticket #339: Simplify Tuning process

Daniel Kristjansson danielk at cuymedia.net
Thu Sep 22 06:21:08 UTC 2005


On Thu, 2005-09-22 at 05:32 +0000, MythTV wrote:
> Comment (by ijr):
> 
>  Heh.  Sorry, but...  The tv_rec changes are pretty iffy, I think.  I don't
>  understand why you like replacing member variable accesses with function
>  calls.  It's not any easier to read, IMO, and liable to make things slower
>  if the compiler doesn't decide those functions get inlined.
If the function is in the header file, I can't think of any compiler
which wouldn't inline them. But I believe the ones you are questioning
are actually cast wrappers, no?

Some of the functions, like in the whole TuningState thing, are
for debugging purposes only. Basically they make it easy for me
to add a verbose macro to print out the value when it is examined
or changed. I'm planning to collapse TuningState into TVRec when
I'm further along. I don't need half those variables except for
preliminary debugging.

TVRec is in a rough state right now.

>  The extra macros aren't good, either, especially the verbose wrappers.
>  It just makes it harder to read if a section of code is using its own
>  macros instead of the same functions everything else is.
I didn't like them much when I first saw Jacob using them in his code,
but it is almost impossible to figure out what is going wrong with
multiple recorders without some kind marker indicating which recorder
is spitting out which info. In this case I made it spit out the
cardid.

TVRec is in a VERY rough state right now, the main reason for posting
the patch was to give people with serious problems something to try now.

>  The recorders Pause 'unification' looks fairly meaningless.  Each of the 3
>  major types has completely different pausing mechanisms, so it's not
>  really unifying anything.
>  The idea is to get _rid_ of the usleeps & polling, not add more. =)
Consider it a work in progress. I'd like to have them all use an
unpauseWait like MpegRecorder, to eliminate the busy waiting in
the recorder loops. The only one which will still be different is
the NVR, and even that should be able to use the same WaitForPause()
method as the others.

This was simply the first draft which basically worked, it still does
some bad things, it's missing important pieces, etc. I'm going to get
rid of the usleep in TVRec::RunTV and in the DVBRecorder entirely. I'm
already not using the RingBuffer pausing at all... 

The whole tuning in RunTV is just busy waiting at the moment, but
I'm planning to use things like the signals from the SignalMonitor
to trigger trips through HandleTuning().



More information about the mythtv-dev mailing list