Class StreamBandwidthController

java.lang.Object
org.red5.server.stream.filter.StreamBandwidthController
All Implemented Interfaces:
Runnable, IConsumer, IFilter, IMessageComponent, IPipeConnectionListener, IProvider

public class StreamBandwidthController extends Object implements IFilter, IPipeConnectionListener, Runnable
Controls stream bandwidth
  • Field Details

    • log

      private static final org.slf4j.Logger log
      Logger
    • KEY

      public static final String KEY
      Class name
    • providerPipe

      private IPipe providerPipe
      Stream provider pipe
    • consumerPipe

      private IPipe consumerPipe
      Stream consumer pipe
    • puller

      private Thread puller
      Daemon thread that pulls data from provider and pushes to consumer, using this controller
    • isStarted

      private volatile boolean isStarted
      Start state
  • Constructor Details

    • StreamBandwidthController

      public StreamBandwidthController()
  • Method Details

    • onPipeConnectionEvent

      public void onPipeConnectionEvent(PipeConnectionEvent event)
      Pipe connection event handler
      Specified by:
      onPipeConnectionEvent in interface IPipeConnectionListener
      Parameters:
      event - Pipe connection event
    • onOOBControlMessage

      public void onOOBControlMessage(IMessageComponent source, IPipe pipe, OOBControlMessage oobCtrlMsg)
      Specified by:
      onOOBControlMessage in interface IMessageComponent
      Parameters:
      source - Message component source
      pipe - Connection pipe
      oobCtrlMsg - Out-of-band control message
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • start

      public void start()
      Start pulling (streaming)
    • close

      public void close()
      Stop pulling, close stream
    • startThread

      private void startThread()
      Start puller thread