[Bug 739685] RFC: add API to GstPreset to compare presets
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Thu Nov 6 04:54:53 PST 2014
https://bugzilla.gnome.org/show_bug.cgi?id=739685
GStreamer | gstreamer (core) | 1.x
--- Comment #3 from Stefan Sauer (gstreamer, gtkdoc dev) <ensonic at sonicpulse.de> 2014-11-06 12:54:44 UTC ---
Few more ideas after irc discussions:
1) instead I could also add API:
const gchar* gst_preset_find(GstPreset *preset);
which would check if the current settings are equal to any of the presets and
if so return the name or NULL if none of the presets match.
This would be enough for a UI to show the preset that matches the selection.
What it would not help is to avoid the UI storing a new preset where e.g. a
double parameter slightly differs.
The previously proposed API with the distance would allow to create a cross
correlation matrix (at least for reviewing new presets) to see if a new preset
is unique enough. And yes, that is an issue for some of the audio plugins I
have.
2) another alternative for the gst_preset_distance() api would be to change it
to:
gboolean
gst_preset_equals (GstPreset * preset, const gchar * name, GstStructure
*details)
it would now simply return TRUE if the settings are identical to the preset. If
not and if details points to a GstStructure, it would fill the structure with
details - e.g. the names of the changed properties and the normative delta + a
total delta. Or whaterever is useful.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the gstreamer-bugs
mailing list