[gst-devel] Cleaning up gst-python/examples

Jason Gerard DeRose jderose at jasonderose.org
Thu Oct 12 23:57:44 CEST 2006

Oops, sorry about sending that empty message...

I've been looking through the gst-python/examples, and I'd really like
to see the depreciated examples removed (the ones that haven't been
ported to gstreamer0.10).  They are:


I'll gladly write equivalent examples for each of these, but I first
wanted to get some feedback on what others feel should be included.

Personally, I prefer examples that cleanly illustrate specific aspects
of the gst-python API over more 'mini-application' type examples.  I
don't find examples like gst123 as useful because too high a percentage
of the code has to do with its mini-application aspect and not gstreamer.

Anyway, I've attached an example that I'd like to see replace gst123.
It's a simple autuplugging example using decodebin.

I would like feedback on one aspect of my decodebin.py.  I've aways been
a bit uncertain as to the preferred way to do the following in the
python bindings:

  /* check media type */
  caps = gst_pad_get_caps (pad);
  str = gst_caps_get_structure (caps, 0);
  if (!g_strrstr (gst_structure_get_name (str), "audio")) {
    gst_caps_unref (caps);
    gst_object_unref (audiopad);

(From the GStreamer Application Development Manual 19.2. Decodebin.)

So I'd appreciate critique on how I'm implementing my
on_new_decoded_pad() handler.

Lastly, what is the preferred license for these examples?  I stuck an
LGPL disclaimer on it, but this is such a tiny piece of code that maybe
it should just be public domain.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: decodebin.py
Type: text/x-python
Size: 2716 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20061012/73a91884/attachment.py>

More information about the gstreamer-devel mailing list