[mythtv] Looking for developers familiar with channel scanning and diseqc code

Daniel Kristjansson danielk at cuymedia.net
Sat Jul 4 13:32:20 UTC 2009

On Fri, 2009-07-03 at 22:31 +0100, Peter Brouwer wrote:
> I am looking for developers who can help me understand the bigger
> picture of the channels scanning and diseqc code for DVB receivers.
> So far it seems quite complex. What I would like to to is add
> functionality to import the so called satellite.xml file. This file
> contains a schema listing the known frequencies for the specified
> satellites in the file. The file is commonly used by DVB satellite
> receivers running on some form of embedded Linux.
> There are various tools around that generate an satellite.xml file
> from well know sat web pages like lynsat or kingofsats.
> Those tools make it very easy to keep on up to date list of known
> frequencies of sats of your choice.
> So being able to import such a file in myth would make the whole
> channel scanning process much easier.

Start by looking at the channel scanning code in head and the
channels.conf import. It should be fairly easy to import an
xml file instead. You obviously do not need to implement the
import the same way, but just output it in the same format
to the next stage of the scanner. In head the import is 
separate from insertion into the DB so that should make this

> I also am having problems getting myth to use my rotor using the Usals
> config option.  mythtv-setup works fine, it positins the rotor to the
> correct sat when channel for channels . Zapping channels via the
> frontend does not work, i.e. the rotor always stays at the position I
> lastly used during a channels scan fom mythtv-setup.
> The logic and implementation seems hideous complex. Needing to define
> a source for each new sat in the setup phase.

You just need to define a "Video Source" for each rotor position then
it will work. A patch to store the position in the dtv_multiplex table
and use that instead of the source table would be welcome. None of the
regular devs use a rotor in their normal setup so this code is a bit
of a step-child developed by third parties.

> So I am looking for some help and guidance to understand this
> functionality/architecture and code implementation in myth , before
> starting to make changes in it.

The code is of course your best guide. First look at DVBChannel,
DVBSignalMonitor and TVRec to see how normal rotor tuning works.
Then figuring out the channel scanner should be easy. Make sure
you look at trunk for the channel scanner, it has changed quite
a bit since 0.21 and the UI is also being rewritten. But it's the
architecture of the rotor stuff which is keeping the UI for that
setup complex, so that is not on my TODO for the UI reworking.
But if you want to work on simplifying that we will review and
hopefully be able to apply those patches.

-- Daniel

More information about the mythtv-dev mailing list