mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
added plugin_desc structures to libs, which makes their locations cached in the registry. this speeds plugin loading ...
Original commit message from CVS: * added plugin_desc structures to libs, which makes their locations cached in the registry. this speeds plugin loading considerably, especially on uninstalled versions. * put the lib path before all others, for speed reasons. * some fixes to adder's caps. * added linefeeds (\n) to GST_DEBUG strings to match GST_INFO behavior. this is more sane. all code will need to be converted. i think some perl can do this.
This commit is contained in:
parent
f2f4a44569
commit
c12c39d37c
6 changed files with 72 additions and 10 deletions
|
@ -207,11 +207,11 @@ gst_default_debug_handler (gint category, gboolean incore,
|
|||
|
||||
#ifdef GST_DEBUG_COLOR
|
||||
fprintf(stderr,"DEBUG(\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033["
|
||||
"%s;%sm%s%s\033[00m %s",
|
||||
"%s;%sm%s%s\033[00m %s\n",
|
||||
pthread_color,pthread_id,cothread_color,cothread_id,incore?"00":"01",
|
||||
_gst_category_colors[category],location,elementname,string);
|
||||
#else
|
||||
fprintf(stderr,"DEBUG(%5d:%2d)%s%s %s",
|
||||
fprintf(stderr,"DEBUG(%5d:%2d)%s%s %s\n",
|
||||
pthread_id,cothread_id,location,elementname,string);
|
||||
#endif /* GST_DEBUG_COLOR */
|
||||
|
||||
|
|
|
@ -71,9 +71,6 @@ _gst_plugin_initialize (void)
|
|||
gst_plugin_register_statics (main_module);
|
||||
|
||||
#ifdef PLUGINS_USE_BUILDDIR
|
||||
/* the library directory */
|
||||
gst_plugin_default_paths = g_list_prepend (gst_plugin_default_paths,
|
||||
PLUGINS_BUILDDIR "/libs/gst");
|
||||
/* location libgstelements.so */
|
||||
gst_plugin_default_paths = g_list_prepend (gst_plugin_default_paths,
|
||||
PLUGINS_BUILDDIR "/gst/elements");
|
||||
|
@ -103,6 +100,10 @@ _gst_plugin_initialize (void)
|
|||
if (_gst_warn_old_registry)
|
||||
g_warning ("gstplugin: registry needs rebuild: run gst-register\n");
|
||||
_gst_plugin_paths = g_list_concat (_gst_plugin_paths, gst_plugin_default_paths);
|
||||
#ifdef PLUGINS_USE_BUILDDIR
|
||||
/* we prepend the lib dir first for performance reasons */
|
||||
_gst_plugin_paths = g_list_prepend (_gst_plugin_paths, PLUGINS_BUILDDIR "/libs/gst");
|
||||
#endif
|
||||
gst_plugin_load_all ();
|
||||
/* gst_plugin_unload_all (); */
|
||||
return;
|
||||
|
@ -277,7 +278,7 @@ gst_plugin_load_all (void)
|
|||
|
||||
path = _gst_plugin_paths;
|
||||
while (path != NULL) {
|
||||
GST_INFO (GST_CAT_PLUGIN_LOADING,"loading plugins from %s",(gchar *)path->data);
|
||||
GST_DEBUG (GST_CAT_PLUGIN_LOADING,"loading plugins from %s",(gchar *)path->data);
|
||||
gst_plugin_load_recurse(path->data,NULL);
|
||||
path = g_list_next(path);
|
||||
}
|
||||
|
@ -422,7 +423,7 @@ gst_plugin_load_absolute (const gchar *filename)
|
|||
|
||||
g_return_val_if_fail (filename != NULL, FALSE);
|
||||
|
||||
GST_INFO (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" absolute loading", filename);
|
||||
GST_DEBUG (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" absolute loading", filename);
|
||||
|
||||
while (plugins) {
|
||||
GstPlugin *testplugin = (GstPlugin *)plugins->data;
|
||||
|
@ -501,10 +502,10 @@ gst_plugin_load_plugin (GstPlugin *plugin)
|
|||
|
||||
filename = plugin->filename;
|
||||
|
||||
GST_INFO (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" loading", filename);
|
||||
GST_DEBUG (GST_CAT_PLUGIN_LOADING, "plugin \"%s\" loading", filename);
|
||||
|
||||
if (g_module_supported () == FALSE) {
|
||||
g_warning("gstplugin: wow, you built this on a platform without dynamic loading???\n");
|
||||
g_warning ("gstplugin: wow, you built this on a platform without dynamic loading???\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -517,7 +518,7 @@ gst_plugin_load_plugin (GstPlugin *plugin)
|
|||
|
||||
if (module != NULL) {
|
||||
if (g_module_symbol (module, "plugin_desc", (gpointer *)&desc)) {
|
||||
GST_INFO (GST_CAT_PLUGIN_LOADING,"loading plugin \"%s\"...", filename);
|
||||
GST_DEBUG (GST_CAT_PLUGIN_LOADING,"loading plugin \"%s\"...", filename);
|
||||
|
||||
plugin->filename = g_strdup (filename);
|
||||
plugin = gst_plugin_register_func (desc, plugin, module);
|
||||
|
|
|
@ -473,3 +473,18 @@ gst_bytestream_print_status (GstByteStream * bs)
|
|||
bs_print ("STATUS: buffer starts at %d and is %d bytes long\n", GST_BUFFER_OFFSET (buf), GST_BUFFER_SIZE (buf));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
{
|
||||
gst_plugin_set_longname (plugin, "GstByteStream: a byte-oriented layer on top of buffer-passing");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"gstbytestream",
|
||||
plugin_init
|
||||
};
|
||||
|
|
|
@ -19,9 +19,24 @@
|
|||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/control/control.h>
|
||||
|
||||
void
|
||||
gst_control_init (int *argc, char **argv[]) {
|
||||
_gst_dpman_initialize ();
|
||||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
{
|
||||
gst_plugin_set_longname (plugin, "Dynamic Parameters");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"gstcontrol",
|
||||
plugin_init
|
||||
};
|
||||
|
|
|
@ -211,3 +211,18 @@ void gst_getbits_newbuf(gst_getbits_t *gb,unsigned char *buffer, unsigned long l
|
|||
/* gb->qword = 0; */
|
||||
#endif /* HAVE_LIBMMX */
|
||||
}
|
||||
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
{
|
||||
gst_plugin_set_longname (plugin, "Accelerated routines for getting bits from a data stream");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"gstgetbits",
|
||||
plugin_init
|
||||
};
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <gst/putbits/putbits.h>
|
||||
#include <gst/gstplugin.h>
|
||||
#include <gst/gstversion.h>
|
||||
|
||||
/* initialize buffer, call once before first putbits or alignbits */
|
||||
void gst_putbits_init(gst_putbits_t *pb)
|
||||
|
@ -99,3 +101,17 @@ int gst_putbits_bitcount(gst_putbits_t *pb)
|
|||
{
|
||||
return 8*pb->bytecnt + (8-pb->outcnt);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
{
|
||||
gst_plugin_set_longname (plugin, "Accelerated routines for putting bits into a data stream");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"gstputbits",
|
||||
plugin_init
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue