DVB-T (Digital Terrestrial TV) TunerTunes to the specified frequency, using the specified parameters, using a DVB tuner device; then outputs packets from the received MPEG transport stream as requested. Example UsageRecord entire received MPEG transport stream, from a particular frequency and set of tuning parameters to file: feparams = { "inversion" : dvb3.frontend.INVERSION_AUTO, "constellation" : dvb3.frontend.QAM_16, "code_rate_HP" : dvb3.frontend.FEC_3_4, "code_rate_LP" : dvb3.frontend.FEC_3_4, } Pipeline( OneShot( msg=["ADD", [0x2000] ] ), # send the msg ["ADD", [0x2000]] Tuner(537.833330, feparams), SimpleFileWriter("dump.ts"), ).run() Record just packets with packet ID (PID) 0 and 18: Pipeline( OneShot( msg=["ADD", [0, 18] ] ), Tuner(537833330.0, feparams), SimpleFileWriter("dump.ts"), ).run() How does it work?Tuner tunes, using the specified tuning parameters to a DVB-T transmitted multiplex. You can also specify which DVB tuner card (device) to use if there is more than one in your system. To start with it outputs nothing. To start or stop outputting packets, send messages to the "inbox" inbox of the form: [ "ADD", [pid, pid, ...] ] [ "REMOVE", [pid, pid, ...] ] These instruct Tuner to output packets from the received multiplex with the specified packet IDs (PIDs). Most DVB tuner devices understand a special packet ID of 0x2000 to request the entire transport stream of all packets with all IDs. This component will terminate if a shutdownMicroprocess or producerFinished message is sent to the "control" inbox. The message will be forwarded on out of the "signal" outbox just before termination. Tuning parametersThe tuning parameters come from the dvb3.frontend library. Specify them as a dictionary: { "bandwidth" : dvb3.frontend.BANDWIDTH_?_MHZ where ? is 6, 7 or 8 "constellation" : dvb3.frontend.QPSK, QAM_16 or QAM_64 "hierarchy_information" : dvb3.frontend.HIERARCHY_? where ? is NONE, 1, 2 or 4 "code_rate_HP" : dvb3.frontend.FEC_X_Y where X/Y = 1/2, 2/3, 3/4, 5/6, 7/8 "code_rate_LP" : dvb3.frontend.FEC_X_Y where X/Y = 1/2, 2/3, 3/4, 5/6, 7/8 "guard_interval" : dvb3.frontend.GUARD_INTERVAL_1_? where ? is 32, 16, 8 or 4 "transmission_mode" : dvb3.frontend.TRANSMISSION_MODE_?K where ? is 2 or 8 "inversion" : dvb3.frontend.INVERSION_AUTO } Kamaelia.Device.DVB.Tuner.Tunerclass Tuner(Axon.ThreadedComponent.threadedcomponent)Tuner(freq[,feparams][,card]) -> new Tuner component. Tunes the DVB-T card to the given frequency with the given parameters. Send (ADD, [PID list]) or (REMOVE, [PID list]) messages to its "inbox" inbox to cuase it to output MPEG transport stream packets (with the specified PIDs) from its "outbox" outbox. Keyword arguments:
Methods defined hereWarning! You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers. __init__(self, freq[, feparams][, card])x.__init__(...) initializes x; see x.__class__.__doc__ for signature addPID(self, pid)Adds the given PID to the transport stream that will be available in "/dev/dvb/adapter0/dvr0" notLocked(self)Returns True if the frontend is not yet locked. Returns False if it is locked. FeedbackGot a problem with the documentation? Something unclear that could be clearer? Want to help improve it? Constructive criticism is very welcome - especially if you can suggest a better rewording! Please leave you feedback here in reply to the documentation thread in the Kamaelia blog. -- Automatic documentation generator, 05 Jun 2009 at 03:01:38 UTC/GMT |
Kamaelia
is an open source project originated from and guided by BBC
Research. For more information browse the site or get in
contact.
This is an ongoing community based development site. As a result the contents of this page is the opinions of the contributors of the pages involved not the organisations involved. Specificially, this page may contain personal views which are not the views of the BBC. (the site is powered by a wiki engine)
(C) Copyright 2008 Kamaelia Contributors, including the British Broadcasting Corporation, All Rights Reserved.