Class 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: 16814 $ $Date: 2015-01-23 11:33:18 -0200 (Fri, 23 Jan 2015) $
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MultiMediaFormatEncoder

        public MultiMediaFormatEncoder​(java.lang.String contentType,
                                       java.lang.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​(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.
        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​(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