Class VPXEncoder

  • All Implemented Interfaces:
    javax.media.Codec, javax.media.Controls, javax.media.PlugIn

    public class VPXEncoder
    extends AbstractCodec2
    Implements a VP8 encoder.
    Author:
    Boris Grozev
    • Constructor Detail

      • VPXEncoder

        public VPXEncoder()
        Initializes a new VPXEncoder instance.
    • Method Detail

      • doOpen

        protected void doOpen()
                       throws javax.media.ResourceUnavailableException
        Opens this Codec and acquires the resources that it needs to operate. A call to PlugIn.open() on this instance will result in a call to doOpen only if AbstractCodec.opened is false. All required input and/or output formats are assumed to have been set on this Codec before doOpen is called.
        Specified by:
        doOpen in class AbstractCodec2
        Throws:
        javax.media.ResourceUnavailableException
      • doProcess

        protected int doProcess​(javax.media.Buffer inputBuffer,
                                javax.media.Buffer outputBuffer)
        Encodes the frame in inputBuffer (in YUVFormat) into a VP8 frame (in outputBuffer)
        Specified by:
        doProcess in class AbstractCodec2
        Parameters:
        inputBuffer - input Buffer
        outputBuffer - output Buffer
        Returns:
        BUFFER_PROCESSED_OK if inBuffer has been successfully processed
      • getMatchingOutputFormats

        protected javax.media.Format[] getMatchingOutputFormats​(javax.media.Format inputFormat)
        Gets the matching output formats for a specific format.
        Overrides:
        getMatchingOutputFormats in class AbstractCodec2
        Parameters:
        inputFormat - input format
        Returns:
        array of formats matching input format
      • setInputFormat

        public javax.media.Format setInputFormat​(javax.media.Format format)
        Sets the input format.
        Specified by:
        setInputFormat in interface javax.media.Codec
        Overrides:
        setInputFormat in class AbstractCodec2
        Parameters:
        format - format to set
        Returns:
        format
      • setOutputFormat

        public javax.media.Format setOutputFormat​(javax.media.Format format)
        Sets the Format in which this Codec is to output media data.
        Specified by:
        setOutputFormat in interface javax.media.Codec
        Overrides:
        setOutputFormat in class AbstractCodec2
        Parameters:
        format - the Format in which this Codec is to output media data
        Returns:
        the Format in which this Codec is currently configured to output media data or null if format was found to be incompatible with this Codec