Class AbstractVideoCodec

java.lang.Object
org.monte.media.av.AbstractCodec
org.monte.media.av.codec.video.AbstractVideoCodec
All Implemented Interfaces:
Codec
Direct Known Subclasses:
AnimationCodec, ColorAdjustCodec, DIBCodec, FFRtoVFRConverter, FrameRateConverter, JPEGCodec, PNGCodec, RawCodec, RunLengthCodec, ScaleImageCodec, TechSmithCodec, ZMBVCodec

public abstract class AbstractVideoCodec extends AbstractCodec
AbstractVideoCodec.
Author:
Werner Randelshofer
  • Constructor Details

    • AbstractVideoCodec

      public AbstractVideoCodec(Format[] supportedInputFormats, Format[] supportedOutputFormats)
  • Method Details

    • getIndexed8

      protected byte[] getIndexed8(Buffer buf)
      Gets 8-bit indexed pixels from a buffer. Returns null if conversion failed.
    • getColorModel

      protected ColorModel getColorModel(Buffer buf)
    • getRGB15

      protected short[] getRGB15(Buffer buf)
      Gets 15-bit RGB pixels from a buffer. Returns null if conversion failed.
    • getRGB16

      protected short[] getRGB16(Buffer buf)
      Gets 16-bit RGB-5-6-5 pixels from a buffer. Returns null if conversion failed.
    • getRGB24

      protected int[] getRGB24(Buffer buf)
      Gets 24-bit RGB pixels from a buffer. Returns null if conversion failed.
    • getARGB32

      protected int[] getARGB32(Buffer buf)
      Gets 32-bit ARGB pixels from a buffer. Returns null if conversion failed.
    • getBufferedImage

      protected BufferedImage getBufferedImage(Buffer buf)
      Gets a buffered image from a buffer. Returns null if conversion failed.
    • writeInt24

      protected void writeInt24(ImageOutputStream out, int v) throws IOException
      Throws:
      IOException
    • writeInt24LE

      protected void writeInt24LE(ImageOutputStream out, int v) throws IOException
      Throws:
      IOException
    • writeInts24

      protected void writeInts24(ImageOutputStream out, int[] i, int off, int len) throws IOException
      Throws:
      IOException
    • writeInts24LE

      protected void writeInts24LE(ImageOutputStream out, int[] i, int off, int len) throws IOException
      Throws:
      IOException
    • copyImage

      protected static BufferedImage copyImage(BufferedImage img)
      Copies a buffered image.