lumis.portal.file.transformation.encoder
Class MultiMediaFormatEncoder

Package class diagram package MultiMediaFormatEncoder
java.lang.Object
  extended by lumis.portal.file.transformation.encoder.MultiMediaFormatEncoder
All Implemented Interfaces:
IFormatTransformer

public class MultiMediaFormatEncoder
extends Object
implements IFormatTransformer

Provides Multimedia format encoder used for video or audio. This class has a dependence of Jave.

Since:
6.1.0

Field Summary
static String AUDIO_CODEC_LIBFAAC
           
static String AUDIO_FORMAT
           
static String VIDEO_FORMAT
           
 
Constructor Summary
MultiMediaFormatEncoder(String contentType, String targetFormat)
          The class constructor.
 
Method Summary
 void encode(InputStream content, OutputStream output)
          Performs the file encode transformations, as change of file format.
protected  String getCodecByFormat(String fileFormat)
          Returns the codec for the file format.
protected  it.sauronsoftware.jave.EncodingAttributes getEncodingAttributes(String contentType, String targetFormat)
          Returns the encoding attributes correctly built for given content type and target format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUDIO_CODEC_LIBFAAC

public static final String AUDIO_CODEC_LIBFAAC
See Also:
Constant Field Values

VIDEO_FORMAT

public static final String VIDEO_FORMAT
See Also:
Constant Field Values

AUDIO_FORMAT

public static final String AUDIO_FORMAT
See Also:
Constant Field Values
Constructor Detail

MultiMediaFormatEncoder

public MultiMediaFormatEncoder(String contentType,
                               String targetFormat)
The class constructor.

Parameters:
contentType - the target content type.
targetFormat - target file format.
Since:
6.1.0
Method Detail

encode

public void encode(InputStream content,
                   OutputStream output)
            throws PortalException
Description copied from interface: IFormatTransformer
Performs the file encode transformations, as change of file format.
The content parameter is the source of transformation and output parameter is the target.

Specified by:
encode in interface IFormatTransformer
Parameters:
content - the reader source of encode.
output - the target of encode.
Throws:
PortalException

getEncodingAttributes

protected it.sauronsoftware.jave.EncodingAttributes getEncodingAttributes(String contentType,
                                                                          String targetFormat)
                                                                   throws PortalException
Returns the encoding attributes correctly built for given content type and target format.

Parameters:
contentType - the content type of the target of transformation.
targetFormat - the target file format.
Returns:
the encoding attributes correctly built for given target content type.
Throws:
PortalException
Since:
6.1.0

getCodecByFormat

protected String getCodecByFormat(String fileFormat)
                           throws PortalException
Returns the codec for the file format.

Parameters:
fileFormat - the format of the target file.
Returns:
the codec for the file format.
Throws:
PortalException
Since:
6.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.