Skip to content
Snippets Groups Projects
Commit 14e49f9d authored by Patrick Godwin's avatar Patrick Godwin
Browse files

feature_extractor.py: disable spectrum message handling for performance

parent 404708ba
No related branches found
No related tags found
No related merge requests found
......@@ -204,15 +204,18 @@ class MultiChannelHandler(simplehandler.Handler):
# it should ignore it. a return value of False means the
# parent class should do what it thinks should be done
#
if message.type == Gst.MessageType.ELEMENT:
if message.get_structure().get_name() == "spectrum":
# get the channel name & psd.
instrument, info = message.src.get_name().split("_", 1)
channel, _ = info.rsplit("_", 1)
psd = pipeio.parse_spectrum_message(message)
# save psd
self.psds[channel] = psd
return True
# FIXME: disable PSD handling as it is a significant
# cost in parsing a large number of channels. reconsider
# re-enabling in the future
#if message.type == Gst.MessageType.ELEMENT:
# if message.get_structure().get_name() == "spectrum":
# # get the channel name & psd.
# instrument, info = message.src.get_name().split("_", 1)
# channel, _ = info.rsplit("_", 1)
# psd = pipeio.parse_spectrum_message(message)
# # save psd
# self.psds[channel] = psd
# return True
return False
def bufhandler(self, elem, sink_dict):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment