Ruby Forum Ruby-Gnome 2 > [patch] Make [] an alias of get_pad

Posted by Sjoerd Simons (Guest)
on 29.03.2008 19:16
Attachment: get-pad-alias.patch (938 Bytes)
(Received via mailing list)
Hi,

  See attached patch.

  Sjoerd
Posted by Sjoerd Simons (Guest)
on 29.03.2008 19:47
Attachment: get-pad-alias.patch (951 Bytes)
(Received via mailing list)
On Sat, Mar 29, 2008 at 07:15:42PM +0100, Sjoerd Simons wrote:
> Hi,
> 
>   See attached patch.

  Original patch was broken. Fixed version attached

    Sjoerd
Posted by Sjoerd Simons (Guest)
on 29.03.2008 21:57
(Received via mailing list)
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?

    Sjoerd
--
Torque is cheap.
Posted by Paul van Tilburg (Guest)
on 29.03.2008 23:13
(Received via mailing list)
On Sat, Mar 29, 2008 at 09:57:14PM +0100, Sjoerd Simons wrote:
> pads and to not define it on Gst::Bin.  Opinions?
Yes! Pads please!

Paul

--
PhD Student @ Eindhoven                     | email: paul@luon.net
University of Technology, The Netherlands   | JID: paul@luon.net
Posted by Kouhei Sutou (Guest)
on 30.03.2008 00:55
(Received via mailing list)
Hi,

In <20080329184645.GA10981@spring.luon.net>
  "Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad" on 
Sat, 29 Mar 2008 19:46:45 +0100,
  Sjoerd Simons <sjoerd@luon.net> wrote:

> >   See attached patch.
> 
>   Original patch was broken. Fixed version attached

It was very happy for us if you considered to follow our
coding-style.

Others are OK for me.


Thanks,
--
kou
Posted by Kouhei Sutou (Guest)
on 30.03.2008 00:56
(Received via mailing list)
Hi,

In <20080329205714.GA14058@spring.luon.net>
  "Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad" on 
Sat, 29 Mar 2008 21:57:14 +0100,
  Sjoerd Simons <sjoerd@luon.net> wrote:

> 
>   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?


Thanks,
--
kou
Posted by Sjoerd Simons (Guest)
on 30.03.2008 01:33
(Received via mailing list)
On Sun, Mar 30, 2008 at 08:56:07AM +0900, Kouhei Sutou wrote:
> >   Gst::Bin to get specific children.
> 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?
Posted by Kouhei Sutou (Guest)
on 30.03.2008 08:58
(Received via mailing list)
Hi,

In <20080330003254.GB18305@spring.luon.net>
  "Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad" on 
Sun, 30 Mar 2008 01:32:54 +0100,
  Sjoerd Simons <sjoerd@luon.net> wrote:

> > >   Interestingly Ruby/Gstreamer choose the other option and already uses [] on
> > I can't understand why you say about Gst::Bin#[]. The change
> it seems more convinient too :)
OK. You can do.


Thanks,
--
kou