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 Summary
Fields Modifier and Type Field Description (package private) JpegImagesToMovie.ImageSourceStream[]
streams
DOCUMENT ME!
-
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!
-
-
-
Field Detail
-
streams
JpegImagesToMovie.ImageSourceStream[] streams
DOCUMENT ME!
-
-
Method Detail
-
connect
public void connect()
DOCUMENT ME!- Specified by:
connect
in classjavax.media.protocol.DataSource
-
disconnect
public void disconnect()
DOCUMENT ME!- Specified by:
disconnect
in classjavax.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 classjavax.media.protocol.DataSource
- Returns:
- DOCUMENT ME!
-
getControl
public java.lang.Object getControl(java.lang.String type)
DOCUMENT ME!- Specified by:
getControl
in interfacejavax.media.Controls
- Specified by:
getControl
in classjavax.media.protocol.DataSource
- Parameters:
type
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getControls
public java.lang.Object[] getControls()
DOCUMENT ME!- Specified by:
getControls
in interfacejavax.media.Controls
- Specified by:
getControls
in classjavax.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 interfacejavax.media.Duration
- Specified by:
getDuration
in classjavax.media.protocol.DataSource
- Returns:
- DOCUMENT ME!
-
getLocator
public javax.media.MediaLocator getLocator()
DOCUMENT ME!- Overrides:
getLocator
in classjavax.media.protocol.DataSource
- Returns:
- DOCUMENT ME!
-
getStreams
public javax.media.protocol.PullBufferStream[] getStreams()
Return the ImageSourceStreams.- Specified by:
getStreams
in classjavax.media.protocol.PullBufferDataSource
- Returns:
- DOCUMENT ME!
-
setLocator
public void setLocator(javax.media.MediaLocator source)
DOCUMENT ME!- Overrides:
setLocator
in classjavax.media.protocol.DataSource
- Parameters:
source
- DOCUMENT ME!
-
start
public void start()
DOCUMENT ME!- Specified by:
start
in classjavax.media.protocol.DataSource
-
stop
public void stop()
DOCUMENT ME!- Specified by:
stop
in classjavax.media.protocol.DataSource
-
-