Interface MediaAPI

All Known Implementing Classes:
MediaFFM, MediaJNI

public interface MediaAPI
  • Method Details

    • getInstance

      static MediaAPI getInstance()
    • mediaLoadLibs

      boolean mediaLoadLibs(String codec, String device, String filter, String format, String util, String scale, String postproc, String resample)
    • mediaSetLogging

      void mediaSetLogging(boolean state)
    • getVideoStream

      int getVideoStream(long ctx)
    • getAudioStream

      int getAudioStream(long ctx)
    • getVideoCodecID

      int getVideoCodecID(long ctx)
    • getAudioCodecID

      int getAudioCodecID(long ctx)
    • getVideoBitRate

      int getVideoBitRate(long ctx)
    • getAudioBitRate

      int getAudioBitRate(long ctx)
    • inputOpenFile

      long inputOpenFile(String file, String format)
    • inputOpenIO

      long inputOpenIO(MediaIO io)
    • getDuration

      long getDuration(long ctx)
    • getVideoWidth

      int getVideoWidth(long ctx)
    • getVideoHeight

      int getVideoHeight(long ctx)
    • getVideoFrameRate

      float getVideoFrameRate(long ctx)
    • getVideoKeyFrameInterval

      int getVideoKeyFrameInterval(long ctx)
    • getAudioChannels

      int getAudioChannels(long ctx)
    • getAudioSampleRate

      int getAudioSampleRate(long ctx)
    • inputClose

      boolean inputClose(long ctx, MediaIO io)
    • inputOpenVideo

      boolean inputOpenVideo(long ctx, MediaIO io, int width, int height)
    • inputOpenAudio

      boolean inputOpenAudio(long ctx, MediaIO io, int chs, int freq)
    • inputRead

      int inputRead(long ctx, MediaIO io)
    • getPacketKeyFrame

      boolean getPacketKeyFrame(long ctx)
    • getPacketData

      int getPacketData(long ctx, byte[] data, int offset, int length)
    • inputSeek

      boolean inputSeek(long ctx, MediaIO io, long seconds)
    • outputCreateFile

      long outputCreateFile(String file, String format)
    • outputCreateIO

      long outputCreateIO(MediaIO io, String format)
    • addVideoStream

      int addVideoStream(long ctx, MediaIO io, int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval)
    • addAudioStream

      int addAudioStream(long ctx, MediaIO io, int codec_id, int bit_rate, int chs, int freq)
    • outputClose

      boolean outputClose(long ctx, MediaIO io)
    • writeHeader

      boolean writeHeader(long ctx, MediaIO io)
    • writePacket

      boolean writePacket(long ctx, MediaIO io, int stream, byte[] data, int offset, int length, boolean keyFrame)
    • audioDecoderStart

      long audioDecoderStart(int codec_id, int new_chs, int new_freq)
    • audioDecoderStop

      void audioDecoderStop(long ctx)
    • audioDecoderDecode

      short[] audioDecoderDecode(long ctx, byte[] data, int offset, int length)
    • audioDecoderGetChannels

      int audioDecoderGetChannels(long ctx)
    • audioDecoderGetSampleRate

      int audioDecoderGetSampleRate(long ctx)
    • audioDecoderChange

      boolean audioDecoderChange(long ctx, int chs, int freq)
    • audioEncoderStart

      long audioEncoderStart(int codec_id, int bit_rate, int chs, int freq)
    • audioEncoderStop

      void audioEncoderStop(long ctx)
    • audioEncoderEncode

      byte[] audioEncoderEncode(long ctx, short[] samples, int offset, int length)
    • audioEncoderGetAudioFramesize

      int audioEncoderGetAudioFramesize(long ctx)
    • videoDecoderStart

      long videoDecoderStart(int codec_id, int new_width, int new_height)
    • videoDecoderStop

      void videoDecoderStop(long ctx)
    • videoDecoderDecode

      int[] videoDecoderDecode(long ctx, byte[] data, int offset, int length)
    • videoDecoderGetWidth

      int videoDecoderGetWidth(long ctx)
    • videoDecoderGetHeight

      int videoDecoderGetHeight(long ctx)
    • videoDecoderGetFrameRate

      float videoDecoderGetFrameRate(long ctx)
    • videoDecoderChange

      boolean videoDecoderChange(long ctx, int width, int height)
    • videoEncoderStart

      long videoEncoderStart(int codec_id, int bit_rate, int width, int height, float fps, int keyFrameInterval)
    • videoEncoderStop

      void videoEncoderStop(long ctx)
    • videoEncoderEncode

      byte[] videoEncoderEncode(long ctx, int[] px, int offset, int length)
    • compareFrames

      float compareFrames(int[] frame1, int[] frame2, int width, int height)