Class MovieMaker.JpegSourceStream

  • 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.JpegSourceStream
    extends java.lang.Object
    implements javax.media.protocol.PullBufferStream
    The jpeg-based source stream to go along with ImageDataSource.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean ended
      DOCUMENT ME!
      private int height
      DOCUMENT ME!
      private java.io.File[] jpegFiles
      DOCUMENT ME!
      private int nextImage
      DOCUMENT ME!
      (package 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
      JpegSourceStream​(int width, int height, int frameRate, java.io.File[] jpegFiles)
      Creates a new JpegSourceStream 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

      • seqNo

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

        private boolean ended
        DOCUMENT ME!
      • jpegFiles

        private final java.io.File[] jpegFiles
        DOCUMENT ME!
      • nextImage

        private int nextImage
        DOCUMENT ME!
      • 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

      • JpegSourceStream

        public JpegSourceStream​(int width,
                                int height,
                                int frameRate,
                                java.io.File[] jpegFiles)
        Creates a new JpegSourceStream object.
        Parameters:
        width - DOCUMENT ME!
        height - DOCUMENT ME!
        frameRate - DOCUMENT ME!
        jpegFiles - 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. That will be JPEG.
        Specified by:
        getFormat in interface javax.media.protocol.PullBufferStream
        Returns:
        DOCUMENT ME!
      • read

        public void read​(javax.media.Buffer buf)
        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.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!