[Interest] camera APIs -- intended usage

Tyler Daniel tyler at rosette-research.com
Tue Nov 22 02:29:44 CET 2016


Hi all, I recently posted this in the forums, where it was suggested that I ask my questions here.  Sorry if this is a duplicate for someone.

I'm building an iOS camera app and need the viewfinder/preview frames in c++-land. I also need full-resolution still images when a capture button is pressed.

I can subclass QAbstractSurface and use QCamera::setViewfinder() to get frames. The problem is that the frames I get for the preview are the same resolution as the still images. I'm testing on an iPhone 5, so I either get 3264 or 1920, let's say 3k or 2k.

I'm using QCamera and QCameraImageCapture in c++ code.

If I use QCameraImageCapture::setEncodingSettings with 3k and QCamera::setViewfinderSettings with 2k, I get 3k preview frames and 3k still images.

I would have thought that the viewfinder api affects the viewfinder resolution and the camera image capture affects a separate still image capture resolution. But this is not the behavior I'm seeing.

Each of these classes are documented in the doxygen sense, but intended usage and how they work together is not.  The closest I can find is the detailed description of QCameraImageCapture, which provides a nice code snippet, but… resolution problems.

Pretty much all smartphones and digital cameras show a lower-resolution preview and capture stills at a higher resolution.

My question is how to achieve this with iOS? What should work? How do I get 2k preview frames in c++ and 3k still captures?

I’ve looked at the example apps.  They work on iOS in the sense that they don't crash, but they exhibit the same behavior with previews and stills at the same resolution. 

I’m currently working with 5.7 and 5.8 beta, but honestly I’ve had problems with the camera apis for years now.  On Android I hacked something that worked with QVideoProbe, but only for Android.  On iOS I gave up and went native.  Never found a solution that worked for more than one platform.


Any help would be most appreciated!

Tyler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161122/1f5dae86/attachment.html>


More information about the Interest mailing list