Class VideoCamera.PreAccessCodec

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

    public class VideoCamera.PreAccessCodec
    extends java.lang.Object
    implements javax.media.Codec
    A pass-through codec to access to individual frames.
    • Field Summary

      • Fields inherited from interface javax.media.PlugIn

        BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
    • Constructor Summary

      Constructors 
      Constructor Description
      PreAccessCodec()
      Construct a PreAccessCodec.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      In this class, do nothing.
      java.lang.Object getControl​(java.lang.String type)
      Get the control for a type.
      java.lang.Object[] getControls()
      Return the controls, in this case, an empty array of size 0.
      java.lang.String getName()
      Return the name of this codec.
      javax.media.Format[] getSupportedInputFormats()
      Return the supported input formats, which are YUV and RGB.
      javax.media.Format[] getSupportedOutputFormats​(javax.media.Format in)
      Return the supported output formats.
      void open()
      In this class, do nothing.
      int process​(javax.media.Buffer in, javax.media.Buffer out)
      Process a individual frame.
      void reset()
      In this class, do nothing.
      javax.media.Format setInputFormat​(javax.media.Format format)
      Set the input format.
      javax.media.Format setOutputFormat​(javax.media.Format format)
      Set the output format.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the name of this codec.
        Specified by:
        getName in interface javax.media.PlugIn
        Returns:
        Always return "Pre-Access Codec".
      • open

        public void open()
        In this class, do nothing.
        Specified by:
        open in interface javax.media.PlugIn
      • close

        public void close()
        In this class, do nothing.
        Specified by:
        close in interface javax.media.PlugIn
      • reset

        public void reset()
        In this class, do nothing.
        Specified by:
        reset in interface javax.media.PlugIn
      • getSupportedInputFormats

        public javax.media.Format[] getSupportedInputFormats()
        Return the supported input formats, which are YUV and RGB.
        Specified by:
        getSupportedInputFormats in interface javax.media.Codec
        Returns:
        the supported input formats.
      • getSupportedOutputFormats

        public javax.media.Format[] getSupportedOutputFormats​(javax.media.Format in)
        Return the supported output formats.
        Specified by:
        getSupportedOutputFormats in interface javax.media.Codec
        Parameters:
        in - The input format. If the input format is null, then YUV and RGB format are returned. If the input format is non-null, then it is returned.
        Returns:
        the supported output formats.
      • setInputFormat

        public javax.media.Format setInputFormat​(javax.media.Format format)
        Set the input format.
        Specified by:
        setInputFormat in interface javax.media.Codec
        Parameters:
        format - The input format.
        Returns:
        the input format.
      • setOutputFormat

        public javax.media.Format setOutputFormat​(javax.media.Format format)
        Set the output format.
        Specified by:
        setOutputFormat in interface javax.media.Codec
        Parameters:
        format - The output format.
        Returns:
        the output format.
      • process

        public int process​(javax.media.Buffer in,
                           javax.media.Buffer out)
        Process a individual frame.
        Specified by:
        process in interface javax.media.Codec
        Parameters:
        in - The input buffer.
        out - The output buffer.
        Returns:
        BUFFER_PROCESSED_OK if no exception was thrown.
      • getControls

        public java.lang.Object[] getControls()
        Return the controls, in this case, an empty array of size 0.
        Specified by:
        getControls in interface javax.media.Controls
        Returns:
        The controls.
      • getControl

        public java.lang.Object getControl​(java.lang.String type)
        Get the control for a type.
        Specified by:
        getControl in interface javax.media.Controls
        Parameters:
        type - The type, which is ignored.
        Returns:
        Always return null.