title: Getting all frames data from CMSampleBuffer
body: <p>i am converting all CMSampleBuffers. and send them to the server for server side rendering.  i am using this code before i send the data to the server .
  but it looks like ima not getting enough frames ( about 27 frames  for a 10 sec video ? should be around 30 frames a sec , at list ).</p>
  <p>what am i doing wrong ?is. it even possible to get the data from CMSampleBuffers ?</p>
  <pre><code>   func getDataFromCMSampleBuffer (sampleBuffer: CMSampleBuffer) -&gt; Data? {
      if CMSampleBufferDataIsReady (sampleBuffer),
         let pixelBuffer = CMSampleBufferGetImageBuffer (sampleBuffer) {
          let ciImage = CIImage (cvImageBuffer: pixelBuffer)
          let image = UIImage (ciImage: ciImage)
          return (image.jpegData (compressionQuality: 0.5)) // Error Thread 7: EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit = 50 MB, unused = 0x0)
      }
      return nil
  }
  </code></pre>