class_docstr: Handle a pipe of processors
  Attributes:
      processor: List of all processors in the Process pipe
      results : Dictionnary of Results Container from all the analyzers
                in the Pipe process
class_docstr_tok: ["Handle","a","pipe","of","processors","Attributes",":","processor",":","List","of","all","processors","in","the","Process","pipe","results",":","Dictionnary","of","Results","Container","from","all","the","analyzers","in","the","Pipe","process"]
docstr: Setup/reset all processors in cascade
code: def run(
      self,
      channels=None,
      samplerate=None,
      blocksize=None,
  ):
      """Setup/reset all processors in cascade"""
  
      source = self.processors[0]
      items = self.processors[1:]
  
      # Check if any processor in items need to force the samplerate
      force_samplerate = set(
          [
              item.force_samplerate
              for item in items
              if item.force_samplerate
          ]
      )
      if force_samplerate:
          if len(force_samplerate) > 1:
              raise ValueError(
                  "Some processors specify different samplerate"
              )
          force_samplerate = force_samplerate.pop()
  
          if samplerate and samplerate != force_samplerate:
              raise ValueError(
                  "A processor try to force the samplerate"
              )
  
          samplerate = force_samplerate
  
      source.setup(
          channels=channels, samplerate=samplerate, blocksize=blocksize
      )
      source.SIG_STOP = False
      last = source
  
      # setup/reset processors and configure properties throughout the pipe
      for item in items:
          item.source_mediainfo = source.mediainfo()
          item.setup(
              channels=last.channels(),
              samplerate=last.samplerate(),
              blocksize=last.blocksize(),
              totalframes=last.totalframes(),
          )
          self._register_streamer(item)
          last = item
  
      # now stream audio data along the pipe
      if self._stream_thread:
          self._running_cond.acquire()
      self._is_running = True
      if self._stream_thread:
          self._running_cond.notify()
          self._running_cond.release()
  
      eod = False
  
      if source.id() == "live_decoder":
          # Set handler for Interruption signal
          import signal
  
          def signal_handler(signum, frame):
              source.stop()
  
          signal.signal(signal.SIGINT, signal_handler)
  
      for item in items:
          item.start_time = datetime.datetime.utcnow()
  
      while not eod:
          frames, eod = source.process()
          for item in items:
              frames, eod = item.process(frames, eod)
  
      if source.id() == "live_decoder":
          # Restore default handler for Interruption signal
          signal.signal(signal.SIGINT, signal.SIG_DFL)
  
      # Post-processing
      for item in items:
          item.post_process()
  
      # Release source
      source.release()
      # Release processors
      for item in items:
          item.release()
          item.run_time = datetime.datetime.utcnow() - item.start_time
  
      self._is_running = False
  
imports: from .component import Component, MetaComponent, abstract
  from .component import implements, implementations, interfacedoc
  from .api import IProcessor
  from .exceptions import Error, PIDError, ApiError
  from .tools.parameters import HasParam
  import re
  import datetime
  import numpy
  import uuid
  import networkx
  import inspect
  import os
  import csv
  import sys
label_desc: Use image node_id 8 for calling the ProcessPipe obj's underlying member method code with example usage: obj.run(channels, samplerate, blocksize) without return types