Class MediaDecoder


public class MediaDecoder extends MediaFormat
Media Decoder. TODO : deprecate class New code should use MediaInput instead.
Author:
pquiring
  • Constructor Details

    • MediaDecoder

      public MediaDecoder()
  • Method Details

    • start

      public boolean start(MediaIO io, int new_width, int new_height, int new_chs, int new_freq, boolean seekable)
      Starts decoder.
      Parameters:
      io - = MediaIO interface
      new_width - = change video width during decoding (-1 = no change)
      new_height - = change video height during decoding (-1 = no change)
      new_chs - = change audio channels during decoding (-1 = no change)
      new_freq - = change audio frequency during decoding (-1 = no change)
      seekable - = do you need to seek position during playback?
    • startFile

      public boolean startFile(String file, String format, int new_width, int new_height, int new_chs, int new_freq)
      Starts decoder.
      Parameters:
      file - = file to write to.
      format - = format of file (see MediaCoder.AV_FORMAT_...) (NULL = auto detect)
      new_width - = change video width during decoding (-1 = no change)
      new_height - = change video height during decoding (-1 = no change)
      new_chs - = change audio channels during decoding (-1 = no change)
      new_freq - = change audio frequency during decoding (-1 = no change)
    • stop

      public void stop()
    • read

      public int read()
    • getVideo

      public int[] getVideo()
    • getAudio

      public short[] getAudio()
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getFrameRate

      public float getFrameRate()
    • getDuration

      public long getDuration()
    • getSampleRate

      public int getSampleRate()
    • getChannels

      public int getChannels()
    • getBitsPerSample

      public int getBitsPerSample()
    • seek

      public boolean seek(long seconds)
    • getVideoBitRate

      public int getVideoBitRate()
      Overrides:
      getVideoBitRate in class MediaFormat
    • getAudioBitRate

      public int getAudioBitRate()
      Overrides:
      getAudioBitRate in class MediaFormat
    • isKeyFrame

      public boolean isKeyFrame()
    • resize

      public boolean resize(int newWidth, int newHeight)