In CoreVideo and CoreMedia for iOS apps, what determines the dimension of the video sample buffer?

122 Views Asked by At

I am building an iOS app (XCode 12.3, iPhone 12pro), and using the AVCaptureVideoDataOutputSampleBufferDelegate I run the captureOutput function which gives me a sampleBuffer: CMSampleBuffer. I inspect the dimensions using CMSampleBufferGetFormatDescription(sampleBuffer) and it comes out to: dimensions: 1504 x 1128.

How are these dimensions determined? I'm simply confused because they don't seem to correspond to either the view size or any camera dimensions (like 720p or 1080p, see specs) I've seen documented. I have looked at Apple's CoreMedia documentation and could not find this information. I'm new to CoreMedia, so I might be missing something basic about how this framework is designed.

0

There are 0 best solutions below