Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] RFC - XML channel listings




Dave Chapman writes:
 > As far as I can tell, there is no standard format for storing lists of 
 > satellite channels, so I've been working on an XML-based solution.
 > 
 > I am working on two related formats - one to store the raw information on 
 > channels (i.e. satellite, transponder, frequency, polarity, vpid, apid) and 
 > another to represent how these are shown to the users - i.e. grouping and 
 > ordering of a subset of channels.
 > 
 > An example (listing one TV station with multiple audio streams) is:
 > 
 > <xmlsat>
 > <location id="0070">
 > <satellite name="Eutelsat W3" id="EUT0W3">
 > <transponder name="C9" freq="11387" pol="h" beam="KW">
 > <channel name="Euronews" pnr="4" sr="27500" fec="5/6" type="tv" ca="0">
 > <video pid="2221" />
 > <audio lang="fr" pid="2231" />
 > <audio lang="en" pid="2232" />
 > <audio lang="de" pid="2233" />
 > <audio lang="it" pid="2234" />
 > <audio lang="es" pid="2235" />
 > <audio lang="pt" pid="2236 />
 > <audio lang="en" pid="2237 />
 > </channel>
 > </transponder>
 > </satellite>
 > </location>
 > </xmlsat>
 > 
 > As you can tell the (strict) hierarchy of the elements is:
 > 
 > Location (orbital position)
 > Satellite
 > Transponder
 > Channel
 > Video/Audio pid(s)
 > 
 > I'm only concentrating on digital broadcasts, but the principle could be 
 > applied to analogue broadcasts if there was a reason to.  I've also chosen to 
 > use attributes instead of elements - it seems cleaner to me
 > 
 > The above example is not complete - other information could be stored, for 
 > example: the type of programming, the hours of broadcast for a channel, it's 
 > country of origin, a web address for listings etc.  The principle is that it 
 > stores information about broadcasts, not about your receiver's settings.

If you look at the sources of the libdvb in the dvb package and the
.dvbrc for gVideo and tuxzap you will see that we already have
approximately the same hirachical structure you propose. Maybe this
could be a template for the XML implementation. It would also make it
easier to include into the programs mentioned above. Please, have a
look at the C++ classes in devices.hh. If you could fit the XML
structures to those classes, it would be easy to substitute the
parser, we use for our list, with the XML routines.


 > 
 > I have written a filter (in awk) that processes the HTML files from 
 > www.satcodx.com into this format, and also a C parser (using libxml) that 
 > reads these files from disk to memory.  I'll release these under the GPL if 
 > anyone wants them.  

That would be great. 

 > 
 > Filters could easily be written to convert channel listings to/from any other 
 > format in common use.  The "pscan" program couldalso usefully be modified to 
 > output listings in this format. 

Yes, and if pscan uses it, than all the applications using the libdvb
would have/be able to use it.

 > 
 > The second issue is how to map this (huge) master list of channels into a 
 > user-defined list of channels in an application like VDR.   My initial 
 > thought is to use another XML file containing lists of channels (just the 
 > satellite and pnr for each channel) arranged into a set of hierarchical 
 > namedgroups, but this issue needs more thought.
 > 


In case of mapping programs list to the channel settings I currently
use a 64 bit number that contains the network id (16 bit), the sat
id (16 bit = orbital position), the transponder id (16 bit) and the
service id. This number should be unique to each channel and be
sufficient to identify it. Have a look at ntuxzap.cc for the way the
channels are identified using those numbers from the favorite lists.


 > Comments are welcome.  Am I wasting my time?

No, certainly not. We would have used XML, if we had known more about
it at the time we created the format. After we learned more about it,
we just didn't have the time to change it. The driver still has
priority, everything else is icing on the cake.

Marcus

---------------------------------------------------------------------
Dr. Marcus Metzler                             
mocm@netcologne.de                     http://www.metzlerbros.de
mocm@convergence.de                    http://www.convergence.de

Convergence Integrated Media GmbH          
Rosenthaler Str. 51                   
D-10178 Berlin                             
---------------------------------------------------------------------


--- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with unsubscribe as subject.



Home | Main Index | Thread Index