Unsolved How to set a configuration specific to a certain USB camera?
-
Hi,
Not all backends provide all the controls. You have to check whether Direct Show provides the ones you want.
Or do you have some API for the camera you are using ?
-
@SGaist Yes, the cameras have an API, which I need to use. Like switching the image transfer mode from RAW to compressed, or do some adjusting during zoom and so on. I know for sure, that the cameras work. They are already used this way with the old main application (written in C#).
After some additional Qt source browsing, I've got the impression that adding additional QMediaControl functionality is impossible without altering the existing driver (read patching the Qt source code).
Under Windows the relevant part is buried inside private member m_session (holding a DSCameraSession *) of DSCameraService. DSCameraService itself is only a wrapper which returns different control objects. ... To be honest, I don't get the advantage of this design decision at all. Why this paranoid hiding/encapsulation without the possibility to add custom control(s)?Probably it is the best way to simply get rid of this and do it all manually without the hassle of the multimedia stack.
-
It's not paranoïa.
AFAIK, the design of QtMultimedia stack is to provide a common wrapper to access the platform specific multimedia API in a uniform manner while, at the same time, it provides you the means to also implement your own plugins if you have something custom like it seems you do.
If your camera provider gives you all the means to access configuration options, video streams and what not, then I'd recommend implementing your own QCamera backend.
-
@SGaist You are right about this. I hoped to prevent the complete re implementation of my one camera driver only to add some configuration switches.
Is there a tutorial/documentation about implementing a qt service provider (which is the camera driver?). The qt documentation itself is ... a little to compact about this topic.
-
Never mind. For now, we decided to ignore the multimedia stack and implement the camera driver more directly. Maybe a qt integration comes later.
Thanks for all your help.
-
No there's not.
I've based the various backend I wrote on the existing ones which basically makes the plugin a "wrapper" to use the various SDK needed.
-
@SGaist That was the idea I started with in the first place. But the device access is hidden inside the privat section of the platform depended implementation. As far as I understood the qt source code.
How do re use this part and still get access to the hardware and be able to do custom configuration?
-
What do you mean by "device access" ?
As for writing a QCamera backend plugin, you don't have to use any private classes.
-
I tried to find a way to use the available backend(s) (platform plugins/service provider) and only add a custom device control. The majority of the camera backend functionality simply works for me and is usable. It is only missing some configuration options.
But I simply couldn't find a way to add such a custom device control without altering the qt source code itself (or I'm greatly missing something). What I meant with "device access hidden in side the private section". -
Ok, indeed, if you want to extend one of the plugin you have to modify Qt's sources, but you can limit that to the plugin itself without have to rebuild all of Qt.