title: Knowing resolution of AVCaptureSession's session presets
body: <p>I'm accessing the camera in iOS and using session presets as so:</p>
  
  <pre><code>captureSession.sessionPreset = AVCaptureSessionPresetMedium;
  </code></pre>
  
  <p>Pretty standard stuff. However, I'd like to know ahead of time the resolution of the video I'll be getting due to this preset (especially because depending on the device it'll be different). I know there are tables online you can look this up (such as here: <a href="http://cmgresearch.blogspot.com/2010/10/augmented-reality-on-iphone-with-ios40.html">http://cmgresearch.blogspot.com/2010/10/augmented-reality-on-iphone-with-ios40.html</a> ). But I'd like to be able to get this programmatically so that I'm not just relying on magic numbers.</p>
  
  <p>So, something like this (theoretically):</p>
  
  <pre><code>[captureSession resolutionForPreset:AVCaptureSessionPresetMedium];
  </code></pre>
  
  <p>which might return a CGSize of { width: 360, height: 480}. I have not been able to find any such API, so far I've had to resort to waiting to get my first captured image and querying it then (which for other reasons in my program flow is not good).</p>