[aravis/dom] gc_feature_node: don't register EnumEntry nodes.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis/dom] gc_feature_node: don't register EnumEntry nodes.
- Date: Fri, 2 Mar 2012 10:41:08 +0000 (UTC)
commit 14d5142abb733d20bc1d73dc7762d5a0730833b0
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Fri Mar 2 10:59:51 2012 +0100
gc_feature_node: don't register EnumEntry nodes.
EnumEntry node name may conflict with a feature. Specification
says one needs to pre-parse the genicam file and replace the
EnumEntry name by EnumerationName_EnumEntryName.
src/arvgcfeaturenode.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/arvgcfeaturenode.c b/src/arvgcfeaturenode.c
index c063e55..fb7d294 100644
--- a/src/arvgcfeaturenode.c
+++ b/src/arvgcfeaturenode.c
@@ -133,7 +133,9 @@ arv_gc_feature_node_set_attribute (ArvDomElement *self, const char *name, const
node->priv->name = g_strdup (value);
genicam = arv_gc_node_get_genicam (ARV_GC_NODE (self));
- arv_gc_register_feature_node (genicam, node);
+ /* Kludge around ugly Genicam specification (Really, pre-parsing for EnumEntry Name substitution ?) */
+ if (strcmp (arv_dom_node_get_node_name (ARV_DOM_NODE (node)), "EnumEntry") != 0)
+ arv_gc_register_feature_node (genicam, node);
} else if (strcmp (name, "NameSpace") == 0) {
if (g_strcmp0 (value, "Standard") == 0)
node->priv->name_space = ARV_GC_NAME_SPACE_STANDARD;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]