[mythtv] [experimental patches] check signal ui

Daniel Thor Kristjansson danielk at mrl.nyu.edu
Mon Jan 24 15:19:52 EST 2005


There were some requests for a signal quality ui in the past. I've 
implemented a first pass at this and have broken it down into 5 small 
patches. The user visible functionality is that if the signal is not 
strong a dialog showing the current channel and signal measurement pops 
up with two buttons: return to main menu, and change channel.

If the signal improves to the configured threshold we teardown this
dialog and start the recorder, and if the user selects one of the 
buttons we either return to the main menu or select the next channel, 
resp.

On the backend...
   The measurementdialog patch ads a couple functions to
   MythProgressDialog, and creates a MeasurementDialog
   that is basically a full screen version of the progress
   dialog that you can add buttons to.

   The channel-getsignal+isopen patch adds two functions
   to the Channel objects: GetSignal() and IsOpen(). GetSignal
   tells us the current signal value (0..100 or negative for
   error), and the values signalThresholdWait and signalThreshold.
   I've also simplified the internal implementation, and rewritten
   the queries for signalThresholdWait and signalThreshold in
   channel.cpp so they only happen once per channel instance.
   IsOpen() just tells us if the channel object is already open,
   this is used by the next patch.

   tvrec-getsignal patch adds two functions to TVRec, GetSignal() and
   IsSignalGood(). This patch depends on the channel-getsignal+isopen
   patch for the ChannelBase::GetSignal() method. The GetSignal() in
   the tv recorder enables the next patch, while IsSignalGood()
   simplifies checking the signal value in HandleStateChange when
   we want to start a recording. I've also made two small changes
   to tv_rec.cpp: first, if we abort a recording while starting it
   and have a channel object, I call ChannelBase::ChannelUp() this
   is so that people do never need an external program to unstick
   MythTV from a bad channel; second, change channel object
   initialization for HDTV, in this case I simply set the channel
   format to ATSC, instead of the default format, since a format other
   than ATSC is always wrong no matter how the card is configured.

   GET_SIGNAL patch adds GET_SIGNAL to the myth protocol so that
   tv_play can query the recorder for the signal. This depends on
   the tvrec-getsignal patch for TVRec::GetSignal().

   Finally, the checksignal patch subclasses MeasurementDialog
   with SignalDialog, which has an exec that queries the recorder
   for the current signal value.

There are a couple problems I'd like to address
before this patch is ready for cvs...

   rename MeasurementDialog -> MythMeasurementDialog

   move SignalDialog class to some place where it makes sense

   is it ok to have GET_SIGNAL return three values?
     I could break it up into
       GET_SIGNAL, GET_SIGNAL_THRESHOLD, GET_SIGNAL_THRESHOLD_TIMEOUT
     The reason we don't just query the database is because dvb and
     pcHDTV might wish to use a different timeout and threshold and
     the channel would know about this.

   style, is "func(int& x)" or "func(int &x)" official myth style?

   should we let the user choose a channel, or is ChannelUp() ok?

-- Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: measurementdialog-v1.patch.bz2
Type: application/octet-stream
Size: 1941 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050124/4a02d127/measurementdialog-v1.patch.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: channel-getsignal+isopen-v1.patch.bz2
Type: application/octet-stream
Size: 1985 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050124/4a02d127/channel-getsignalisopen-v1.patch.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tvrec-getsignal-v1.patch.bz2
Type: application/octet-stream
Size: 1728 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050124/4a02d127/tvrec-getsignal-v1.patch.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GET_SIGNAL-v1.patch.bz2
Type: application/octet-stream
Size: 1528 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050124/4a02d127/GET_SIGNAL-v1.patch.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checksignal-v1.patch.bz2
Type: application/octet-stream
Size: 1404 bytes
Desc: 
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050124/4a02d127/checksignal-v1.patch.obj


More information about the mythtv-dev mailing list