Using QCamera WITHOUT Viewfinder
-
Alright, so I can update this later with code snippets, etc. if needed, but I'm hoping by describing the issues someone may have an idea of what I am doing wrong and so far searching for the solution many, many times hasn't yielded an answer.
I have a program I am trying to write on a very basic older raspberry pi that won't even have a monitor connected in normal use and that will take pictures WITHOUT anyone needing to see the image beforehand. I have been trying to get it to use a QCamera object to take a single still image at a time. I've been trying to modify the https://doc.qt.io/qt-5/qtmultimedia-multimediawidgets-camera-example.html Camera example and reading the documentation at https://doc.qt.io/qt-5/cameraoverview.html and getting nowhere.
The QT5 camera example works perfectly in everyway. What I need is for the camera to stay on the way it does in the example, so that the hardware automatically focuses as scenery changes, and just take a picture every X seconds. I don't need a visible widget viewfinder. I just want to be able to take still images every X seconds, while leaving the camera technically on so that the hardware within the camera can constantly adjust focus, etc. while it just pauses to save an image when told to.
Basically, just like in the QT5 camera example I just want the camera to sit there, reading image data, until it gets a function call, (rather than a mouse click) to take an image, and then go back to just sitting there ready for images, without actually displaying anything. I don't know why, but I can't figure out how to get that to work. I've gotten it to the point where it checks for a camera, even get a message along the lines of "Starting C920 with no viewfinder" or something very similar (not at main computer), but the lights never turn on and it never takes any images.
-
N Nhan Nguyen moved this topic from General and Desktop on
-
This definitely looks like a usecase that we should support in Qt Multimedia. Can you check if you are still experiencing this issue, and if you are, could you file a bugreport on bugreports.qt.io? Please include the platform you are using, the Qt version, as well as the media backend you are using (FFmpeg vs. native)