Class MovieMaker.AWTImageSourceStream

  • All Implemented Interfaces:
    javax.media.Controls, javax.media.protocol.Controls, javax.media.protocol.PullBufferStream, javax.media.protocol.SourceStream
    Enclosing class:
    MovieMaker

    private static class MovieMaker.AWTImageSourceStream
    extends java.lang.Object
    implements javax.media.protocol.PullBufferStream
    The java.awt.Image-based source stream to go along with ImageDataSource. Not sure yet if this class works.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean ended
      DOCUMENT ME!
      private int height
      DOCUMENT ME!
      private java.awt.Image[] images
      DOCUMENT ME!
      private int nextImage
      DOCUMENT ME!
      private long seqNo
      Bug fix from Forums - next one line.
      private javax.media.format.VideoFormat videoFormat
      DOCUMENT ME!
      private int width
      DOCUMENT ME!
      • Fields inherited from interface javax.media.protocol.SourceStream

        LENGTH_UNKNOWN
    • Constructor Summary

      Constructors 
      Constructor Description
      AWTImageSourceStream​(int width, int height, int frameRate, java.awt.Image[] images)
      Creates a new AWTImageSourceStream object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean endOfStream()
      DOCUMENT ME!
      javax.media.protocol.ContentDescriptor getContentDescriptor()
      DOCUMENT ME!
      long getContentLength()
      DOCUMENT ME!
      java.lang.Object getControl​(java.lang.String type)
      DOCUMENT ME!
      java.lang.Object[] getControls()
      DOCUMENT ME!
      javax.media.Format getFormat()
      Return the format of each video frame.
      void read​(javax.media.Buffer buf)
      This is called from the Processor to read a frame worth of video data.
      boolean willReadBlock()
      We should never need to block assuming data are read from files.
      • Methods inherited from class java.lang.Object

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

      • ended

        private boolean ended
        DOCUMENT ME!
      • images

        private final java.awt.Image[] images
        DOCUMENT ME!
      • nextImage

        private int nextImage
        DOCUMENT ME!
      • seqNo

        private long seqNo
        Bug fix from Forums - next one line.
      • videoFormat

        private final javax.media.format.VideoFormat videoFormat
        DOCUMENT ME!
      • width

        private final int width
        DOCUMENT ME!
      • height

        private final int height
        DOCUMENT ME!
    • Constructor Detail

      • AWTImageSourceStream

        public AWTImageSourceStream​(int width,
                                    int height,
                                    int frameRate,
                                    java.awt.Image[] images)
        Creates a new AWTImageSourceStream object.
        Parameters:
        width - DOCUMENT ME!
        height - DOCUMENT ME!
        frameRate - DOCUMENT ME!
        images - DOCUMENT ME!
    • Method Detail

      • endOfStream

        public boolean endOfStream()
        DOCUMENT ME!
        Specified by:
        endOfStream in interface javax.media.protocol.SourceStream
        Returns:
        DOCUMENT ME!
      • getContentDescriptor

        public javax.media.protocol.ContentDescriptor getContentDescriptor()
        DOCUMENT ME!
        Specified by:
        getContentDescriptor in interface javax.media.protocol.SourceStream
        Returns:
        DOCUMENT ME!
      • getContentLength

        public long getContentLength()
        DOCUMENT ME!
        Specified by:
        getContentLength in interface javax.media.protocol.SourceStream
        Returns:
        DOCUMENT ME!
      • getControl

        public java.lang.Object getControl​(java.lang.String type)
        DOCUMENT ME!
        Specified by:
        getControl in interface javax.media.Controls
        Parameters:
        type - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getControls

        public java.lang.Object[] getControls()
        DOCUMENT ME!
        Specified by:
        getControls in interface javax.media.Controls
        Returns:
        DOCUMENT ME!
      • getFormat

        public javax.media.Format getFormat()
        Return the format of each video frame.
        Specified by:
        getFormat in interface javax.media.protocol.PullBufferStream
        Returns:
        DOCUMENT ME!
      • read

        public void read​(javax.media.Buffer buf)
                  throws java.io.IOException
        This is called from the Processor to read a frame worth of video data.
        Specified by:
        read in interface javax.media.protocol.PullBufferStream
        Parameters:
        buf - DOCUMENT ME!
        Throws:
        java.io.IOException - DOCUMENT ME!
        java.lang.RuntimeException - DOCUMENT ME!
      • willReadBlock

        public boolean willReadBlock()
        We should never need to block assuming data are read from files.
        Specified by:
        willReadBlock in interface javax.media.protocol.PullBufferStream
        Returns:
        DOCUMENT ME!