org.dasein.media
Interface Ingester

All Known Implementing Classes:
FlashIngester, ImageIngester, MultiIngester

public interface Ingester

Interface for media-independent ingesting of media assets. Different kinds of media will have different implementations of this interface to discern their meta-data.

Last modified $Date: 2006/05/21 20:34:38 $

Version:
$Revision: 1.1 $
Author:
George Reese

Field Summary
static String EXTENSION
           
static String HEIGHT
           
static String WIDTH
           
 
Method Summary
 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.
 

Field Detail

EXTENSION

static final String EXTENSION
See Also:
Constant Field Values

HEIGHT

static final String HEIGHT
See Also:
Constant Field Values

WIDTH

static final String WIDTH
See Also:
Constant Field Values
Method Detail

clear

void clear()
Clears the ingester to handle a new media stream.


getMetaData

Map<String,Object> getMetaData()
Provides the meta-data associated with the last ingested media asset.

Returns:
the asset's meta-data

getMimeType

MimeType getMimeType()
Returns:
the mime type for the most recently read media asset

getSize

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.

Returns:
the size in bytes of the asset or -1

ingest

void ingest()
            throws IOException,
                   InvalidMediaTypeException
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.

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

setInput

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

Parameters:
is - the input stream to be ingested


Copyright © 2011 enStratus Networks LLC. All Rights Reserved.