org.dasein.media
Class MultiIngester

java.lang.Object
  extended by org.dasein.media.MultiIngester
All Implemented Interfaces:
Ingester

public class MultiIngester
extends Object
implements Ingester


Field Summary
 
Fields inherited from interface org.dasein.media.Ingester
EXTENSION, HEIGHT, WIDTH
 
Constructor Summary
MultiIngester(Ingester first, Ingester second)
           
 
Method Summary
 void add(Ingester ing)
           
 void clear()
          Clears the ingester to handle a new media stream.
 Map<String,Object> getMetaData()
          Provides the meta-data associated with the last ingested media asset.
 MimeType getMimeType()
           
 long getSize()
          If the ingest process requires multiple passes in order to determine file size, this method should return -1 to allow the requesting application to determine size on its own.
 void ingest()
          Performs an ingest of the specified stream.
 void setInput(InputStream is)
          Sets an input stream to be ingested.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiIngester

public MultiIngester(Ingester first,
                     Ingester second)
Method Detail

add

public void add(Ingester ing)

clear

public void clear()
Description copied from interface: Ingester
Clears the ingester to handle a new media stream.

Specified by:
clear in interface Ingester

getMetaData

public Map<String,Object> getMetaData()
Description copied from interface: Ingester
Provides the meta-data associated with the last ingested media asset.

Specified by:
getMetaData in interface Ingester
Returns:
the asset's meta-data

getMimeType

public MimeType getMimeType()
Specified by:
getMimeType in interface Ingester
Returns:
the mime type for the most recently read media asset

getSize

public long getSize()
Description copied from interface: Ingester
If the ingest process requires multiple passes in order to determine file size, this method should return -1 to allow the requesting application to determine size on its own.

Specified by:
getSize in interface Ingester
Returns:
the size in bytes of the asset or -1

ingest

public void ingest()
            throws InvalidMediaTypeException,
                   IOException
Description copied from interface: Ingester
Performs an ingest of the specified stream. This method will initiate reading from the stream and parsing it for the ingest. The method returns once the media stream has been fully read.

Specified by:
ingest in interface Ingester
Throws:
InvalidMediaTypeException - the media in the input stream is not one supported by this ingester
IOException - an error occurred reading the input stream

setInput

public void setInput(InputStream is)
Description copied from interface: Ingester
Sets an input stream to be ingested. This method implicitly calls the Ingester.clear() method to clear out any information from a previous ingest.

Specified by:
setInput in interface Ingester
Parameters:
is - the input stream to be ingested


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.