[gst-devel] quality/profile interface

Ronald Bultje rbultje at ronald.bitfreak.net
Sat Dec 13 12:29:02 CET 2003


Hi *,

I promised to send down some ideas for a quality/profile interface. The
idea/goal is simple: a plugin can have N (0-inf) properties that affect
encoding quality, and each can have different values, of which each
value has a different meaning for the output quality and encoding time
(or CPU requirements). Some are top-down, others are down-top (so if a
property has allowed range 1-5, which is best and which is worst?).

We could do this with properties, but that requires some knowledge from
the users, which is against the Gnome philosophy. So we need something
simple and uniform.

To overcome this issue, I (with others) propose a profile interface.
It's a simple "link properties and values to a meaning" interface. The
only issue is: how should it look and behave?

I propose a limited list, defined by the plugin, with free-form strings
that indicate a certain quality setting. Each of these "profiles" is
fixed (for simplicity). The profiles affect several GObject properties,
and have fixed values for each of them. I propose the following
functions to get this:

/* get the list of profile IDs */
const GList *gst_profile_get_list (GstProfile  *profile);

/* set/get the current profile - NULL means none (i.e.
 * the current element configuration does not apply to
 * a specific profile). */
const gchar *gst_profile_get_current (GstProfile  *profile);
void         gst_profile_set_current (GstProfile  *profile,
				      const gchar *id);
/* maybe ID needs to be a struct instead of a string? */

/* get affected properties (list of GParamSpecs) */
const GList *gst_profile_get_affected_properties (GstProfile *profile);

/* get the value of a property for a specific profile ID */
void         gst_profile_get_property_for (GstProfile *profile,
					   GParamSpec *pspec,
					   GValue     *value);
/* value is just like for GObject properties */

That's it. If the current configuration in an element does not apply to
a certain profile ID, then we simply return NULL or so. It means
'Custom', i.e. not a pre-configured profile, but something set by the
user itself. I don't think this is an issue, since if a user sets
properties manually, he knows what he's doing. Note that apps will only
use the first three functions, the last two are just for 'advanced' apps
that want to show information to the user or so.

Comments? Different opinions? Things unclear that need better
explanation? Please let me know!

Ronald

-- 
Ronald Bultje <rbultje at ronald.bitfreak.net>
Linux Video/Multimedia developer





More information about the gstreamer-devel mailing list