(self)
return file_trunk, self.filetype, seg, offset, self.length
Play until a file header record is found.
Play until a file header record is found.
Play until a file header record is found .
def open_read(self):
        """Play until a file header record is found."""
        self.record_num = 0
        self.record_stream = io.BytesIO()
        self.buffer_complete = False
        self.bitstream.switch_mode('r')
        self.rwmode = 'r'
        while True:
            record = self._read_record(None)
            if record and record[0:1] == b'\xa5':
                break
            else:
                # unknown record type
                logging.debug('%s Skipped non-header record.', timestamp(self.bitstream.counter()))
        file_trunk, token, self.length, seg, offset = struct.unpack('<8sBHHH', record[1:16])
        try:
            self.filetype = TOKEN_TO_TYPE[token]
        except KeyError:
            logging.debug('Unknown file type token: %x', token)
        self.record_num = 0
        self.buffer_complete = False
        self.is_open = True
        return file_trunk, self.filetype, seg, offset, self.length
def open_read ( self ) : self . record_num = 0 self . record_stream = io . BytesIO ( ) self . buffer_complete = False self . bitstream . switch_mode ( 'r' ) self . rwmode = 'r' while True : record = self . _read_record ( None ) if record and record [ 0 : 1 ] == b'\xa5' : break else : # unknown record type logging . debug ( '%s Skipped non-header record.' , timestamp ( self . bitstream . counter ( ) ) ) file_trunk , token , self . length , seg , offset = struct . unpack ( '<8sBHHH' , record [ 1 : 16 ] ) try : self . filetype = TOKEN_TO_TYPE [ token ] except KeyError : logging . debug ( 'Unknown file type token: %x' , token ) self . record_num = 0 self . buffer_complete = False self . is_open = True return file_trunk , self . filetype , seg , offset , self . length