[gst-devel] Re: [gst-cvs] thomasvs gstreamer: gstreamer/docs/random/thomasvs/

Andy Wingo wingo at pobox.com
Mon Sep 9 07:43:04 CEST 2002


On Mon, 09 Sep 2002, Thomas Vander Stichele wrote:

> CVS Root:       /cvsroot/gstreamer
> Module:         gstreamer
> Changes by:     thomasvs
> Date:           Mon Sep 09 2002  02:28:54 PDT
> 
> Log message:
> some notes for rewriting the pwg
> 
> Added files:
>     docs/random/thomasvs: pwg
> 
> Links:
> http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/docs/random/thomasvs/pwg?rev=1.1&content-type=text/vnd.viewcvs-markup
> 
> ====Begin Diffs====
> Stuff for the PWG
> 
> * arguments

They're called properties now

> 
>   - how to add arguments
>     - create an identifier in the enum, starting with ARG_
>       example: ARG_RATE

The current vogue among G* people is PROP_

>     - add the property by adding a
>       g_object_class_install_property line
>       FIXME: what is name/nick/blurb in the paramspec ?

names that you can use to refer to the paramspec -- name is
canonicalized, nick is for human presentation, and blurb is documentation

>     - if the argument is readable, a block of code for it needs to be added
>       to the _get_property function.
> 
>   - default value
>     - default value should be set in _init function
>     - default value can be specified in paramspec (but I don't think this
>       is used anywhere)

you can also use | G_PARAM_CONSTRUCT -- better than setting it in init
in many cases, although it's not overridable by subclasses that way. i
use it in some of my plugins.

>   - things to check/possible problems
>     - do you have a _get_property function ?
>     - do you have a _set_property function ?
>     - do both have a default handler that handles invalid property ID's ?

need example for this

>     - are the _get/_set_property handlers assigned to the class's struct ?

*before* you install the properties

>     - do you have a g_object_class_install_property line for the argument ?
>     - are there restrictions on when your parameters can change ?
>       e.g. sample rate is not something that should be changed while PLAYING,
>            so it can only be changed in the NULL state
>     - did you use ARG_ ... consistently everywhere ?
> 
> 
>   - my own problems:
>     - how to set defaults and make the paramspec be right for them ?
> 
> 
> * audio
>   - explanation of difference of width and depth
>   - guidelines on how to implement this properly

regards,

off to work,

wingo.




More information about the gstreamer-devel mailing list