diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2016-09-28 21:19:29 +0200 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2016-09-28 21:19:29 +0200 |
commit | 9e4e2b5542beb6864cc1124408f2d04b311f83e1 (patch) | |
tree | e20f1f38d8f3b72e44323d413b6452f9569c1ff3 | |
parent | d783c9cf36f9916750fb810d5531cc77279e54d5 (diff) |
debug-viewer: initialize all features from tuples
Also add a first doc string about the plugin initialisation.
4 files changed, 8 insertions, 3 deletions
diff --git a/debug-viewer/GstDebugViewer/Plugins/ColorizeRows.py b/debug-viewer/GstDebugViewer/Plugins/ColorizeRows.py index d5f7483..6f2b690 100644 --- a/debug-viewer/GstDebugViewer/Plugins/ColorizeRows.py +++ b/debug-viewer/GstDebugViewer/Plugins/ColorizeRows.py @@ -62,4 +62,4 @@ class CategoryColorSentinel (object): class Plugin (PluginBase): - features = [ColorizeLevels, ColorizeCategories] + features = (ColorizeLevels, ColorizeCategories) diff --git a/debug-viewer/GstDebugViewer/Plugins/FindBar.py b/debug-viewer/GstDebugViewer/Plugins/FindBar.py index e9b2c3f..fbb15ae 100644 --- a/debug-viewer/GstDebugViewer/Plugins/FindBar.py +++ b/debug-viewer/GstDebugViewer/Plugins/FindBar.py @@ -491,4 +491,4 @@ class FindBarFeature (FeatureBase): class Plugin (PluginBase): - features = [FindBarFeature] + features = (FindBarFeature,) diff --git a/debug-viewer/GstDebugViewer/Plugins/Timeline.py b/debug-viewer/GstDebugViewer/Plugins/Timeline.py index a49fb4d..d226834 100644 --- a/debug-viewer/GstDebugViewer/Plugins/Timeline.py +++ b/debug-viewer/GstDebugViewer/Plugins/Timeline.py @@ -1101,7 +1101,7 @@ class TimelineState (Common.GUI.StateSection): class Plugin (PluginBase): - features = [TimelineFeature] + features = (TimelineFeature,) def __init__(self, app): diff --git a/debug-viewer/GstDebugViewer/Plugins/__init__.py b/debug-viewer/GstDebugViewer/Plugins/__init__.py index 7324caa..3e33797 100644 --- a/debug-viewer/GstDebugViewer/Plugins/__init__.py +++ b/debug-viewer/GstDebugViewer/Plugins/__init__.py @@ -76,6 +76,11 @@ class FeatureBase (object): class PluginBase (object): + """ + All plugins must implement a class called Plugin inheriting from PluginBase. + They should place a tuple of features they export into 'features'. Each + feature should be a subclass of FeatureBase. + """ features = () |