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