Hi Jaap,
On Mon, June 2, 2008 08:16, Jaap A. Haitsma wrote:
> I'm working on porting cheese to vala. I'm running into a problem when
> trying to convert gst-audio-play.c [1] to vala.
>
> The gst-audio-play has a function play_file and what it does is the
> following in semi vala code
>
> public static play_file (string filename) {
> var audio = new Audio (filename);
> audio.play (); // Playing starts in another thread
>
> // In vala audio gets unreffed here, but I want it to be unreffed
> after it receives an EOS (end of stream) in the other thread
> }
The proper fix is to use gst_bus_add_watch_full, as far as I can tell from
the code. When bug 533484[1] has been fixed and the bindings have been
adapted, this will be completely automatic and should work fine with your
current Vala code. In the meantime, you can call .ref() and .unref()
manually at the appropriate places.
Juerg
[1] http://bugzilla.gnome.org/show_bug.cgi?id=533484
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list