mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-09 00:45:56 +00:00
gst/: log distributing clocks and base time
Original commit message from CVS: * gst/gst.c: (init_pre): * gst/gstbin.c: (gst_bin_add_func): log distributing clocks and base time * gst/gstregistry.c: (gst_registry_add_plugin), (gst_registry_scan_path_level), (gst_registry_scan_path): clean up the debugging output a little * gst/gstutils.c: (gst_element_state_get_name): warn about a memleak (I've actually seen this be used, though it was probably a bug)
This commit is contained in:
parent
3796744baf
commit
80ca485dad
5 changed files with 35 additions and 13 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-10-08 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* gst/gst.c: (init_pre):
|
||||
* gst/gstbin.c: (gst_bin_add_func):
|
||||
log distributing clocks and base time
|
||||
* gst/gstregistry.c: (gst_registry_add_plugin),
|
||||
(gst_registry_scan_path_level), (gst_registry_scan_path):
|
||||
clean up the debugging output a little
|
||||
* gst/gstutils.c: (gst_element_state_get_name):
|
||||
warn about a memleak (I've actually seen this be used, though
|
||||
it was probably a bug)
|
||||
|
||||
2005-10-07 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasesrc.c: (gst_base_src_class_init),
|
||||
|
|
|
@ -591,7 +591,7 @@ init_pre (void)
|
|||
/* This is the earliest we can make stuff show up in the logs.
|
||||
* So give some useful info about GStreamer here */
|
||||
GST_INFO ("Initializing GStreamer Core Library version %s", VERSION);
|
||||
GST_INFO ("Using library from %s", LIBDIR);
|
||||
GST_INFO ("Using library installed in %s", LIBDIR);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -477,7 +477,10 @@ gst_bin_add_func (GstBin * bin, GstElement * element)
|
|||
gst_element_set_bus (element, bin->child_bus);
|
||||
|
||||
/* propagate the current base time and clock */
|
||||
GST_DEBUG_OBJECT (element, "setting base time %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (GST_ELEMENT (bin)->base_time));
|
||||
gst_element_set_base_time (element, GST_ELEMENT (bin)->base_time);
|
||||
GST_DEBUG_OBJECT (element, "setting clock %p", GST_ELEMENT_CLOCK (bin));
|
||||
gst_element_set_clock (element, GST_ELEMENT_CLOCK (bin));
|
||||
|
||||
GST_UNLOCK (bin);
|
||||
|
|
|
@ -291,14 +291,15 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin)
|
|||
GST_LOCK (registry);
|
||||
existing_plugin = gst_registry_lookup_locked (registry, plugin->filename);
|
||||
if (existing_plugin) {
|
||||
GST_DEBUG
|
||||
("Replacing existing plugin %p with new plugin %p for filename \"%s\"",
|
||||
GST_DEBUG_OBJECT (registry,
|
||||
"Replacing existing plugin %p with new plugin %p for filename \"%s\"",
|
||||
existing_plugin, plugin, plugin->filename);
|
||||
registry->plugins = g_list_remove (registry->plugins, existing_plugin);
|
||||
gst_object_unref (existing_plugin);
|
||||
}
|
||||
|
||||
GST_DEBUG ("adding plugin %p for filename \"%s\"", plugin, plugin->filename);
|
||||
GST_DEBUG_OBJECT (registry, "adding plugin %p for filename \"%s\"",
|
||||
plugin, plugin->filename);
|
||||
|
||||
registry->plugins = g_list_prepend (registry->plugins, plugin);
|
||||
|
||||
|
@ -306,7 +307,8 @@ gst_registry_add_plugin (GstRegistry * registry, GstPlugin * plugin)
|
|||
gst_object_sink (plugin);
|
||||
GST_UNLOCK (registry);
|
||||
|
||||
GST_DEBUG ("emitting plugin-added for filename %s", plugin->filename);
|
||||
GST_DEBUG_OBJECT (registry, "emitting plugin-added for filename %s",
|
||||
plugin->filename);
|
||||
g_signal_emit (G_OBJECT (registry), gst_registry_signals[PLUGIN_ADDED], 0,
|
||||
plugin);
|
||||
|
||||
|
@ -656,27 +658,29 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
|
|||
while ((dirent = g_dir_read_name (dir))) {
|
||||
filename = g_strjoin ("/", path, dirent, NULL);
|
||||
|
||||
GST_DEBUG ("examining file: %s", filename);
|
||||
GST_LOG_OBJECT (registry, "examining file: %s", filename);
|
||||
|
||||
if (g_file_test (filename, G_FILE_TEST_IS_DIR)) {
|
||||
if (level > 0) {
|
||||
GST_DEBUG ("found directory, recursing");
|
||||
GST_LOG_OBJECT (registry, "found directory, recursing");
|
||||
gst_registry_scan_path_level (registry, filename, level - 1);
|
||||
} else {
|
||||
GST_DEBUG ("found directory, but recursion level is too deep");
|
||||
GST_LOG_OBJECT (registry,
|
||||
"found directory, but recursion level is too deep");
|
||||
}
|
||||
g_free (filename);
|
||||
continue;
|
||||
}
|
||||
if (!g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
|
||||
GST_DEBUG ("not a regular file, ignoring");
|
||||
GST_LOG_OBJECT (registry, "not a regular file, ignoring");
|
||||
g_free (filename);
|
||||
continue;
|
||||
}
|
||||
if (!g_str_has_suffix (filename, ".so") &&
|
||||
!g_str_has_suffix (filename, ".dll") &&
|
||||
!g_str_has_suffix (filename, ".dynlib")) {
|
||||
GST_DEBUG ("extension is not recognized as module file, ignoring");
|
||||
GST_LOG_OBJECT (registry,
|
||||
"extension is not recognized as module file, ignoring");
|
||||
g_free (filename);
|
||||
continue;
|
||||
}
|
||||
|
@ -693,11 +697,12 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
|
|||
|
||||
if (plugin->file_mtime == file_status.st_mtime &&
|
||||
plugin->file_size == file_status.st_size) {
|
||||
GST_DEBUG ("file %s cached", filename);
|
||||
GST_DEBUG_OBJECT (registry, "file %s cached", filename);
|
||||
plugin->flags &= ~GST_PLUGIN_FLAG_CACHED;
|
||||
} else {
|
||||
GST_DEBUG ("cached info for %s is stale", filename);
|
||||
GST_DEBUG ("mtime %ld != %ld or size %" G_GSIZE_FORMAT " != %"
|
||||
GST_INFO_OBJECT (registry, "cached info for %s is stale", filename);
|
||||
GST_DEBUG_OBJECT (registry, "mtime %ld != %ld or size %"
|
||||
G_GSIZE_FORMAT " != %"
|
||||
G_GSIZE_FORMAT, plugin->file_mtime, file_status.st_mtime,
|
||||
plugin->file_size, file_status.st_size);
|
||||
gst_registry_remove_plugin (gst_registry_get_default (), plugin);
|
||||
|
@ -731,6 +736,7 @@ gst_registry_scan_path_level (GstRegistry * registry, const gchar * path,
|
|||
void
|
||||
gst_registry_scan_path (GstRegistry * registry, const gchar * path)
|
||||
{
|
||||
GST_DEBUG_OBJECT (registry, "scanning path %s", path);
|
||||
gst_registry_scan_path_level (registry, path, 10);
|
||||
}
|
||||
|
||||
|
|
|
@ -769,6 +769,7 @@ gst_element_state_get_name (GstState state)
|
|||
return "PAUSED";
|
||||
break;
|
||||
default:
|
||||
/* This is a memory leak */
|
||||
return g_strdup_printf ("UNKNOWN!(%d)", state);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue