[Interest] video init duration

Tomasz Olszak olszak.tomasz at gmail.com
Sat Sep 15 20:43:09 CEST 2018


Have tried to wait until camera is in active status?

And why you set timer interval to 40 ms?

pt., 14 wrz 2018, 15:19 użytkownik "Alexander Carôt" <
alexander_carot at gmx.net> napisał:

> ... sorry, I forgot the subject line in my last post (fixed now):
>
> 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
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180915/fa9a43d0/attachment.html>


More information about the Interest mailing list