Gstreamer install plugins

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/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstpbutilsinstallplugins.html

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.)

2011/2/20 Marc H. [email protected]:

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 C.

Hi,

In [email protected]
“[ruby-gnome2-devel-en] gstreamer install plugins” on Fri, 18 Feb 2011
17:19:53 +0100,
Vincent C. [email protected] 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/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstpbutilsinstallplugins.html

  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

2011/2/27 Vincent C. [email protected]:

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 ?

2011/2/26 Kouhei S. [email protected]:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstpbutilsinstallplugins.html

  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.

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

Done.

  1. 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.

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] gstreamer install plugins” on Sun, 27 Feb
2011 23:47:53 +0100,
Vincent C. [email protected] 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

Hi,

In [email protected]
“Re: [ruby-gnome2-devel-en] gstreamer install plugins” on Sun, 27 Feb
2011 21:03:27 +0100,
Vincent C. [email protected] wrote:

  1. 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

2011/3/3 Kouhei S. [email protected]:

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

Done.

Thanks,

kou


Vincent C.