Re: [Vala] How to call a gst_object_ref in vala?

On Mon, Apr 28, 2008 at 1:44 PM, Juerg Billeter <j bitron ch> wrote:
On Mon, April 28, 2008 12:55, Jaap A. Haitsma wrote:
 > I want to use a gst_bin_remove function [1], but I want the Element
 > that is removes not to be freed. For that I need to call
 > gst_object_ref before gst_bin_remove (See also [1]). How do I call
 > gst_object_ref in vala?

 This essentially means that you want to keep a reference to the child
 element. So just store it in a local variable or field and Vala will
 increment the reference count automatically. It will currently just call
 g_object_ref, not gst_object_ref, but that should work fine, we could
 change that to gst_object_ref for GstObjects.

Thanks, are you also planning on providing a function in vala to
increase ref count. Introducing another variable so you can increase
the refcount is a bit hacky if you ask me.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]