Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to stop qml camera and free ressource correctly?



  • Hello,

    I am using qml camera and videoOutput to view live streams of multiple usb webcams.
    I start the cameras one by one. I do not use multiple cameras at the same time.

    Now I recognized that after stopping a camera via the stop() method of qml camera, that the resource, e.g. /dev/video0, in Raspbian is still in use.

    lsof /dev/video0
    COMMAND  PID   USER   FD    TYPE  DEVICE SIZE/OFF NODE NAME
    app      901   pi     33u   CHR   81,1   0t0      9580 /dev/video0
    
    

    What do I have to do in my application to free this device completey? Is the stop() method of the qml camera not sufficient?

    Kind regards,
    MHermann


Log in to reply