[Interest] Problem with QCameraImageCapture

Lopes Yoann Yoann.Lopes at theqtcompany.com
Tue Apr 7 17:23:20 CEST 2015


Hi,

Capturing to buffer is not currently supported on Windows, that’s why the signal is never emitted.

—
Yoann

> On 06 Apr 2015, at 18:30, Igor Mironchik <igor.mironchik at gmail.com> wrote:
> 
> Hi, Bob.
> 
> Thank you.
> 
> On Mon, 06 Apr 2015 18:21:38 +0300, Bob Hood <bhood2 at comcast.net> wrote:
> 
>> Hi, Igor.
>> 
>> I tested your example code using Qt 5.4.0 under Windows 7 64-bit and the  
>> 2MP
>> USB camera embedded on my ASUS monitor, and I'm getting the callbacks as  
>> I
>> expect.  I captured and stored to disc the preview image provided by the
>> QCameraImageCapture::imageCaptured() signal.
>> 
>> Although I had them connected, I did not get the imageAvailable() or  
>> error()
>> signal that you mention, though.  I assume I didn't get the latter signal
>> because there was no error in the capture.  As for why I didn't get
>> imageAvailable(), I couldn't say.
>> 
>> 
>> On 4/6/2015 2:40 AM, Igor Mironchik wrote:
>>> Hi.
>>> 
>>> I've checked it on two different cameras. The problem is not gone.
>>> 
>>> I'm on Windows 7 64 bit, Qt 5.4.1 from online installer.
>>> 
>>> 
>>> On Mon, 06 Apr 2015 10:20:51 +0300, Igor Mironchik
>>> <igor.mironchik at gmail.com> wrote:
>>> 
>>>> Hi.
>>>> 
>>>> I have one problem QCameraImageCapture doesn't emits signals. What is
>>>> the problem?
>>>> 
>>>> d->camera = new QCamera(
>>>> AppCfg::instance().cfg().cameraName().toLatin1(),
>>>> 	this );
>>>> d->camera->setCaptureMode( QCamera::CaptureStillImage );
>>>> d->camera->start();
>>>> 
>>>> connect( d->camera, &QCamera::locked,
>>>> 	this, &CameraScreen::cameraLocked );
>>>> 
>>>> d->capture = new QCameraImageCapture( d->camera, this );
>>>> d->capture->setCaptureDestination( QCameraImageCapture::CaptureToBuffer
>>>> );
>>>> 
>>>> connect( d->capture, &QCameraImageCapture::imageAvailable,
>>>> 	this, &CameraScreen::imageAvailable );
>>>> 
>>>> void ( QCameraImageCapture::*signal )( int, QCameraImageCapture::Error,
>>>> 	const QString & ) = &QCameraImageCapture::error;
>>>> 
>>>> connect( d->capture, signal,
>>>> 	this, &CameraScreen::error );
>>>> 
>>>> d->camera->searchAndLock();
>>>> 
>>>> ---------------------------------------------
>>>> 
>>>> void
>>>> CameraScreen::cameraLocked()
>>>> {
>>>> 	d->capture->capture();
>>>> 
>>>> 	d->camera->unlock();
>>>> }
>>>> 
>>>> But I don't receive nor imageAvailable() nor error() signals...
>>>> 
>>> 
>> 
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> 
> 
> -- 
> Best Regards,
> Igor Mironchik.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest



More information about the Interest mailing list