[gst-devel] How to predict which properties will be live-changeable ?

Florent fthiery at gmail.com
Mon Apr 13 22:33:51 CEST 2009


Hello,

I spent some time this week-end on doing a gtk app for gst-gengui, and
i must say it was both very quick to do and efficient. It's my first
gtk app, and i'm already loving it :)

>>> gtk-version I'll contribute. I use spin buttons for ints, sliders for
>>> float/double, comboboxes for enums, checkboxes for boolean and entries
>>> for strings.

I used spin and scale widgets for numbers (int/floats are supported),
fileselector popup for location (if you use a filesrc in your
pipeline), comboboxes for enums, checkboxes for enums and entries for
strings. Thanks for the hints :)

You can see a screenshot at http://code.google.com/p/gst-gengui/

I used the following for enums, and i fear it is not clean at all :

if property.__gtype__.has_value_table:
   values = property.enum_class.__enum_values__
   for index in values:
       self.values_list.append(values[index].value_name)

(code: EnumProperty in gstintrospector.py). What's the right way to
get the number/values correspondances for enums in python ?

About the non-live-changeable parameters, i just use a condition for
theoraenc bitrate as an example (i stop and restart the pipeline
between the parameter change) and it works but is a bit dirty. What's
strange is that you can change the value of bitrate for theoraenc
(using set_property), the new value is the correct one (i do a
get_property after changing the parameter), but of course no real
change. Maybe if the plugin refused a parameter change, i could
determine (try/except) if you can change the property on the fly. I
think i'll stick to an elements list while waiting for the new spec to
be added and all the plugins ported. Also, does anyone know why the
default bitrate value (and reported real value) for theoraenc bitrate
is 0 ?

Last, i have some performance and stability problems with the
automatic video embedding for multi-video pipelines (i used the
remuxer.py example from pygst doc for the embedding):
- sometimes, the videos are being redirected only when i click on the app itself
- sometimes, the videos have black borders, sometimes not
- sometimes, there is an artifact (videotestsrc texture portion remains)
- i sometimes get bad segfaults/stacktraces
- performance is poor (when i fullsize the window, widgets are not
updated, etc...)
- this doesn't happen on simpler pipelines
- using queues don't change anything

Could someone take a look and confirm these problems ? If there are
better/safer ways to embed the video textures for multi-redirections,
i'd be glad to fix this.

@David: how can i use the gtk video widget you have done from pygtk ?

>> Isn't the property's name itself (location / uri) sufficiently
>> standard to use it as identifier ?
> its a bit weak. how do you know that location is not an uri, or that its not
> e.g. the location in the sense of a geo coordinate.

Hm. Do you intend to create a dedicated data type for local resources ?

Thanks for any help regarding testing/debugging/features suggestions.

Florent




More information about the gstreamer-devel mailing list