'read PTS (PES timestamp) at the buffer beginning (5 Bytes)'

def ReadPTS(self, buffer):

    high = ((ord(buffer[0]) & 15) >> 1)
    med = ((ord(buffer[1]) << 7) + (ord(buffer[2]) >> 1))
    low = ((ord(buffer[3]) << 7) + (ord(buffer[4]) >> 1))
    return ((((long(high) << 30) + (med << 15)) + low) / 90000)
