Hi, 2008/11/14 Spencer, Matthew <[EMAIL PROTECTED]>: > Hi Guys > > I am playing with Vala with a view to presenting information about it at our > companies developer conference in a couple of weeks. With this in mind I am > trying to build up a test application that shows video playback using > GStreamer. I am having problems with the following code: > > private Element createVideoBin() { > var bin=new Bin("videobin"); > var queue=ElementFactory.make("queue","queue"); > var sink=ElementFactory.make("autovideosink","videosink"); > var ghostPad=new GhostPad("sink",queue.get_pad("sink")); > bin.add_many(queue,sink); > queue.link(sink); > bin.add_pad(ghost); > return(bin); > }
bin.add_many is the problem because the c function takes the ownership, but the bindings don't do it. Just use bin.add for every element as a workaround... Gr, Thijs > When attempting to use the returned bin, I get a segfault. This is because > (I think, on examining the generated C code) the elements are being unrefd > before the bin is returned. I am sure this is not supposed to happen. > > I get a number of error messaged when running the app: > (mystreamer:16361): GStreamer-CRITICAL **: > Trying to dispose of object "videosink", but it still has a parent > "videobin". > You need to let the parent manage the object instead of unreffing the object > directly. > > I am assuming this is because I need to inform the code that I wish to > transfer ownership of the objects to the 'Bin', but how do I do this, and is > there a way that this can be picked up by the compiler to prevent this type > of problem? > > Cheers > > Matt > ********************************************************************************************************* > This e-mail is confidential, the property of NDS Ltd and intended for the > addressee only. Any dissemination, copying or distribution of this message > or any attachments by anyone other than the intended recipient is strictly > prohibited. If you have received this message in error, please immediately > notify the [EMAIL PROTECTED] and destroy the original message. Messages > sent to and from NDS may be monitored. NDS cannot guarantee any message > delivery method is secure or error-free. Information could be intercepted, > corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. > We do not accept responsibility for any errors or omissions in this message > and/or attachment that arise as a result of transmission. You should carry > out your own virus checks before opening any attachment. Any views or > opinions presented are solely those of the author and do not necessarily > represent those of NDS. > > To protect the environment please do not print this e-mail unless necessary. > > NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West > Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England > and Wales Registered no. 3080780 VAT no. GB 603 8808 40-00 > ********************************************************************************************************** > > _______________________________________________ > Vala-list mailing list > Vala-list@gnome.org > http://mail.gnome.org/mailman/listinfo/vala-list > > _______________________________________________ Vala-list mailing list Vala-list@gnome.org http://mail.gnome.org/mailman/listinfo/vala-list