code: def start_pipeline(self, channels, samplerate):
      self.pipeline = Gst.parse_launch(self.pipe)
      # store a pointer to appsrc in our encoder object
      self.src = self.pipeline.get_by_name("src")
  
      if self.streaming:
          try:  # py3
              import queue
          except:  # py2
              import Queue as queue
          self._streaming_queue = queue.Queue(QUEUE_SIZE)
          # store a pointer to appsink in our encoder object
          self.app = self.pipeline.get_by_name("app")
          self.app.set_property("max-buffers", GST_APPSINK_MAX_BUFFERS)
          self.app.set_property("drop", False)
          self.app.set_property("emit-signals", True)
          self.app.connect("new-sample", self._on_new_sample_streaming)
          self.app.connect(
              "new-preroll", self._on_new_preroll_streaming
          )
  
      srccaps = Gst.Caps(
          """audio/x-raw,
              format=F32LE,
              layout=interleaved,
              channels=(int)%s,
              rate=(int)%d"""
          % (int(channels), int(samplerate))
      )
      self.src.set_property("caps", srccaps)
      self.src.set_property("emit-signals", True)
      self.src.set_property("num-buffers", -1)
      self.src.set_property("block", False)
      # self.src.set_property('do-timestamp', True)
  
      self.bus = self.pipeline.get_bus()
      self.bus.add_signal_watch()
      self.bus.connect("message", self._on_message_cb)
  
      self.mainloop = GLib.MainLoop()
      self.mainloopthread = MainloopThread(self.mainloop)
      self.mainloopthread.start()
  
      # start pipeline
      self.pipeline.set_state(Gst.State.PLAYING)
  
file_path: TimeSide/timeside/core/encoder.py
imports: from timeside.core import Processor, implements, interfacedoc, abstract
  from timeside.core.api import IEncoder
  from .tools.gstutils import numpy_array_to_gst_buffer, MainloopThread
  import gi
  from gi.repository import GLib, Gst
  import threading
label_desc: Use image node_id 4 for calling the GstEncoder obj's underlying member method code with example usage: obj.start_pipeline(channels, samplerate) without return types