Class Stream

java.lang.Object
com.github.kokorin.jaffree.ffmpeg.Stream

public class Stream extends Object
Represents audio/video stream.
See Also:
  • Constructor Details

    • Stream

      public Stream()
  • Method Details

    • getId

      public int getId()
      Returns:
      stream id
    • setId

      public Stream setId(int id)
      Parameters:
      id - stream id
      Returns:
      this
    • getType

      public Stream.Type getType()
      Returns:
      stream type
    • setType

      public Stream setType(Stream.Type type)
      Parameters:
      type - stream type
      Returns:
      this
    • getTimebase

      public Long getTimebase()
      Returns:
      stream timebase
    • setTimebase

      public Stream setTimebase(Long timebase)
      Parameters:
      timebase - stream timebase
      Returns:
      this
    • getWidth

      public Integer getWidth()
      Return stream width for video stream or null for other stream types.
      Returns:
      stream width
    • setWidth

      public Stream setWidth(int width)
      Parameters:
      width - stream width
      Returns:
      this
    • getHeight

      public Integer getHeight()
      Return stream height for video stream or null for other stream types.
      Returns:
      stream height
    • setHeight

      public Stream setHeight(int height)
      Parameters:
      height - stream width
      Returns:
      this
    • setResolution

      public Stream setResolution(int width, int height)
      Sets both width and height.
      Parameters:
      width - stream width
      height - stream height
      Returns:
      this
    • getSampleRate

      public Long getSampleRate()
      Returns stream sample rate for audio stream or null for other stream types.
      Returns:
      sample rate
    • setSampleRate

      public Stream setSampleRate(long sampleRate)
      Parameters:
      sampleRate - sample rate
      Returns:
      this
    • getChannels

      public Integer getChannels()
      Returns stream number of channels for audio stream or null for other stream types.
      Returns:
      number of channels
    • setChannels

      public Stream setChannels(int channels)
      Parameters:
      channels - number of audio channels.
      Returns:
      this
    • toString

      public String toString()
      Overrides:
      toString in class Object