From: Sjoerd S. <sj...@lu...> - 2008-03-30 00:33:04
|
On Sun, Mar 30, 2008 at 08:56:07AM +0900, Kouhei Sutou wrote: > Hi, > > In <200...@sp...> > "Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad" on Sat, 29 Mar 2008 21:57:14 +0100, > Sjoerd Simons <sj...@lu...> wrote: > > > On Sat, Mar 29, 2008 at 07:15:42PM +0100, Sjoerd Simons wrote: > > > Hi, > > > > Interestingly Ruby/Gstreamer choose the other option and already uses [] on > > Gst::Bin to get specific children. > > > > In my experience in programming with gstreamer one rarely needs to get a > > specifically named child from a bin, but quite often wants to get a > > specifically named pad. That's why i decided to use [] to get the pads of an > > element. > > > > Obviously some choose needs to be made. Obviously i using [] to get pads and > > to not define it on Gst::Bin. Opinions? > > I can't understand why you say about Gst::Bin#[]. The change > is about Gst::Element, isn't it? The problem is that with this change both Gst::Element and Gst::Bin will have a [] function, which both have very different semantics. And as Gst::Bin is a child of Gst::Element this is really not something you want. So we should choose one and stick with it. I know i and some others have various bits of code around that expects Gst::Element#[] as defined in this patch. So i'd obviously like to keep that and to get rid of Gst::Bin#[] to making porting a lot easier. And in practise it seems more convinient too :) Sjoerd -- Did you hear that there's a group of South American Indians that worship the number zero? Is nothing sacred? |