Added rotation support to frame-callback