Beispiel #1
0
def parse_private_upid_SBSB(bites, upid_length):
    bitbin = BitBin(bites)
    return {
        "private_cni": hex(bitbin.asint(16)),
        "private_version": bitbin.asint(8),
        "private_transmission_id": struct.unpack("<Q", bitbin.asbites(64))[0],
        "private_product_code": struct.unpack("<Q", bitbin.asbites(64))[0],
        "private_web_publication_key": bitbin.astext(25 * 8),
    }
Beispiel #2
0
 def decode(self):
     """
     decode SCTE35 Dtmf Descriptor
     """
     bitbin = BitBin(self.bites)
     self.parse_id(bitbin)
     self.preroll = bitbin.asint(8)
     self.dtmf_count = d_c = bitbin.asint(3)
     bitbin.forward(5)
     while d_c:
         d_c -= 1
         self.dtmf_chars.append(bitbin.astext(8))