[patch] Make [] an alias of get_pad

Hi,

See attached patch.

Sjoerd

On Sat, Mar 29, 2008 at 07:15:42PM +0100, Sjoerd S. wrote:

Hi,

See attached patch.

Original patch was broken. Fixed version attached

Sjoerd

On Sat, Mar 29, 2008 at 07:15:42PM +0100, Sjoerd S. 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.

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad” on
Sat, 29 Mar 2008 19:46:45 +0100,
Sjoerd S. [email protected] 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

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad” on
Sat, 29 Mar 2008 21:57:14 +0100,
Sjoerd S. [email protected] 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

On Sun, Mar 30, 2008 at 08:56:07AM +0900, Kouhei S. 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 :slight_smile:

Sjoerd

Did you hear that there’s a group of South American Indians that worship
the number zero?

Is nothing sacred?

On Sat, Mar 29, 2008 at 09:57:14PM +0100, Sjoerd S. wrote:

pads and to not define it on Gst::Bin. Opinions?
Yes! Pads please!

Paul


PhD Student @ Eindhoven | email: [email protected]
University of Technology, The Netherlands | JID: [email protected]

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] [patch] Make [] an alias of get_pad” on
Sun, 30 Mar 2008 01:32:54 +0100,
Sjoerd S. [email protected] 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 :slight_smile:
OK. You can do.

Thanks,

kou