[gst-devel] Checking whether gstreamer has been initialized
Braden McDaniel
braden at endoframe.com
Sat Sep 23 03:33:00 CEST 2006
On Fri, 2006-09-22 at 16:46 -0700, David Schleef wrote:
> On Fri, Sep 22, 2006 at 04:47:21PM -0400, Braden McDaniel wrote:
> > I have a library in which I will be embedding GStreamer (via a local
> > plug-in). It looks like I will have to push the responsibility of
> > calling gst_init onto my library's users; after all they may want to use
> > GStreamer in other ways in their applications.
> >
> > If the user has neglected to call gst_init, I would like to be able to
> > provide feedback indicating the problem. So is there any way I can check
> > to see if gst_init has been called?
>
> I recommend having a yourlibrary_init() that calls gst_init().
> gst_init() can be called multiple times with no side-effects. You
> might lose handling of --gst command line options, but that's
> probably a good thing.
I thought about that. However, the problem then becomes knowing whether
it's appropriate for my library to call gst_deinit. I shouldn't call it
if the user may be using gstreamer elsewhere after shutting down my
library. (Right?)
--
Braden McDaniel e-mail: <braden at endoframe.com>
<http://endoframe.com> Jabber: <braden at jabber.org>
More information about the gstreamer-devel
mailing list