How to support camera hot-plug via udev #140
-
I'm writing an app for controlling consumer cameras from a headless linux machine: I would like to support USB cameras hot-plug. The devised workflow shoud be as follows:
I know how to implement 2.–3. and I'm prototyping 4. in Python: so I'm in a situation in which I know the path name, and I have to construct a It seems to me that point 4. would be straightforward with access to the internal functions at python-gphoto2/src/gphoto2/port_info_list.i Lines 119 to 123 in b2b09c3 In particular I would use gp_port_info_new and gp_port_info_set_path to create the data structure to be fed to the set_port_info mehod of a gp.Camera instance.
But these functions are not accessible, so the only way to go I was able to find is to
I dislike this apporach, because it seems to me that the with the Am I missing something? Is this indeed the correct way to handle this problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I think this is how it should be done, but I'm just a libgphoto2 user, not its author. This is not really the place to ask questions about how libgphoto2 works. An important function of gp_abilities_list_load appears to be dynamically loading the camera drivers. I'm not sure where that would happen in your preferred way of doing things. |
Beta Was this translation helpful? Give feedback.
I think this is how it should be done, but I'm just a libgphoto2 user, not its author. This is not really the place to ask questions about how libgphoto2 works.
An important function of gp_abilities_list_load appears to be dynamically loading the camera drivers. I'm not sure where that would happen in your preferred way of doing things.