Beispiel #1
0
 def __init__(self):
     gr.top_block.__init__(self)
     src = gr.file_source(1, "logfrm.dat", False)
     cifsz = 55296
     start_addr = 504
     subchsz = 72
     optprot = 2
     I = 32 * 6 * subchsz / 6
     len_logfrm = I / 8
     subchidx = len_logfrm / 24
     sync = dabp.super_frame_sync(len_logfrm)
     rs = dabp.super_frame_rsdec(subchidx)
     #dst = dabp.super_frame_sink(subchidx,"test123.aac")
     dst = dabp.super_frame_sink(subchidx, "-")
     self.connect(src, sync, rs, dst)
Beispiel #2
0
 def __init__ (self):
     gr.top_block.__init__(self)
     src = gr.file_source (1,"logfrm.dat",False)
     cifsz=55296
     start_addr=504
     subchsz=72
     optprot=2
     I=32*6*subchsz/6
     len_logfrm=I/8
     subchidx=len_logfrm/24
     sync = dabp.super_frame_sync(len_logfrm)
     rs = dabp.super_frame_rsdec(subchidx)
     #dst = dabp.super_frame_sink(subchidx,"test123.aac")
     dst = dabp.super_frame_sink(subchidx,"-")
     self.connect (src, sync, rs, dst)
Beispiel #3
0
    def __init__(self, argv):
        gr.top_block.__init__(self)
        try:
            opts, args = getopt.getopt(argv, "f:", ["infile="])
        except getopt.GetoptError:
            print "please specify input file name using -f or --infile ..."
            sys.exit(2)
        for opt, arg in opts:
            if opt in ("-f", "--infile"):
                infile = arg
        try:
            src = gr.file_source(8, infile, False)
        except NameError:
            print "please specify input file name using -f or --infile ..."
            sys.exit(2)
        cifsz = 55296
        start_addr = 0  #36 #72 #108 #144 #240 #288 #336 #384 #432 #504 #576
        subchsz = 36  #36 #36 #36 #48 #48 #48 #48 #48 #72 #72 #24
        optprot = 2
        #I=32*6*subchsz/6
        #len_logfrm=I/8
        #subchidx=len_logfrm/24

        thr = gr.throttle(8, cifsz * 4 / 0.096)  # 4 CIFs / DAB frame (96 ms)
        d2f = dabp.d2f()
        scs = dabp.subchannel_selector(cifsz, start_addr, subchsz)
        intlv = dabp.time_deinterleaver(subchsz)
        punc = dabp.depuncturer(subchsz, optprot)
        I = punc.getI()
        vit = dabp.vitdec(I)
        scram = dabp.scrambler(I)
        len_logfrm = scram.get_nbytes()
        sync = dabp.super_frame_sync(len_logfrm)
        subchidx = sync.get_subchidx()
        rs = dabp.super_frame_rsdec(subchidx)
        dst = dabp.super_frame_sink(subchidx, "-")
        self.connect(src, thr, d2f, scs, intlv, punc, vit, scram, sync, rs,
                     dst)
Beispiel #4
0
 def __init__ (self, argv):
     gr.top_block.__init__(self)
     try:
         opts, args = getopt.getopt(argv, "f:",["infile="])
     except getopt.GetoptError:
         print "please specify input file name using -f or --infile ..."
         sys.exit(2)
     for opt, arg in opts:
         if opt in ("-f","--infile"):
             infile=arg
     try:
         src = gr.file_source (8,infile,False)
     except NameError:
         print "please specify input file name using -f or --infile ..."
         sys.exit(2)
     cifsz=55296
     start_addr=0 #36 #72 #108 #144 #240 #288 #336 #384 #432 #504 #576
     subchsz=36 #36 #36 #36 #48 #48 #48 #48 #48 #72 #72 #24
     optprot=2
     #I=32*6*subchsz/6
     #len_logfrm=I/8
     #subchidx=len_logfrm/24
     
     thr = gr.throttle(8,cifsz*4/0.096) # 4 CIFs / DAB frame (96 ms)
     d2f = dabp.d2f ()
     scs = dabp.subchannel_selector(cifsz,start_addr,subchsz)
     intlv = dabp.time_deinterleaver(subchsz)
     punc = dabp.depuncturer(subchsz,optprot)
     I = punc.getI()
     vit = dabp.vitdec(I)
     scram = dabp.scrambler(I)
     len_logfrm=scram.get_nbytes()
     sync = dabp.super_frame_sync(len_logfrm)
     subchidx = sync.get_subchidx()
     rs = dabp.super_frame_rsdec(subchidx)
     dst = dabp.super_frame_sink(subchidx,"-")
     self.connect (src, thr, d2f, scs, intlv, punc, vit, scram, sync, rs, dst)