Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Class JpegImagesToMovie.ImageDataSource

    java.lang.Object
      javax.media.protocol.DataSource
          javax.media.protocol.PullBufferDataSource
              JpegImagesToMovie.ImageDataSource

All Implemented Interfaces:
  javax.media.Controls, javax.media.Duration

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
`(package private) JpegImagesToMovie.ImageSourceStream[]` | `streams`

Fields inherited from interface javax.media.Duration
`DURATION_UNBOUNDED, DURATION_UNKNOWN`

Constructor Summary
`JpegImagesToMovie.ImageDataSource(int width, int height, int frameRate, List images)`

Method Summary
`void` | `connect()`
`void` | `disconnect()`
`String` | `getContentType()` Content type is of RAW since we are sending buffers of video frames without a container format.
`Object` | `getControl(String type)`
`Object[]` | `getControls()`
`javax.media.Time` | `getDuration()` We could have derived the duration from the number of frames and frame rate.
`javax.media.MediaLocator` | `getLocator()`
`javax.media.protocol.PullBufferStream[]` | `getStreams()` Return the ImageSourceStreams.
`void` | `setLocator(javax.media.MediaLocator source)`
`void` | `start()`
`void` | `stop()`

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`

Field Detail

### streams

    JpegImagesToMovie.ImageSourceStream[] streams

Constructor Detail

### JpegImagesToMovie.ImageDataSource

    JpegImagesToMovie.ImageDataSource(int width,
                                      int height,
                                      int frameRate,
                                      List images)

Method Detail

### setLocator

    public void setLocator(javax.media.MediaLocator source)

  Overrides:
    `setLocator` in class `javax.media.protocol.DataSource`

### getLocator

    public javax.media.MediaLocator getLocator()

  Overrides:
    `getLocator` 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`

### connect

    public void connect()

  Specified by:
    `connect` in class `javax.media.protocol.DataSource`

### disconnect

    public void disconnect()

  Specified by:
    `disconnect` in class `javax.media.protocol.DataSource`

### start

    public void start()

  Specified by:
    `start` in class `javax.media.protocol.DataSource`

### stop

    public void stop()

  Specified by:
    `stop` in class `javax.media.protocol.DataSource`

### getStreams

    public javax.media.protocol.PullBufferStream[] getStreams()

  Return the ImageSourceStreams.

  Specified by:
    `getStreams` in class `javax.media.protocol.PullBufferDataSource`

### 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`

### getControls

    public Object[] getControls()

  Specified by:
    `getControls` in interface `javax.media.Controls`
  Specified by:
    `getControls` in class `javax.media.protocol.DataSource`

### getControl

    public Object getControl(String type)

  Specified by:
    `getControl` in interface `javax.media.Controls`
  Specified by:
    `getControl` in class `javax.media.protocol.DataSource`

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD