AravisProject / aravis

A vision library for genicam based cameras
GNU Lesser General Public License v2.1
913 stars 337 forks source link

Add option to load additional XML for a camera #733

Open Dennis10231 opened 2 years ago

Dennis10231 commented 2 years ago

Is your feature request related to a problem? Please describe. It would be nice to be able to load an additional GenICam XML file. This could be used to enhance the camera's own GenICam XML with additional nodes.

Describe the solution you'd like Right now, arv_gc_new() is the only function to accept xml input. Either add a new function to load a new, additional GenICam xml, merge it with the cameras XML or allow arv_gc_new() to use two XML inputs. Result: arv_gc_get_node() will return the node, not matter if it comes from the camera or not.

A cheap "hack" would be to simply append the new nodes at the end. A proper merge would allow you to extend nodes, e.g. appending a setting to "Image Format Controls".

It is possible to use XSLT for this, see: http://web.archive.org/web/20160809092524/http://www2.informatik.hu-berlin.de/~obecker/XSLT/#merge

EmmanuelP commented 2 years ago

We have something like that in Aravis, only used in GvDevice, and with no user API yet.

https://github.com/AravisProject/aravis/blob/0df6d6aa9eb54454ac821c8db5e58a02a5e5f2a4/src/arvgvdevice.c#L1310-L1348

A properly designed user API would be interesting.