Class MultiMediaFormatEncoder
- java.lang.Object
-
- lumis.portal.file.transformation.encoder.MultiMediaFormatEncoder
-
- All Implemented Interfaces:
IFormatTransformer
public class MultiMediaFormatEncoder extends java.lang.Object implements IFormatTransformer
Provides Multimedia format encoder used for video or audio. This class has a dependence of Jave.- Since:
- 6.1.0
- Version:
- $Revision$ $Date$
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AUDIO_CODEC_LIBFAAC
static java.lang.String
AUDIO_FORMAT
static java.lang.String
VIDEO_FORMAT
-
Constructor Summary
Constructors Constructor Description MultiMediaFormatEncoder(java.lang.String contentType, java.lang.String targetFormat)
The class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encode(java.io.InputStream content, java.io.OutputStream output)
Performs the file encode transformations, as change of file format.protected java.lang.String
getCodecByFormat(java.lang.String fileFormat)
Returns the codec for the file format.protected it.sauronsoftware.jave.EncodingAttributes
getEncodingAttributes(java.lang.String contentType, java.lang.String targetFormat)
Returns the encoding attributes correctly built for given content type and target format.
-
-
-
Field Detail
-
AUDIO_CODEC_LIBFAAC
public static final java.lang.String AUDIO_CODEC_LIBFAAC
- See Also:
- Constant Field Values
-
VIDEO_FORMAT
public static final java.lang.String VIDEO_FORMAT
- See Also:
- Constant Field Values
-
AUDIO_FORMAT
public static final java.lang.String AUDIO_FORMAT
- See Also:
- Constant Field Values
-
-
Method Detail
-
encode
public void encode(java.io.InputStream content, java.io.OutputStream output) throws PortalException
Description copied from interface:IFormatTransformer
Performs the file encode transformations, as change of file format.
Thecontent
parameter is the source of transformation andoutput
parameter is the target.- Specified by:
encode
in interfaceIFormatTransformer
- Parameters:
content
- the reader source of encode.output
- the target of encode.- Throws:
PortalException
-
getEncodingAttributes
protected it.sauronsoftware.jave.EncodingAttributes getEncodingAttributes(java.lang.String contentType, java.lang.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 java.lang.String getCodecByFormat(java.lang.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
-
-