Re: Howto cleanup my gstreamer filter upon exit?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Howto cleanup my gstreamer filter upon exit?

Sharath Mudalamane
Hello Stefan,all,
 
Thanks a lot for the inputs! This is exactly what i was looking for.
 
Now, i have implemented the gst_wow_finalize() in my filter. But, I can't see
it being called when i perform an gst_object_unref( my_filter_handle);
 
Please, let me know if i am missing something in the implementation. I have
added the portion of code that implements _finalize() below:
 
_____________________________________________________________________________
____
gstwow.c
_____________________________________________________________________________
____
 
 
 
/* forward declaration */
static void gst_wow_finalize (GObject *object);

.....

/* initialize the plugin's class */

static void gst_wow_class_init (GstWowClass * klass)

{

gobject_class = (GObjectClass *) klass;

..

gobject_class->finalize = gst_wow_finalize;

...

}

......
static void gst_wow_finalize (GObject *object)

{

GstWow *filter = GST_WOW (object);

g_print ("\n[gst_wow_finalize] filter <%p>\t", filter);

my_library_close (filter->h_library_handle);

}

....

_____________________________________________________________________________
___
 
 
thanks & regards,
Sharath Mudalamane
 
======================================================================
 

Hi

Quoting Sharath Mudalamane <sharath_m@mi...>:

>
> To: gstreamer-devel@li...
> Subject: Howto cleanup my gstreamer filter upon exit?
>
> Hello all,
>
>
> I have developed a gstreamer filter (say "wow"), which is a wrapper to a
> module. I am using & making calls to this underlying module.
>
> I initialize the module (by calling its init() ) in gst_wow_init().
> Similarly, I need call shutdown() to properly close the module before
> dereferencing my wow filter.

gstreamer elements are normal gobjects, so please refer to the gobject =20
documentions (there is a tutorial part of the api docs) and read about =20
dispose() and finalize().

Stefan

>
> I couldn't find a ready function to do this in my filter.
>
> In conclusion i need a destroyer function like in C++!!
>
> Please provide help.
>
> Thanks and regards,
> Sharath
>
>
>




DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited.
E-mail may contain viruses. Before opening attachments please check them for viruses and defects. While MindTree Consulting Limited (MindTree) has put in place checks to minimize the risks, MindTree will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside.
Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.
MindTree reserves the right to monitor and review the content of all messages sent to or from MindTree e-mail address. Messages sent to or from this e-mail address may be stored on the MindTree e-mail system or else where.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel