import dvb3.frontend 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, } demo = "Now and next" # demo="All schedule info" if demo == "Now and next": Pipeline( DVB_Multiplex(505833330.0 / 1000000.0, [EIT_PID], feparams), DVB_Demuxer({EIT_PID: ["outbox"]}), ReassemblePSITables(), ParseEventInformationTable_Subset( True, False, False, False), # now and next for this mux only SimplifyEIT(), NowNextProgrammeJunctionDetect(), NowNextServiceFilter(4164), ConsoleEchoer(), ).run() elif demo == "All schedule info": Pipeline( DVB_Multiplex(505833330.0 / 1000000.0, [EIT_PID], feparams), DVB_Demuxer({EIT_PID: ["outbox"]}), ReassemblePSITables(), ParseEventInformationTable_Subset(
yield 1 __kamaelia_components__ = (ParseProgramAssociationTable, ) if __name__ == "__main__": from Kamaelia.Chassis.Pipeline import Pipeline from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Device.DVB.Core import DVB_Multiplex, DVB_Demuxer from Kamaelia.Device.DVB.Parse.ReassemblePSITables import ReassemblePSITables from Kamaelia.Device.DVB.Parse.PrettifyTables import PrettifyProgramAssociationTable import dvb3.frontend 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( DVB_Multiplex(505833330.0 / 1000000.0, [PAT_PID], feparams), DVB_Demuxer({PAT_PID: ["outbox"]}), ReassemblePSITables(), ParseProgramAssociationTable(), PrettifyProgramAssociationTable(), ConsoleEchoer(), ).run()
from Kamaelia.Chassis.Graphline import Graphline from Kamaelia.Util.Console import ConsoleEchoer import dvb3.frontend 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, } Graphline( SOURCE=DVB_Multiplex(505833330.0 / 1000000.0, [18, 20, 600, 601], feparams), DEMUX=DVB_Demuxer({ 18: ["_EIT_"], 20: ["_DATETIME_"] }), EIT=Pipeline( PSIPacketReconstructor(), EITPacketParser(), NowNextServiceFilter(4164, 4228), # BBC ONE & BBC TWO NowNextChanges(), ConsoleEchoer(), ), DATETIME=Pipeline( PSIPacketReconstructor(), TimeAndDatePacketParser(), ConsoleEchoer(), ), linkages={ ("SOURCE", "outbox"): ("DEMUX", "inbox"),
"CBBC":4671, } print "-----STARTING MACRO----- time =",time.time() def repeatingFile(): def rfa_factory(_): return RateControlledFileReader("junction.ts",readmode="bytes",rate=18000000/8,chunksize=2048) return Graphline(CAROUSEL=Carousel(rfa_factory, make1stRequest=True), linkages = { ("CAROUSEL","requestNext") : ("CAROUSEL","next"), ("CAROUSEL","outbox") : ("self", "outbox"), ("CAROUSEL","signal") : ("self", "signal"), }, ) Graphline( SOURCE=DVB_Multiplex(freq, pids["BBC TWO"]+pids["EIT"], feparams), # BBC Channels + EIT data DEMUX=DVB_Demuxer({ 610: ["BBCTWO"], 611: ["BBCTWO"], 18: ["BBCTWO"], # BBCONE","BBCONE_2","BBCTWO","BBCTWO_2", "CBEEBIES" }), BBCTWO_HI = ChannelTranscoder(service_ids["BBC TWO"], **params["HI"]), linkages={ ("SOURCE", "outbox"):("DEMUX","inbox"), ("DEMUX", "BBCTWO"): ("BBCTWO_HI", "inbox"), } ).run() # RELEASE: MH, MPS
yield 1 __kamaelia_components__ = ( ParseTimeAndDateTable, ) if __name__ == "__main__": from Kamaelia.Chassis.Pipeline import Pipeline from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Device.DVB.Core import DVB_Multiplex, DVB_Demuxer from Kamaelia.Device.DVB.Parse.ReassemblePSITables import ReassemblePSITables from Kamaelia.Device.DVB.Parse.PrettifyTables import PrettifyTimeAndDateTable import dvb3.frontend 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( DVB_Multiplex(505833330.0/1000000.0, [0x2000], feparams), DVB_Demuxer({ TDT_PID:["outbox"]}), ReassemblePSITables(), ParseTimeAndDateTable(), PrettifyTimeAndDateTable(), ConsoleEchoer(), ).run()
ParseNetworkInformationTable_OtherNetwork, ParseNetworkInformationTable_ActualAndOtherNetwork, ) if __name__ == "__main__": from Kamaelia.Chassis.Pipeline import Pipeline from Kamaelia.Util.Console import ConsoleEchoer from Kamaelia.Device.DVB.Core import DVB_Multiplex, DVB_Demuxer from Kamaelia.Device.DVB.Parse.ReassemblePSITables import ReassemblePSITables from Kamaelia.Device.DVB.Parse.PrettifyTables import PrettifyNetworkInformationTable import dvb3.frontend 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( DVB_Multiplex(505833330.0 / 1000000.0, [NIT_PID], feparams), DVB_Demuxer({NIT_PID: ["outbox"]}), ReassemblePSITables(), ParseNetworkInformationTable_ActualNetwork(), ConsoleEchoer(forwarder=True), PrettifyNetworkInformationTable(), ConsoleEchoer(), ).run()
title, lcn) lines.append(line) if len(lines): self.send("\n".join(lines) + "\n", "outbox") def formatDateTime(self, dt): tz = "+00:00" return dt.strftime("%Y-%m-%dT%H:%M:%S") + tz SYSTEM = Graphline(SHUTDOWN=WatchdogTimer(timeout=MAX_RUNTIME), WATCHDOG=WatchdogTimer(timeout=NOMORE_DATA_THRESHOLD), RECVR=DVB_Multiplex(freqHz / 1000000.0, [17, 18], feparams), DEMUX=DVB_Demuxer({ 18: ["eit"], 17: ["sdt"] }), EIT=Pipeline( ReassemblePSITables(), ParseEventInformationTable_Subset( actual_presentFollowing=False, actual_schedule=True, other_schedule=True), ), SDT=Pipeline( ReassemblePSITables(), ParseServiceDescriptionTable_ActualAndOtherTS(), ), COMBINER=Consolidator(), SPLIT=TwoWaySplitter(), OUTPUT=ConsoleEchoer(),
# limitations under the License. # from Kamaelia.Device.DVB.Core import DVB_Demuxer from Kamaelia.File.ReadFileAdaptor import ReadFileAdaptor from Kamaelia.Chassis.Graphline import Graphline from Kamaelia.File.Writing import SimpleFileWriter Graphline( SOURCE=ReadFileAdaptor("BBC_MUX_1.ts"), DEMUX=DVB_Demuxer({ 640: ["NEWS24"], 641: ["NEWS24"], 600: ["BBCONE"], 601: ["BBCONE"], 610: ["BBCTWO"], 611: ["BBCTWO"], 620: ["CBBC"], 621: ["CBBC"], 18: ["NEWS24", "BBCONE"], # "BBCTWO", "CBBC"], }), NEWS24=SimpleFileWriter("news24.data"), BBCONE=SimpleFileWriter("bbcone.data"), BBCTWO=SimpleFileWriter("bbctwo.data"), CBBC=SimpleFileWriter("cbbc.data"), linkages={ ("SOURCE", "outbox"): ("DEMUX", "inbox"), ("DEMUX", "NEWS24"): ("NEWS24", "inbox"), ("DEMUX", "BBCONE"): ("BBCONE", "inbox"), ("DEMUX", "BBCTWO"): ("BBCTWO", "inbox"), ("DEMUX", "CBBC"): ("CBBC", "inbox"),