Class FrameRecorder

java.lang.Object
io.antmedia.recorder.FrameRecorder
All Implemented Interfaces:
Closeable, AutoCloseable
Direct Known Subclasses:
FFmpegFrameRecorder

public abstract class FrameRecorder extends Object implements Closeable
Author:
Samuel Audet
  • Field Details

    • list

      public static final List<String> list
    • format

      protected String format
    • videoCodecName

      protected String videoCodecName
    • audioCodecName

      protected String audioCodecName
    • imageWidth

      protected int imageWidth
    • imageHeight

      protected int imageHeight
    • audioChannels

      protected int audioChannels
    • pixelFormat

      protected int pixelFormat
    • videoCodec

      protected int videoCodec
    • videoBitrate

      protected int videoBitrate
    • imageScalingFlags

      protected int imageScalingFlags
    • gopSize

      protected int gopSize
    • aspectRatio

      protected double aspectRatio
    • frameRate

      protected double frameRate
    • videoQuality

      protected double videoQuality
    • sampleFormat

      protected int sampleFormat
    • audioCodec

      protected int audioCodec
    • audioBitrate

      protected int audioBitrate
    • sampleRate

      protected int sampleRate
    • audioQuality

      protected double audioQuality
    • interleaved

      protected boolean interleaved
    • charset

      protected Charset charset
    • options

      protected Map<String,String> options
    • videoOptions

      protected Map<String,String> videoOptions
    • audioOptions

      protected Map<String,String> audioOptions
    • metadata

      protected Map<String,String> metadata
    • videoMetadata

      protected Map<String,String> videoMetadata
    • audioMetadata

      protected Map<String,String> audioMetadata
    • frameNumber

      protected int frameNumber
    • timestamp

      protected long timestamp
    • maxBFrames

      protected int maxBFrames
    • trellis

      protected int trellis
    • maxDelay

      protected int maxDelay
  • Constructor Details

    • FrameRecorder

      public FrameRecorder()
  • Method Details

    • init

      public static void init()
    • getDefault

      public static Class<? extends FrameRecorder> getDefault()
    • get

      public static Class<? extends FrameRecorder> get(String className) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • create

      public static FrameRecorder create(Class<? extends FrameRecorder> c, Class p, Object o, int w, int h) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • createDefault

      public static FrameRecorder createDefault(File file, int width, int height) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • createDefault

      public static FrameRecorder createDefault(String filename, int width, int height) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • create

      public static FrameRecorder create(String className, File file, int width, int height) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • create

      public static FrameRecorder create(String className, String filename, int width, int height) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • getFormat

      public String getFormat()
    • setFormat

      public void setFormat(String format)
    • getVideoCodecName

      public String getVideoCodecName()
    • setVideoCodecName

      public void setVideoCodecName(String videoCodecName)
    • getAudioCodecName

      public String getAudioCodecName()
    • setAudioCodecName

      public void setAudioCodecName(String audioCodecName)
    • getImageWidth

      public int getImageWidth()
    • setImageWidth

      public void setImageWidth(int imageWidth)
    • getImageHeight

      public int getImageHeight()
    • setImageHeight

      public void setImageHeight(int imageHeight)
    • getAudioChannels

      public int getAudioChannels()
    • setAudioChannels

      public void setAudioChannels(int audioChannels)
    • getPixelFormat

      public int getPixelFormat()
    • setPixelFormat

      public void setPixelFormat(int pixelFormat)
    • getVideoCodec

      public int getVideoCodec()
    • setVideoCodec

      public void setVideoCodec(int videoCodec)
    • getVideoBitrate

      public int getVideoBitrate()
    • setVideoBitrate

      public void setVideoBitrate(int videoBitrate)
    • getImageScalingFlags

      public int getImageScalingFlags()
    • setImageScalingFlags

      public void setImageScalingFlags(int imageScalingFlags)
    • getGopSize

      public int getGopSize()
    • setGopSize

      public void setGopSize(int gopSize)
    • getAspectRatio

      public double getAspectRatio()
    • setAspectRatio

      public void setAspectRatio(double aspectRatio)
    • getFrameRate

      public double getFrameRate()
    • setFrameRate

      public void setFrameRate(double frameRate)
    • getVideoQuality

      public double getVideoQuality()
    • setVideoQuality

      public void setVideoQuality(double videoQuality)
    • getSampleFormat

      public int getSampleFormat()
    • setSampleFormat

      public void setSampleFormat(int sampleFormat)
    • getAudioCodec

      public int getAudioCodec()
    • setAudioCodec

      public void setAudioCodec(int audioCodec)
    • getAudioBitrate

      public int getAudioBitrate()
    • setAudioBitrate

      public void setAudioBitrate(int audioBitrate)
    • getSampleRate

      public int getSampleRate()
    • setSampleRate

      public void setSampleRate(int sampleRate)
    • getAudioQuality

      public double getAudioQuality()
    • setAudioQuality

      public void setAudioQuality(double audioQuality)
    • isInterleaved

      public boolean isInterleaved()
    • setInterleaved

      public void setInterleaved(boolean interleaved)
    • getOptions

      public Map<String,String> getOptions()
    • setOptions

      public void setOptions(Map<String,String> options)
    • getVideoOptions

      public Map<String,String> getVideoOptions()
    • setVideoOptions

      public void setVideoOptions(Map<String,String> options)
    • getAudioOptions

      public Map<String,String> getAudioOptions()
    • setAudioOptions

      public void setAudioOptions(Map<String,String> options)
    • getMetadata

      public Map<String,String> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,String> metadata)
    • getVideoMetadata

      public Map<String,String> getVideoMetadata()
    • setVideoMetadata

      public void setVideoMetadata(Map<String,String> metadata)
    • getAudioMetadata

      public Map<String,String> getAudioMetadata()
    • setAudioMetadata

      public void setAudioMetadata(Map<String,String> metadata)
    • getOption

      public String getOption(String key)
    • setOption

      public void setOption(String key, String value)
    • getVideoOption

      public String getVideoOption(String key)
    • setVideoOption

      public void setVideoOption(String key, String value)
    • getAudioOption

      public String getAudioOption(String key)
    • setAudioOption

      public void setAudioOption(String key, String value)
    • getMetadata

      public String getMetadata(String key)
    • setMetadata

      public void setMetadata(String key, String value)
    • getVideoMetadata

      public String getVideoMetadata(String key)
    • setVideoMetadata

      public void setVideoMetadata(String key, String value)
    • getAudioMetadata

      public String getAudioMetadata(String key)
    • setAudioMetadata

      public void setAudioMetadata(String key, String value)
    • getFrameNumber

      public int getFrameNumber()
    • setFrameNumber

      public void setFrameNumber(int frameNumber)
    • getTimestamp

      public long getTimestamp()
    • setTimestamp

      public void setTimestamp(long timestamp)
    • getMaxBFrames

      public int getMaxBFrames()
    • setMaxBFrames

      public void setMaxBFrames(int maxBFrames)
    • getTrellis

      public int getTrellis()
    • setTrellis

      public void setTrellis(int trellis)
    • getMaxDelay

      public int getMaxDelay()
    • setMaxDelay

      public void setMaxDelay(int maxDelay)
    • start

      public abstract void start() throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • flush

      public abstract void flush() throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • stop

      public abstract void stop() throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • record

      public abstract void record(Frame frame) throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • release

      public abstract void release() throws FrameRecorder.Exception
      Throws:
      FrameRecorder.Exception
    • close

      public void close() throws FrameRecorder.Exception
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      FrameRecorder.Exception