mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 09:41:07 +00:00
stats: Adapt to new serialization of enums
GStreamer 1.18 changed the serialization of enums. This patch updates gsttr-stats.py to handle the new format. In absence of that, the script was failing like this: ``` Traceback (most recent call last): File "/home/ntrrgc/Apps/gstreamer/./subprojects/gst-devtools/tracer/gsttr-stats.py", line 224, in <module> runner.run() File "/home/ntrrgc/Apps/gstreamer/subprojects/gst-devtools/tracer/tracer/analysis_runner.py", line 42, in run self.handle_tracer_entry(event) File "/home/ntrrgc/Apps/gstreamer/subprojects/gst-devtools/tracer/tracer/analysis_runner.py", line 27, in handle_tracer_entry analyzer.handle_tracer_entry(event) File "/home/ntrrgc/Apps/gstreamer/./subprojects/gst-devtools/tracer/gsttr-stats.py", line 114, in handle_tracer_entry key = (_SCOPE_RELATED_TO[sv.values['related-to']] + ":" + str(s.values[sk])) KeyError: 'thread' ``` Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4155>
This commit is contained in:
parent
85b6625150
commit
ac6a457614
1 changed files with 10 additions and 0 deletions
|
@ -30,6 +30,16 @@ logging.basicConfig(level=logging.WARNING)
|
|||
logger = logging.getLogger('gsttr-stats')
|
||||
|
||||
_SCOPE_RELATED_TO = {
|
||||
# The serialization of enums changed in GStreamer 1.18:
|
||||
# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/0dafe6e63971ea89a9a9ff9cf30f5a076f915259
|
||||
|
||||
# Enum nicks (new serialization)
|
||||
'pad': 'Pad',
|
||||
'element': 'Element',
|
||||
'thread': 'Thread',
|
||||
'process': 'Process',
|
||||
|
||||
# Enum names (old serialization):
|
||||
'GST_TRACER_VALUE_SCOPE_PAD': 'Pad',
|
||||
'GST_TRACER_VALUE_SCOPE_ELEMENT': 'Element',
|
||||
'GST_TRACER_VALUE_SCOPE_THREAD': 'Thread',
|
||||
|
|
Loading…
Reference in a new issue