5 A type properties system might look like following:
8 1) Type definition includes the properties and their ranges:
15 format: bitfield (using asound.h definitions)
26 framerate: 32-bit float
31 2) An element can specify what subtypes it can deal with by creating a list of property tables:
44 And you could list several of these, so for instance if the card only supports 8-bit at up to 22KHz in
45 mono, you can remove S8 from the above list and add a second entry:
52 interleave: false (irrelevant)
54 The obvious problem with these examples is that the rate isn't really 8000 - 48000, it's 8000, 11025,
55 16000, 22050, 44100, and 48000. However, we may be able to leave these to pad connect time.
61 struct _type_definition {
69 gst_type_add_property_int(_type *type,gchar *propname,int min,int max) {
70 struct _type_prop_int prop_int;
71 GQuark quark = g_quark_from_string(propname);
76 g_datalist_id_set_data(type->properties,quark,&prop_int);