Awkwardness in parsing pod choice
First, create a pod:
pod = spa_pod_builder_add_object (b,
SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo,
SPA_PROP_INFO_id, SPA_POD_Id (Foo),
SPA_PROP_INFO_name, SPA_POD_String ("Bar"),
SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float (1.0, 0.0, 1.0));
Then try to parse it in a generic way (because we don't know what the type is):
spa_pod_parse_object (pod,
SPA_TYPE_OBJECT_PropInfo, NULL,
SPA_PROP_INFO_id, SPA_POD_Id (&id),
SPA_PROP_INFO_name, SPA_POD_String (&name),
SPA_PROP_INFO_type, SPA_POD_Pod (&pod));
One would expect now that SPA_POD_TYPE (pod) == SPA_TYPE_Choice
, but in fact the parser returns the first child of the range, so SPA_POD_TYPE (pod) == SPA_TYPE_Float