Class JpegImagesToMovie.ImageDataSource

java.lang.Object
javax.media.protocol.DataSource
javax.media.protocol.PullBufferDataSource
gov.nih.mipav.view.renderer.flythroughview.JpegImagesToMovie.ImageDataSource
All Implemented Interfaces:
javax.media.Controls, javax.media.Duration, javax.media.protocol.Controls
Enclosing class:
JpegImagesToMovie

class JpegImagesToMovie.ImageDataSource extends javax.media.protocol.PullBufferDataSource
A DataSource to read from a list of JPEG image files and turn that into a stream of JMF buffers. The DataSource is not seekable or positionable.
  • Field Details

  • Constructor Details

    • ImageDataSource

      ImageDataSource(int width, int height, int frameRate, Vector images)
      Creates a new ImageDataSource object.
      Parameters:
      width - DOCUMENT ME!
      height - DOCUMENT ME!
      frameRate - DOCUMENT ME!
      images - DOCUMENT ME!
  • Method Details

    • connect

      public void connect()
      DOCUMENT ME!
      Specified by:
      connect in class javax.media.protocol.DataSource
    • disconnect

      public void disconnect()
      DOCUMENT ME!
      Specified by:
      disconnect in class javax.media.protocol.DataSource
    • getContentType

      public String getContentType()
      Content type is of RAW since we are sending buffers of video frames without a container format.
      Specified by:
      getContentType in class javax.media.protocol.DataSource
      Returns:
      DOCUMENT ME!
    • getControl

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

      public Object[] getControls()
      DOCUMENT ME!
      Specified by:
      getControls in interface javax.media.Controls
      Specified by:
      getControls in class javax.media.protocol.DataSource
      Returns:
      DOCUMENT ME!
    • getDuration

      public javax.media.Time getDuration()
      We could have derived the duration from the number of frames and frame rate. But for the purpose of this program, it's not necessary.
      Specified by:
      getDuration in interface javax.media.Duration
      Specified by:
      getDuration in class javax.media.protocol.DataSource
      Returns:
      DOCUMENT ME!
    • getLocator

      public javax.media.MediaLocator getLocator()
      DOCUMENT ME!
      Overrides:
      getLocator in class javax.media.protocol.DataSource
      Returns:
      DOCUMENT ME!
    • getStreams

      public javax.media.protocol.PullBufferStream[] getStreams()
      Return the ImageSourceStreams.
      Specified by:
      getStreams in class javax.media.protocol.PullBufferDataSource
      Returns:
      DOCUMENT ME!
    • setLocator

      public void setLocator(javax.media.MediaLocator source)
      DOCUMENT ME!
      Overrides:
      setLocator in class javax.media.protocol.DataSource
      Parameters:
      source - DOCUMENT ME!
    • start

      public void start()
      DOCUMENT ME!
      Specified by:
      start in class javax.media.protocol.DataSource
    • stop

      public void stop()
      DOCUMENT ME!
      Specified by:
      stop in class javax.media.protocol.DataSource