[gst-devel] string transforms for GObject properties
ds at schleef.org
Wed Apr 28 10:03:02 CEST 2004
On Wed, Apr 28, 2004 at 01:48:30AM +0200, daniel fischer wrote:
> hi there,
> i'm experimenting with special property types for some elements. in a nutshell, i would like to specify positions and areas not with 2 or 4 properties each (x/y, resp x1,y1,x2,y2), but a single one , eg like so:
> gst-launch myelement roi=10,10,310,230
> glib has a mechanism to register value transform functions, so i think it would be nice if i'd supply those to_string and from_string for my 'proprietary' properties, and gstreamer would just use those when setting the element's properties from gst-launch.
> you'd probably agree that this kind of functionality belongs to glib, not gstreamer, but the core has quite some functions for converting strings to GValues, so i'm submitting this here first (i'm thinking about a post to gtk-list about this too to see what they think. if they'd supply conversion routines to/from string, gst core could spare quite some lines of ugly code).
We have separate serialize/deserialize functionality in gstreamer
because the string conversion code in glib does not work for our
purposes. The glib documentation specifically states not to use
it for serialization. The basic problem is that GValue string
conversions are not guaranteed to be unique or reversable, as well
as being locale-dependent.
The serialize/deserialize code is not currently used for GstObject
properties in gst_parse_launch(), but that's mainly just a mistake.
More information about the gstreamer-devel