
Originally Posted by
konstantint
OK, I think I have figured things out now. Thanks a lot guys. Here's the summary.
* Although I don't know a thing about gstreamer, I browsed around the code and got the idea that, in theory, using VideoEncoderControl to change camera resolution is indeed the right thing to do. I think that was what gnuton was trying to tell me.
* In my case I was getting a mingled picture because I was providing an unsupported resolution.
* To check for supported resolutions, I need to use videoEncoderControl.supportedResolutions(), yet the problem is that, if this method is called too early, it returns a confusing empty list.
* After playing around with all the possible QCamera signals and other places, I finally found a spot where supportedResolutions() did start to respond - the start() method of MyVideoSurface.
* This is somehow ironic that you need to set a correct resolution before you can start to receive video, but you will only get to know which are supported resolutions after you have started to receive video. Hence, for future reference of whoever comes to this thread, here are the resolutions for N950 back camera as reported by supportedResolutions().
QSize(252, 188), QSize(320, 240), QSize(352, 288), QSize(640, 480), QSize(848, 480), QSize(854, 480), QSize(1280, 720).
Most of those work fine, but not all. Attempting to use the first resolution leads to "CameraBin error: could not negotiate format".
Now here's the last, less important but perhaps an easy-to-answer question. Do I understand correctly, that if I really want to get a 8MP image I must use QCameraImageCaptureControl with its capture(filename) method and then read in the resulting file manually? Is there a shortcut, where I do not have to do the "save file - load file" procedure and the camera would write to some memory buffer directly?
Thanks!