Skip to content

Instantly share code, notes, and snippets.

@takuya-i
Created July 3, 2015 06:54
Show Gist options
  • Save takuya-i/1e684dbce19dfff5b414 to your computer and use it in GitHub Desktop.
Save takuya-i/1e684dbce19dfff5b414 to your computer and use it in GitHub Desktop.
GPUImageVideoCameraにセットされたsessionのサイズの取得(Swift版) ref: http://qiita.com/takuya-i/items/84dd0c8d202eff4104a8
//VideoCameraはGPUIMageVideoCameraのインスタンス
let output = videoCamera.captureSession.outputs[self.videoCamera.captureSession.outputs.endIndex - 1] as! AVCaptureVideoDataOutput
let setting:NSDictionary = output.videoSettings
let width = (setting["Width"] as! NSNumber).longValue
let height = (setting["Height"] as! NSNumber).longValue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment