'get the length in seconds, return -1 if this is not possible'

def get_length(self):

    end = self.get_endpos()
    if ((end == None) or (self.start == None)):
        return None
    if (self.start > end):
        return ((int((((long(1) << 33) - 1) / 90000)) - self.start) + end)
    return (end - self.start)
