def getFrameHeader(self, type, keyframe, description = False, ref_time = 0): output = BytesOutput(True) if type == FRAME_TYPE_VIDEO: output.writeByte((0x27, 0x17)[keyframe]) output.writeByte((0x01, 0x00)[description]) output.writeInt24(ref_time) elif type == FRAME_TYPE_AUDIO: output.writeByte(0xAF) output.writeByte((0x01, 0x00)[description]) return output.getBytes()
def getFrameHeader(self, type, keyframe, description=False, ref_time=0): output = BytesOutput(True) if type == FRAME_TYPE_VIDEO: output.writeByte((0x27, 0x17)[keyframe]) output.writeByte((0x01, 0x00)[description]) output.writeInt24(ref_time) elif type == FRAME_TYPE_AUDIO: output.writeByte(0xAF) output.writeByte((0x01, 0x00)[description]) return output.getBytes()