On Mon, April 28, 2008 16:31, Jaap A. Haitsma wrote: > 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
Ah, that's just a bug in the Vala bindings for GStreamer, then. GstObject uses floating references, like GInitiallyUnowned. However, Vala doesn't know that yet. The `photo_sink- field should suffice to keep the reference, so when this bug is fixed, you don't have to do anything special to avoid the crash. Please add the bug to bugzilla. Juerg _______________________________________________ Vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
