From: Tiago K. <kat...@in...> - 2009-10-29 20:33:05
|
On Thu, Oct 29, 2009 at 4:39 PM, Stefan Kost <en...@ho...>wrote: > Tiago Katcipis schrieb: > > Looking at the GstAppSink code i found that i actually have to override > > the finalize function on the GObject class. Sorry to bother, I'm not > > very used with Gobject :-). > > > > The GstAppSink code (on the class init function): > > > > GObjectClass *gobject_class = (GObjectClass *) klass; > > GstBaseSinkClass *basesink_class = (GstBaseSinkClass *) klass; > > > > gobject_class->dispose = gst_app_sink_dispose; > > gobject_class->finalize = gst_app_sink_finalize; > > > > just for your info, dispose can theortically be called multiple times and > finalize is called just once. The idea is to call unref in dispose, set > object s > to NULL and check that incase its called again. Do free()s in finalize > > Stefan > Thanks for the help Stefan, sorry to bother you guys with such an simple question. Best regards, Katcipis > > > > > > > On Thu, Oct 29, 2009 at 11:59 AM, Tiago Katcipis <kat...@in... > > <mailto:kat...@in...>> wrote: > > > > I'm building an element that uses an external lib, and when my > > element is freed (it ref count reaches zero), i want to free some > > stuff of the external lib i use. I didn't find anything about a > > generic destructor function that i can override, so when my element > > is being freed i can free the resources that i was using on my > > plugin. Can anyone help me? > > > > best regards, > > Katcipis > > > > > > > > > > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------------ > > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > > is the only developer event you need to attend this year. Jumpstart your > > developing skills, take BlackBerry mobile applications to market and stay > > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > > http://p.sf.net/sfu/devconference > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > gstreamer-devel mailing list > > gst...@li... > > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > gstreamer-devel mailing list > gst...@li... > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel > -- "Se você se perder na selva africana, não precisa se desesperar. Basta sentar em uma pedra e começar a instalar GNU/Linux em seu laptop. Em menos de 5 minutos aparecerá alguém pra discordar de sua escolha de distribuição, do particionamento, do gerenciador de janelas, do ambiente de desktop, do editor de textos..." |