Class FileStreamSource

java.lang.Object
org.red5.server.stream.FileStreamSource
All Implemented Interfaces:
Constants, ISeekableStreamSource, IStreamSource

public class FileStreamSource extends Object implements ISeekableStreamSource, Constants
Represents stream source that is file
  • Field Details

  • Constructor Details

    • FileStreamSource

      public FileStreamSource(ITagReader reader)
      Creates file stream source with tag reader
      Parameters:
      reader - Tag reader
  • Method Details

    • close

      public void close()
      Closes tag reader
      Specified by:
      close in interface IStreamSource
    • dequeue

      public IRTMPEvent dequeue()
      Get tag from queue and convert to message
      Specified by:
      dequeue in interface IStreamSource
      Returns:
      RTMP event
    • hasMore

      public boolean hasMore()
      Is there something more to stream?
      Specified by:
      hasMore in interface IStreamSource
      Returns:
       true
       
      if there's streamable data,
       false
       
      otherwise
    • seek

      public int seek(int ts)
      Seek the stream source to timestamp ts (in milliseconds).
      Specified by:
      seek in interface ISeekableStreamSource
      Parameters:
      ts - Timestamp to seek to
      Returns:
      Actual timestamp seeked to