Thanks a lot.<br><br><br><div class="gmail_quote">On Sun, Sep 9, 2012 at 11:19 AM, José Alburquerque <span dir="ltr"><<a href="mailto:jaalburquerque@cox.net" target="_blank">jaalburquerque@cox.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, 2012-09-09 at 09:46 +0300, Jiergir Ogoerg wrote:<br>
> Thanks,<br>
> To my desktop app startup time is critical, so, if I switch to the Gst<br>
> C interface do you think the gst_init() would never take longer than<br>
> say 200 milliseconds? Or is it nonetheless possible for it to take<br>
> much longer like over 1-2 seconds in some cases?<br>
<br>
</div>Actually, I think I spoke too soon in my last post.<br>
<br>
I was just thinking things through more thoroughly and since plug-in<br>
types are not accessible in C.  It may be possible to register the<br>
wrapping functions for these plug-in types later (when they are<br>
constructed) and not at startup (in Gst::init()) since it is not<br>
possible to have these plug-in types from some C code and then try to<br>
wrap them in a C++ wrapper which is why we go through the process of<br>
loading the plug-ins and registering the wrapping functions in the first<br>
place.  It may not even be necessary to register wrapping functions for<br>
these plug-in types.<br>
<br>
If the above is so, startup time (Gst::init()) will probably never be<br>
more than the 100ms you mentioned.<br>
<br>
I'll be looking into this this week at the end of which a new release<br>
should be out.  If it this is doable, I'll include it in that release.<br>
<br>
In the meanwhile, however, I'm sure that using C will never have such a<br>
slow start-up time.  gst_init() does not load all the possible plug-ins<br>
as gstreamermm does right now.<br>
<div class="HOEnZb"><div class="h5">><br>
><br>
> On Sun, Sep 9, 2012 at 7:37 AM, José Alburquerque<br>
> <<a href="mailto:jaalburquerque@cox.net">jaalburquerque@cox.net</a>> wrote:<br>
>         On Sat, 2012-09-08 at 13:19 +0300, Jiergir Ogoerg wrote:<br>
>         > Hi,<br>
>         > Gst::init() takes like 100+ ms, on rare occasions it takes<br>
>         even<br>
>         > longer, like over 2-4 seconds. Is it normal?<br>
><br>
><br>
>         Probably.  The reason is that Gst::init() not only initializes<br>
>         GStreamer, it also initializes glibmm (which it relies on) and<br>
>         registers<br>
>         methods that wrap C types to correct C++ types for all the<br>
>         GStreamer<br>
>         GObject and GstMiniObject derived types and all the GStreamer<br>
>         plug-in<br>
>         types that gstreamermm makes available to be used in a C++<br>
>         way.  In the<br>
>         process, it must load all the plug-ins that gstreamermm makes<br>
>         available<br>
>         (this is probably the most time consuming part though only for<br>
>         the<br>
>         execution for which the plug-ins have not been loaded; the<br>
>         rest of the<br>
>         executions wont experience so much a delay).  We know of no<br>
>         other way to<br>
>         ensure that the C objects handled are correctly differentiated<br>
>         and<br>
>         treated as appropriate C++ classes.<br>
><br>
>         ><br>
>         > To combat this I do Gst::init() in another pthread for my<br>
>         gui app to<br>
>         > show up instantly as usually.<br>
>         ><br>
>         > Using Ubuntu 12.04 amd64.<br>
>         > Intel Core i5.<br>
><br>
>         > _______________________________________________<br>
>         > gstreamer-devel mailing list<br>
>         > <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
>         ><br>
>         <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
>         --<br>
>         José<br>
><br>
>         _______________________________________________<br>
>         gstreamer-devel mailing list<br>
>         <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
>         <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
><br>
><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
--<br>
José<br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br>