Class MovieMaker.JpegSourceStream
- java.lang.Object
-
- gov.nih.mipav.view.renderer.flythroughview.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!
-
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.
-
-
-
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!
-
-
Method Detail
-
endOfStream
public boolean endOfStream()
DOCUMENT ME!- Specified by:
endOfStream
in interfacejavax.media.protocol.SourceStream
- Returns:
- DOCUMENT ME!
-
getContentDescriptor
public javax.media.protocol.ContentDescriptor getContentDescriptor()
DOCUMENT ME!- Specified by:
getContentDescriptor
in interfacejavax.media.protocol.SourceStream
- Returns:
- DOCUMENT ME!
-
getContentLength
public long getContentLength()
DOCUMENT ME!- Specified by:
getContentLength
in interfacejavax.media.protocol.SourceStream
- Returns:
- DOCUMENT ME!
-
getControl
public java.lang.Object getControl(java.lang.String type)
DOCUMENT ME!- Specified by:
getControl
in interfacejavax.media.Controls
- Parameters:
type
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getControls
public java.lang.Object[] getControls()
DOCUMENT ME!- Specified by:
getControls
in interfacejavax.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 interfacejavax.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 interfacejavax.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 interfacejavax.media.protocol.PullBufferStream
- Returns:
- DOCUMENT ME!
-
-