Unsolved Snap Picture Not Working
-
-
My code set that value already. You can see it in the last function definition 'on_SnapButton_clicked()'
-
Actually, inspired by your post, I looked at isCaptureDestinationSupported. Apparently a buffer is not supported... Does anyone know why this could be?
-
Did you try connecting the imageCaptured signal (forgive the old syntax) ?
connect(m_pImageCapture, SIGNAL(imageCaptured(int,QImage)), this, SLOT(processCapturedImage(int,QImage)));
Then the slot:
void xxxxx::processCapturedImage(int requestId, const QImage& img)You can extract from the QImage passed to the slot.
-
Since you want to send it to a REST service, why not exploit the fact that having that temporary file allows you to retry a failed upload without clogging the memory used by your application. You can delete the file once you're done with it.
-
I looked into using the QImage, but I would either have to convert it to a QVideoFrame (and I couldn't find how), or perform a tedious manual conversion. I'd rather find out why the buffer option isn't supported and fix it rather than hack my way around. I'm going to try on my Linux machine with a spare webacam I found and see if that works.
@SGaist
I don't see why a temporary image would fare better than a buffer. I would have to read the file and re-fill my buffer if it fails, resulting in more time lost. -
Apparently it works on Linux but not Windows. Anybody have some insight as to why?
-
Because the windows platform camera plugin doesn't implement that option.
-
Is there a file I can download that implements it for Windows, or is this a problem of QT having to get around to it?
-
If there was, it would be part of the plugin. See the DSCameraSession class.