Class 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 Summary

      Fields 
      Modifier and Type Field Description
      (package private) JpegImagesToMovie.ImageSourceStream[] streams
      DOCUMENT ME!
      • Fields inherited from interface javax.media.Duration

        DURATION_UNBOUNDED, DURATION_UNKNOWN
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageDataSource​(int width, int height, int frameRate, java.util.Vector images)
      Creates a new ImageDataSource object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect()
      DOCUMENT ME!
      void disconnect()
      DOCUMENT ME!
      java.lang.String getContentType()
      Content type is of RAW since we are sending buffers of video frames without a container format.
      java.lang.Object getControl​(java.lang.String type)
      DOCUMENT ME!
      java.lang.Object[] getControls()
      DOCUMENT ME!
      javax.media.Time getDuration()
      We could have derived the duration from the number of frames and frame rate.
      javax.media.MediaLocator getLocator()
      DOCUMENT ME!
      javax.media.protocol.PullBufferStream[] getStreams()
      Return the ImageSourceStreams.
      void setLocator​(javax.media.MediaLocator source)
      DOCUMENT ME!
      void start()
      DOCUMENT ME!
      void stop()
      DOCUMENT ME!
      • Methods inherited from class javax.media.protocol.DataSource

        initCheck
      • Methods inherited from class java.lang.Object

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

      • ImageDataSource

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

      • 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 java.lang.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 java.lang.Object getControl​(java.lang.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 java.lang.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