Class MultiMediaFormatEncoder
- java.lang.Object
-
- 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
- Version:
- $Revision: 16814 $ $Date: 2015-01-23 11:33:18 -0200 (Fri, 23 Jan 2015) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
AUDIO_CODEC_LIBFAAC
static String
AUDIO_FORMAT
static String
VIDEO_FORMAT
-
Constructor Summary
Constructors Constructor Description MultiMediaFormatEncoder(String contentType, String targetFormat)
The class constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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
-
-
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.
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(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
-
-