Forum: Ruby-Gnome 2 gstreamer install plugins

C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-02-18 17:20
(Received via mailing list)
Attachment: gst-install-plugins3.diff (8 KB)
Hi.

I am trying to implement gstreamer install plugins.
Can someone take a look at the attached patch  ?

Documentation can be seen at
http://gstreamer.freedesktop.org/data/doc/gstreame...
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2011-02-20 21:52
Hello,

Perhaps it could just be added to Ruby-gnome? If problems result from
this users could email you? Gstreamer is nice but I remember it was not
easy to keep maintaining it. (Documentation about Gstreamer is also not
perfect yet in my opinion.)
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-02-21 15:19
(Received via mailing list)
2011/2/20 Marc Heiler <ruby-forum-incoming@andreas-s.net>:
> Perhaps it could just be added to Ruby-gnome? If problems result from
> this users could email you? Gstreamer is nice but I remember it was not
> easy to keep maintaining it. (Documentation about Gstreamer is also not
> perfect yet in my opinion.)
>
I hope these functions will be added to Ruby-gnome.
If bugs are found in code I have written you can write me an email.

--
Vincent Carmona
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2011-02-26 11:09
(Received via mailing list)
Hi,

In <AANLkTi=5Df1R__zXa36BpDWyzc6jm9nMbxYNvs2yHBRG@mail.gmail.com>
  "[ruby-gnome2-devel-en] gstreamer install plugins" on Fri, 18 Feb 2011
17:19:53 +0100,
  Vincent Carmona <vinc4mai@gmail.com> wrote:

> I am trying to implement gstreamer install plugins.
> Can someone take a look at the attached patch  ?
>
> Documentation can be seen at
>
http://gstreamer.freedesktop.org/data/doc/gstreame...

  1. It seems that RG_DEF_CONVERSION isn't needed. Do you
     have a sample script that needes RG_DEF_CONVERSION?

  2. GstInstallPluginsReturn in
     gst_install_plugins_result_func(), async() and sync()
     should convert by GENUM2RVAL(result,
     GST_TYPE_INSTALL_PLUGINS_RETURN) not INT2FIX().

  3. block in async() shuold be guarded from GC by keeping a
     reference to block. You can use G_RELATIVE(self, block).
     (You need to unreference the block after the block
      isn't needed. But I don't have English skil to explain
      how to do it. So it's enough that just using
      G_RELATIVE() for now. Hint: G_CHILD_ADD() and
      G_CHILD_REMOVE().)

Thanks,
--
kou
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-02-27 21:03
(Received via mailing list)
Attachment: gst-install-plugins4.diff (8 KB)
Attachment: gst-install-plugins5.diff (8 KB)
2011/2/26 Kouhei Sutou <kou@cozmixng.org>:
>>
http://gstreamer.freedesktop.org/data/doc/gstreame...
>
> 1. It seems that RG_DEF_CONVERSION isn't needed. Do you
>   have a sample script that needes RG_DEF_CONVERSION?

I think that you are right.
>
> 2. GstInstallPluginsReturn in
>   gst_install_plugins_result_func(), async() and sync()
>   should convert by GENUM2RVAL(result,
>   GST_TYPE_INSTALL_PLUGINS_RETURN) not INT2FIX().

Done.
>
> 3. block in async() shuold be guarded from GC by keeping a
>   reference to block. You can use G_RELATIVE(self, block).
>   (You need to unreference the block after the block
>   isn't needed. But I don't have English skil to explain
>   how to do it. So it's enough that just using
>   G_RELATIVE() for now. Hint: G_CHILD_ADD() and
>   G_CHILD_REMOVE().)

I have used G_RELATIVE. I guess best solution should :
use  G_CHILD_ADD in place of current G_RELATIVE,
unreference the block inside gst_install_plugins_result_func function
with G_CHILD_REMOVE macro.

It requires to pass both the block and mGstInstallPlugins to the
gst_install_plugins_result_func function. I guess it is possible by
using the last argument of the function.

In  gst-install-plugins5.diff I have try another solution. I store the
block in an Array object which is an (hidden) instance variable of
Gst::InstallPlugins. I delete the block from the array after use.
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-02-27 23:48
(Received via mailing list)
Attachment: gst-install-plugins6.diff (8 KB)
2011/2/27 Vincent Carmona <vinc4mai@gmail.com>:
>>> Documentation can be seen at
>>   GST_TYPE_INSTALL_PLUGINS_RETURN) not INT2FIX().
>
> I have used G_RELATIVE. I guess best solution should :
> use G_CHILD_ADD in place of current G_RELATIVE,
> unreference the block inside gst_install_plugins_result_func function
> with G_CHILD_REMOVE macro.
>
> It requires to pass both the block and mGstInstallPlugins to the
> gst_install_plugins_result_func function. I guess it is possible by
> using the last argument of the function.

mGstInstallPlugins does not need to be pass as an argument as it is
also defined  within gst_install_plugins_result_func function.
What do you think of gst-install-plugins6.diff ?
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2011-03-03 13:27
(Received via mailing list)
Hi,

In <AANLkTi=XSdFhFVz3Cn7u44Kcw+AbHPw_D44U9CAVVcJc@mail.gmail.com>
  "Re: [ruby-gnome2-devel-en] gstreamer install plugins" on Sun, 27 Feb
2011 21:03:27 +0100,
  Vincent Carmona <vinc4mai@gmail.com> wrote:

>> 2. GstInstallPluginsReturn in
>>   gst_install_plugins_result_func(), async() and sync()
>>   should convert by GENUM2RVAL(result,
>>   GST_TYPE_INSTALL_PLUGINS_RETURN) not INT2FIX().
>
> Done.

Thanks!

> unreference the block inside gst_install_plugins_result_func function
> with G_CHILD_REMOVE macro.

Yes!

> It requires to pass both the block and mGstInstallPlugins to the
> gst_install_plugins_result_func function. I guess it is possible by
> using the last argument of the function.

I think so too.

> In  gst-install-plugins5.diff I have try another solution. I store the
> block in an Array object which is an (hidden) instance variable of
> Gst::InstallPlugins. I delete the block from the array after use.

It will work but we want to use common way to do the same
thing. (keeping block's reference)


I think that gst-install-plugins4.diff with comment about
G_CHILD_ADD() and G_CHILD_REMOVE() is better patch in your 3
patches. Please commit it!


Thanks,
--
kou
Ee6ffca720cc428d70247dcd7377dd48?d=identicon&s=25 Kouhei Sutou (Guest)
on 2011-03-03 13:29
(Received via mailing list)
Hi,

In <AANLkTikiwgOjcMzYCZGTnWwtaZPt4KTxsJrDwbQPy9a7@mail.gmail.com>
  "Re: [ruby-gnome2-devel-en] gstreamer install plugins" on Sun, 27 Feb
2011 23:47:53 +0100,
  Vincent Carmona <vinc4mai@gmail.com> wrote:

> mGstInstallPlugins does not need to be pass as an argument as it is
> also defined  within gst_install_plugins_result_func function.
> What do you think of gst-install-plugins6.diff ?

Ah, you're right.
Could you commit gst-install-plugins6.diff instead of
4.diff?

Thanks,
--
kou
C4a836af7263f84a4f7cc91ed6f3ae77?d=identicon&s=25 Vincent Carmona (vinc-mai)
on 2011-03-03 18:29
(Received via mailing list)
2011/3/3 Kouhei Sutou <kou@cozmixng.org>:
> Ah, you're right.
> Could you commit gst-install-plugins6.diff instead of
> 4.diff?

Done.

>
> Thanks,
> --
> kou
>


--
Vincent Carmona
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.