[vlc-commits] objects: remove undocumented "tree" command
Rémi Denis-Courmont
git at videolan.org
Sat Apr 13 17:52:48 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 13 18:05:33 2019 +0300| [0143f10b7d3b1b46cfeafb7879e760f86afdd753] | committer: Rémi Denis-Courmont
objects: remove undocumented "tree" command
Like "vars", this is left-over from vlc_object_find_name().
See also 22442b4fe9ac4277c1a7b36be345ef5a93b0e8ad.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0143f10b7d3b1b46cfeafb7879e760f86afdd753
---
src/misc/objects.c | 36 ++----------------------------------
1 file changed, 2 insertions(+), 34 deletions(-)
diff --git a/src/misc/objects.c b/src/misc/objects.c
index c5db75e2c5..945ebffbc6 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -131,26 +131,6 @@ void DumpStructureLocked(vlc_object_t *obj, FILE *output, unsigned level)
DumpStructureLocked(vlc_externals(priv), output, level + 1);
}
-/**
- * Prints the VLC object tree
- *
- * This function prints either an ASCII tree showing the connections between
- * vlc objects, and additional information such as their refcount, thread ID,
- * etc. (command "tree"), or the same data as a simple list (command "list").
- */
-static int TreeCommand (vlc_object_t *obj, char const *cmd,
- vlc_value_t oldval, vlc_value_t newval, void *data)
-{
- (void) cmd; (void) oldval; (void) newval; (void) data;
-
- flockfile(stdout);
- vlc_mutex_lock(&tree_lock);
- DumpStructureLocked(obj, stdout, 0);
- vlc_mutex_unlock(&tree_lock);
- funlockfile(stdout);
- return VLC_SUCCESS;
-}
-
#undef vlc_custom_create
void *vlc_custom_create (vlc_object_t *parent, size_t length,
const char *typename)
@@ -194,12 +174,6 @@ void *vlc_custom_create (vlc_object_t *parent, size_t length,
else
{
obj->obj.no_interact = false;
-
- /* TODO: should be in src/libvlc.c */
- int canc = vlc_savecancel ();
- var_Create (obj, "tree", VLC_VAR_STRING | VLC_VAR_ISCOMMAND);
- var_AddCallback (obj, "tree", TreeCommand, NULL);
- vlc_restorecancel (canc);
}
return obj;
@@ -226,14 +200,7 @@ void (vlc_object_delete)(vlc_object_t *obj)
assert(priv->resources == NULL);
- int canc = vlc_savecancel();
-
- if (unlikely(priv->parent == NULL))
- {
- /* TODO: should be in src/libvlc.c */
- var_DelCallback(obj, "tree", TreeCommand, NULL);
- }
- else
+ if (likely(priv->parent != NULL))
{
vlc_mutex_lock(&tree_lock);
vlc_list_remove(&priv->list);
@@ -241,6 +208,7 @@ void (vlc_object_delete)(vlc_object_t *obj)
}
/* Destroy the associated variables. */
+ int canc = vlc_savecancel();
var_DestroyAll(obj);
vlc_restorecancel(canc);
More information about the vlc-commits
mailing list