开发者

AVCaptureVideoOutput and compression

As of iOS 4.x, is AVCaptureVideoDataOutput configurable to return you compressed frames?

The documentation for AVCaptureVideoDataOutput says:

AVCaptureVideoDataOutput is a concrete sub-class of AVCaptureOutput you use, via its delegate, to process uncompressed frames from 开发者_StackOverflowthe video being captured, or to access compressed frames.

One of the properties is 'videoSettings' which according to the SDK, is the compression settings for the output and it says the compression setting keys can be found in AVVideoSettings.h. But it also says that only CVPixelBufferPixelFormatTypeKey is supported.

Based on this, can I assume that all of the frames returned by AVCaptureVideoDataOutput to the sampleBufferDelegate method is uncompressed? Is there a way to get to the compressed frames?


The current version of the SDK only returns uncompressed frames from the camera. Maybe it'll change in the future, but it's like this right now. Therefore, the only way to get compressed images is to do it yourself. How to do it depends on your needs.

If you need to write them on disk, it will be long and ineffective (a movie would be better). If you need to send compressed images OTA, it's doable with a jpeg or png library for example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜