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



On Mon, Apr 28, 2008 at 4:17 PM, Andrea Bolognani <eof kiyuko org> wrote:
On Mon, 28 Apr 2008 15:56:08 +0200

"Jaap A. Haitsma" <jaap haitsma org> wrote:


See my first mail and
 > http://library.gnome.org/devel/gstreamer/unstable/GstBin.html#gst-bin-remove
 >
 > I want to keep the Element alive

 I don't know exactly why you're taking this off-list, but anyway ;)

Sorry hit the wrong button

 I'm not sure I get the problem.
 I guess you wanted to write something like

    bin.remove (bin.get_by_name ("name"));

 instead of something like

    element = bin.get_by_name ("name");
    bin.remove (element);

I'm rewriting cheese [1] in vala and I have video and a photo sink and
I need to switch between the two, but I don't want to rebuild them all
the time whenever I switch

So what I want is when a users switches from photo to video mode

   bin.remove (photo_sink);
   bin.add (video_sink);

Then when the user switches back

   bin.remove (video_sink);
   bin.add (photo_sink); // Crash because photo_sink got unreffed in
bin.remove (photo_sink)


So I think I need it, or do you see other ways to do it

Jaap

[1] http://www.gnome.org/projects/cheese/



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