• Home
  • About
  • Blog Archives
  • Contact Me
  • FAQ
  • The Big 101
Subscribe: Posts | Comments | E-mail

jonobacon@home

Archive for November 3rd, 2006


Posted on November 3, 2006 - by jono

Rock on

Lovely email from Frank Armstrong:

Hello Jono,

My name is Frank Armstrong. I am very happy to tell you about how your wonderful list saved me tons of hours of frustration. Rich Johnson, from Chicago, has been a super help to me. I’m just now taking the time to learn the ropes for Kubuntu, and he has solved several amazing problems for me. I can’t tell you have happy I am to know there are real heroes left in this tech world. I will keep in touch with him and eventually, make myself available to assist newbies to the Linux way of life.

Thank you so much for providing your wonderful resource list. Please encourage the updating of it. It will be a life-saver for many I’m sure. It is a real blessing.

Great work Rich! I agree with Frank. :)

It is people like these guys that are making our community kick ass every day. :)


Posted on November 3, 2006 - by jono

Off to UDS

Tomorrow I fly out to San Francisco to the Ubuntu Developer Summit. This is cool for two core reasons:

  • The Ubuntu Developer Summit and its discussions, people, specs, and other fun stuff.
  • San Francisco is the birthplace of thrash metal.

’nuff said.


Posted on November 3, 2006 - by jono

GStreamer Dynamic Pads, Explained

(for an intro to GStreamer, see my previous article)

You know, one thing that gets people confused in GStreamer is the idea of Dynamic Pads. Some elements, most notably the decodebin and gnlcomposition only have certain pads at certain times. This is because they figure out what kind of content they are processing, and apply the relevant pads where needed. This is often told to new users, but then they wonder how exactly these dynamic pads are handled.

Here is how it works, using decodebin as an example:

  • When the pipeline is run, the decodebin generates a signal that says a new pad has been added. In the case of decodebin this is the new-decoded-pad signal, in the case of gnlcomposition this is a pad-added signal.
  • You hook this signal up to your own callback, such as OnDecodedPad().
  • The signal passes your callback the pad that was added and some other stuff. You then link this pad to the next element along in the pipeline. So if your pipeline is filesrc ! decodebin ! audioconvert ! alsasink, the pad passed to your OnDecodeBin() method would be linked to the audioconvert.

To outline this, I have written a sample script to show how it works:

#!/usr/bin/python

import pygst
pygst.require("0.10")
import gst
import pygtk
import gtk

class Main:
    def __init__(self):
        self.pipeline = gst.Pipeline("mypipeline")

        self.filesrc = gst.element_factory_make("filesrc", "source")
        self.pipeline.add(self.filesrc)
        self.filesrc.set_property("location", "/home/jono/Desktop/jonobacon-voicesoffreedom.ogg")

        self.decode = gst.element_factory_make("decodebin", "decode")
        self.decode.connect("new-decoded-pad", self.OnDynamicPad)
        self.pipeline.add(self.decode)

        self.filesrc.link(self.decode)

        self.convert = gst.element_factory_make("audioconvert", "convert")
        self.pipeline.add(self.convert)

        self.sink = gst.element_factory_make("alsasink", "sink")
        self.pipeline.add(self.sink)

        self.convert.link(self.sink)

        self.pipeline.set_state(gst.STATE_PLAYING)

    def OnDynamicPad(self, dbin, pad, islast):
        print "OnDynamicPad Called!"
        pad.link(self.convert.get_pad("sink"))


start=Main()
gtk.main()

You can grab the script from here. Hope this helps some of you. :)



  • Ad Ad Ad Ad
  • Prepare For Awesome

  • Recent Articles

    • Rest Well, My Friend
    • Incredible Stories Of Free Software and Open Source
    • On Zareason
    • This Friday: Rockridge Ubuntu Global Jam In Berkeley
    • Rocking The Application Indicators
    • Articulating IRC Contributions Concisely
    • Revisiting Ethos
    • Getting More Developers Interested In Participating In Ubuntu
    • 11.04 Ubuntu Developer Summit Announced
    • Help Colin Get His Kids Back
  • Recent Comments

    • Gerv on On Zareason
    • Deborah Lang on Facebook Account Disabled
    • duanedesign on Rest Well, My Friend
    • YADev on Application Indicators In Python
    • Navneeth on Incredible Stories Of Free Software and Open Source
    • Christoffer Holmstedt on Getting More Developers Interested In Participating In Ubuntu
    • Tachyon Feathertail on Getting More Developers Interested In Participating In Ubuntu
    • Neil Wilson on Getting More Developers Interested In Participating In Ubuntu
    • flipefr on Getting More Developers Interested In Participating In Ubuntu
    • Christoffer on Getting More Developers Interested In Participating In Ubuntu
  • Flickr Photos

  •  

    November 2006
    M T W T F S S
    « Oct   Dec »
     12345
    6789101112
    13141516171819
    20212223242526
    27282930  
  • jb@h Rockstars This Year

    • ethana2 (34)
    • Zac (18)
    • nixternal (17)
    • Tachyon Feathertail (15)
    • James Duncan (13)
    • Mackenzie (13)
    • Tom (12)
    • Bruno Girin (11)
    • Jimbo (11)
    • Adam Williamson (10)
© 2008 jonobacon@home - At home with Jono Bacon, Community Manager and Author