[Interest] video init duration

"Alexander CarĂ´t" alexander_carot at gmx.net
Tue Oct 2 09:11:36 CEST 2018


Hello Tomasz and all,

sorry for the late response - needed to figure several things first.

>>Have tried to wait until camera is in active status?

Yes, this is the case. Not that I consciously did that but the cam de facto is in active state.

>>And why you set timer interval to 40 ms?

Assuming a frame rate of 25 fps the capture interval is 40 ms.

In the meantime I figured that this 

Please find a minimal example app here, which shows my problem decribed below. It works fine on Linux, Windows and also Windows in a virtual Box on OSX but on native OSX I have this delay of 35 seconds until the sytems works:

https://www.dropbox.com/s/u6ifh6enco012xk/myCamera.zip?dl=0

Thanks,
best

Alex

--
http://www.carot.de
Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797


> Hi all,
>
> I have a video related app, which works fine but it takes 35 seconds after
> initialization for the cam to work in single-capture modus. The code looks
> like this:
>
> Camera::Camera() : ui(new Ui::Camera){
>     ui->setupUi(this);
>
>     QCameraViewfinderSettings cameraSettings;
>     cameraSettings.setMinimumFrameRate(25);
>
>     camera = new QCamera( QCameraInfo::defaultCamera() );
>     imageCapture = new QCameraImageCapture(camera);
>
>     this->connect(imageCapture, &QCameraImageCapture::imageCaptured, this,
> &Camera::imageCaptured);
>
>     camera->setViewfinder(ui->viewfinder);
>
>     captureTimer = new QTimer(this);
>     captureTimer->setInterval(40);
>     connect(captureTimer, SIGNAL(timeout()), this, SLOT(takePicture()));
>     captureTimer->start();
>
>     camera->start();
> }
>
> void Camera::imageCaptured(){
>     cout << "IMAGE PROCESSED" << endl; /// THIS IS TRIGGERED THE FIRST
> TIME AFTER 35 SECONDS
> }
>
> void Camera::takePicture(){
>     imageCapture->capture();
> }
>
> This happens on OSX with the default inbuilt cam. I have not tested it on
> other OSes yet but is there way to speed this time up or is it even a bug I
> am having here ?
>
> Thanks in advance,
> best
>
> Alex
>
>
>
> --
> http://www.carot.de
> Email : Alexander at Carot.de
> Tel.: +49 (0)177 5719797
> _______________________________________________



More information about the Interest mailing list