[v 0.10] Gst::init() is slow

José Alburquerque jaalburquerque at cox.net
Sat Sep 8 21:37:25 PDT 2012


On Sat, 2012-09-08 at 13:19 +0300, Jiergir Ogoerg wrote:
> Hi,
> Gst::init() takes like 100+ ms, on rare occasions it takes even
> longer, like over 2-4 seconds. Is it normal?

Probably.  The reason is that Gst::init() not only initializes
GStreamer, it also initializes glibmm (which it relies on) and registers
methods that wrap C types to correct C++ types for all the GStreamer
GObject and GstMiniObject derived types and all the GStreamer plug-in
types that gstreamermm makes available to be used in a C++ way.  In the
process, it must load all the plug-ins that gstreamermm makes available
(this is probably the most time consuming part though only for the
execution for which the plug-ins have not been loaded; the rest of the
executions wont experience so much a delay).  We know of no other way to
ensure that the C objects handled are correctly differentiated and
treated as appropriate C++ classes.

> 
> To combat this I do Gst::init() in another pthread for my gui app to
> show up instantly as usually.
> 
> Using Ubuntu 12.04 amd64.
> Intel Core i5.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
José



More information about the gstreamer-devel mailing list