Commit d00c0e7e authored by yanzg's avatar yanzg

压缩视频

parent 07900627
......@@ -335,7 +335,7 @@ adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
in accord with this section must be in a formatHandle that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
......
......@@ -119,7 +119,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/FFMPEG
the current machine.
<DT><A HREF="../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()"><B>getFormat()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/MultimediaInfo.html" title="class in it.sauronsoftware.jave">MultimediaInfo</A>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<DT><A HREF="../it/sauronsoftware/jave/VideoInfo.html#getFrameRate()"><B>getFrameRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoInfo.html" title="class in it.sauronsoftware.jave">VideoInfo</A>
<DD>Returns the video frame rate.
......@@ -128,7 +128,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoS
<DD>Returns the video height.
<DT><A HREF="../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)"><B>getInfo(File)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encoder.html" title="class in it.sauronsoftware.jave">Encoder</A>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<DT><A HREF="../it/sauronsoftware/jave/AudioInfo.html#getSamplingRate()"><B>getSamplingRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/AudioInfo.html" title="class in it.sauronsoftware.jave">AudioInfo</A>
......
......@@ -81,7 +81,7 @@ function windowTitle()
<A NAME="_I_"><!-- --></A><H2>
<B>I</B></H2>
<DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file format is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>JAVE - Java Audio Video Encoder</DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file formatHandle is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>JAVE - Java Audio Video Encoder</DL>
<HR>
......
......@@ -105,7 +105,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encodi
<DD>Sets the duration (seconds) of the re-encoded stream.
<DT><A HREF="../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)"><B>setFormat(String)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/EncodingAttributes.html" title="class in it.sauronsoftware.jave">EncodingAttributes</A>
<DD>Sets the format name for the encoded target multimedia file.
<DD>Sets the formatHandle name for the encoded target multimedia file.
<DT><A HREF="../it/sauronsoftware/jave/VideoAttributes.html#setFrameRate(java.lang.Integer)"><B>setFrameRate(Integer)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoAttributes.html" title="class in it.sauronsoftware.jave">VideoAttributes</A>
<DD>Sets the frame rate value for the encoding process.
......
......@@ -188,7 +188,7 @@ Main class of the package. Instances can encode audio and video streams.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......@@ -291,7 +291,7 @@ public java.lang.String[] <B>getAudioDecoders</B>()
<DL>
<DD>Returns a list with the names of all the audio decoders bundled with the
ffmpeg distribution in use. An audio stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -329,7 +329,7 @@ public java.lang.String[] <B>getVideoDecoders</B>()
<DL>
<DD>Returns a list with the names of all the video decoders bundled with the
ffmpeg distribution in use. A video stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -367,7 +367,7 @@ public java.lang.String[] <B>getSupportedEncodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
encoding time by the underlying ffmpeg distribution. A multimedia file
could be encoded and generated only if the specified format is in this
could be encoded and generated only if the specified formatHandle is in this
list.
<P>
<DD><DL>
......@@ -388,7 +388,7 @@ public java.lang.String[] <B>getSupportedDecodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
decoding time by the underlying ffmpeg distribution. A multimedia file
could be open and decoded only if its format is in this list.
could be open and decoded only if its formatHandle is in this list.
<P>
<DD><DL>
......@@ -407,14 +407,14 @@ public <A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html" title="clas
throws <A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A>,
<A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></PRE>
<DL>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The source multimedia file.
<DT><B>Returns:</B><DD>A set of informations about the file and its contents.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the format of the source file cannot be recognized and
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the formatHandle of the source file cannot be recognized and
decoded.
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></CODE> - If a problem occurs calling the underlying ffmpeg executable.</DL>
</DD>
......
......@@ -159,10 +159,10 @@ Attributes controlling the encoding process.
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;format)</CODE>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;formatHandle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the format name for the encoded target multimedia file.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the formatHandle name for the encoded target multimedia file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -232,16 +232,16 @@ public <B>EncodingAttributes</B>()</PRE>
<A NAME="setFormat(java.lang.String)"><!-- --></A><H3>
setFormat</H3>
<PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;format)</PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;formatHandle)</PRE>
<DL>
<DD>Sets the format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>Sets the formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - The format name for the encoded target multimedia file.</DL>
<DT><B>Parameters:</B><DD><CODE>formatHandle</CODE> - The formatHandle name for the encoded target multimedia file.</DL>
</DD>
</DL>
<HR>
......
......@@ -106,7 +106,7 @@ java.lang.Object
</PRE>
<P>
This expection is thrown if a source file format is not recognized.
This expection is thrown if a source file formatHandle is not recognized.
<P>
<P>
......
......@@ -158,7 +158,7 @@ Instances of this class report informations about a decoded multimedia file.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()">getFormat</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file format name.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file formatHandle name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -221,11 +221,11 @@ getFormat</H3>
<PRE>
public java.lang.String <B>getFormat</B>()</PRE>
<DL>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The multimedia file format name.</DL>
<DT><B>Returns:</B><DD>The multimedia file formatHandle name.</DL>
</DD>
</DL>
<HR>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B><A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......@@ -157,7 +157,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......
......@@ -123,7 +123,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" t
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/MultimediaInfo.html" title="
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -167,7 +167,7 @@ JAVE - Java Audio Video Encoder
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></TD>
<TD>This expection is thrown if a source file format is not recognized.</TD>
<TD>This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......
......@@ -130,7 +130,7 @@ Classes in <A HREF="../../../it/sauronsoftware/jave/package-summary.html">it.sau
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/InputFormatException.html#it.sauronsoftware.jave"><B>InputFormatException</B></A></B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/MultimediaInfo.html#it.sauronsoftware.jave"><B>MultimediaInfo</B></A></B>
......
......@@ -208,12 +208,12 @@ java.lang.Integer <B>volume</B></PRE>
</TABLE>
<H3>
format</H3>
formatHandle</H3>
<PRE>
java.lang.String <B>format</B></PRE>
java.lang.String <B>formatHandle</B></PRE>
<DL>
<DD>The format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>The formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DL>
</DL>
......
......@@ -335,7 +335,7 @@ adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
in accord with this section must be in a formatHandle that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
......
......@@ -119,7 +119,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/FFMPEG
the current machine.
<DT><A HREF="../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()"><B>getFormat()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/MultimediaInfo.html" title="class in it.sauronsoftware.jave">MultimediaInfo</A>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<DT><A HREF="../it/sauronsoftware/jave/VideoInfo.html#getFrameRate()"><B>getFrameRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoInfo.html" title="class in it.sauronsoftware.jave">VideoInfo</A>
<DD>Returns the video frame rate.
......@@ -128,7 +128,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoS
<DD>Returns the video height.
<DT><A HREF="../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)"><B>getInfo(File)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encoder.html" title="class in it.sauronsoftware.jave">Encoder</A>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<DT><A HREF="../it/sauronsoftware/jave/AudioInfo.html#getSamplingRate()"><B>getSamplingRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/AudioInfo.html" title="class in it.sauronsoftware.jave">AudioInfo</A>
......
......@@ -81,7 +81,7 @@ function windowTitle()
<A NAME="_I_"><!-- --></A><H2>
<B>I</B></H2>
<DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file format is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>JAVE - Java Audio Video Encoder</DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file formatHandle is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>JAVE - Java Audio Video Encoder</DL>
<HR>
......
......@@ -105,7 +105,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encodi
<DD>Sets the duration (seconds) of the re-encoded stream.
<DT><A HREF="../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)"><B>setFormat(String)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/EncodingAttributes.html" title="class in it.sauronsoftware.jave">EncodingAttributes</A>
<DD>Sets the format name for the encoded target multimedia file.
<DD>Sets the formatHandle name for the encoded target multimedia file.
<DT><A HREF="../it/sauronsoftware/jave/VideoAttributes.html#setFrameRate(java.lang.Integer)"><B>setFrameRate(Integer)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoAttributes.html" title="class in it.sauronsoftware.jave">VideoAttributes</A>
<DD>Sets the frame rate value for the encoding process.
......
......@@ -188,7 +188,7 @@ Main class of the package. Instances can encode audio and video streams.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......@@ -291,7 +291,7 @@ public java.lang.String[] <B>getAudioDecoders</B>()
<DL>
<DD>Returns a list with the names of all the audio decoders bundled with the
ffmpeg distribution in use. An audio stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -329,7 +329,7 @@ public java.lang.String[] <B>getVideoDecoders</B>()
<DL>
<DD>Returns a list with the names of all the video decoders bundled with the
ffmpeg distribution in use. A video stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -367,7 +367,7 @@ public java.lang.String[] <B>getSupportedEncodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
encoding time by the underlying ffmpeg distribution. A multimedia file
could be encoded and generated only if the specified format is in this
could be encoded and generated only if the specified formatHandle is in this
list.
<P>
<DD><DL>
......@@ -388,7 +388,7 @@ public java.lang.String[] <B>getSupportedDecodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
decoding time by the underlying ffmpeg distribution. A multimedia file
could be open and decoded only if its format is in this list.
could be open and decoded only if its formatHandle is in this list.
<P>
<DD><DL>
......@@ -407,14 +407,14 @@ public <A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html" title="clas
throws <A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A>,
<A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></PRE>
<DL>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The source multimedia file.
<DT><B>Returns:</B><DD>A set of informations about the file and its contents.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the format of the source file cannot be recognized and
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the formatHandle of the source file cannot be recognized and
decoded.
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></CODE> - If a problem occurs calling the underlying ffmpeg executable.</DL>
</DD>
......
......@@ -159,10 +159,10 @@ Attributes controlling the encoding process.
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;format)</CODE>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;formatHandle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the format name for the encoded target multimedia file.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the formatHandle name for the encoded target multimedia file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -232,16 +232,16 @@ public <B>EncodingAttributes</B>()</PRE>
<A NAME="setFormat(java.lang.String)"><!-- --></A><H3>
setFormat</H3>
<PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;format)</PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;formatHandle)</PRE>
<DL>
<DD>Sets the format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>Sets the formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - The format name for the encoded target multimedia file.</DL>
<DT><B>Parameters:</B><DD><CODE>formatHandle</CODE> - The formatHandle name for the encoded target multimedia file.</DL>
</DD>
</DL>
<HR>
......
......@@ -106,7 +106,7 @@ java.lang.Object
</PRE>
<P>
This expection is thrown if a source file format is not recognized.
This expection is thrown if a source file formatHandle is not recognized.
<P>
<P>
......
......@@ -158,7 +158,7 @@ Instances of this class report informations about a decoded multimedia file.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()">getFormat</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file format name.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file formatHandle name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -221,11 +221,11 @@ getFormat</H3>
<PRE>
public java.lang.String <B>getFormat</B>()</PRE>
<DL>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The multimedia file format name.</DL>
<DT><B>Returns:</B><DD>The multimedia file formatHandle name.</DL>
</DD>
</DL>
<HR>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B><A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......@@ -157,7 +157,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......
......@@ -123,7 +123,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" t
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/MultimediaInfo.html" title="
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -167,7 +167,7 @@ JAVE - Java Audio Video Encoder
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></TD>
<TD>This expection is thrown if a source file format is not recognized.</TD>
<TD>This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......
......@@ -130,7 +130,7 @@ Classes in <A HREF="../../../it/sauronsoftware/jave/package-summary.html">it.sau
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/InputFormatException.html#it.sauronsoftware.jave"><B>InputFormatException</B></A></B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/MultimediaInfo.html#it.sauronsoftware.jave"><B>MultimediaInfo</B></A></B>
......
......@@ -208,12 +208,12 @@ java.lang.Integer <B>volume</B></PRE>
</TABLE>
<H3>
format</H3>
formatHandle</H3>
<PRE>
java.lang.String <B>format</B></PRE>
java.lang.String <B>formatHandle</B></PRE>
<DL>
<DD>The format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>The formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DL>
</DL>
......
......@@ -335,7 +335,7 @@ adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
in accord with this section must be in a formatHandle that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
......
......@@ -119,7 +119,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/FFMPEG
the current machine.
<DT><A HREF="../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()"><B>getFormat()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/MultimediaInfo.html" title="class in it.sauronsoftware.jave">MultimediaInfo</A>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<DT><A HREF="../it/sauronsoftware/jave/VideoInfo.html#getFrameRate()"><B>getFrameRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoInfo.html" title="class in it.sauronsoftware.jave">VideoInfo</A>
<DD>Returns the video frame rate.
......@@ -128,7 +128,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoS
<DD>Returns the video height.
<DT><A HREF="../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)"><B>getInfo(File)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encoder.html" title="class in it.sauronsoftware.jave">Encoder</A>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<DT><A HREF="../it/sauronsoftware/jave/AudioInfo.html#getSamplingRate()"><B>getSamplingRate()</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/AudioInfo.html" title="class in it.sauronsoftware.jave">AudioInfo</A>
......
......@@ -81,7 +81,7 @@ function windowTitle()
<A NAME="_I_"><!-- --></A><H2>
<B>I</B></H2>
<DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file format is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>&nbsp;</DL>
<DT><A HREF="../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave"><B>InputFormatException</B></A> - Exception in <A HREF="../it/sauronsoftware/jave/package-summary.html">it.sauronsoftware.jave</A><DD>This expection is thrown if a source file formatHandle is not recognized.<DT><A HREF="../it/sauronsoftware/jave/package-summary.html"><B>it.sauronsoftware.jave</B></A> - package it.sauronsoftware.jave<DD>&nbsp;</DL>
<HR>
......
......@@ -105,7 +105,7 @@ Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/Encodi
<DD>Sets the duration (seconds) of the re-encoded stream.
<DT><A HREF="../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)"><B>setFormat(String)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/EncodingAttributes.html" title="class in it.sauronsoftware.jave">EncodingAttributes</A>
<DD>Sets the format name for the encoded target multimedia file.
<DD>Sets the formatHandle name for the encoded target multimedia file.
<DT><A HREF="../it/sauronsoftware/jave/VideoAttributes.html#setFrameRate(java.lang.Integer)"><B>setFrameRate(Integer)</B></A> -
Method in class it.sauronsoftware.jave.<A HREF="../it/sauronsoftware/jave/VideoAttributes.html" title="class in it.sauronsoftware.jave">VideoAttributes</A>
<DD>Sets the frame rate value for the encoding process.
......
......@@ -188,7 +188,7 @@ Main class of the package. Instances can encode audio and video streams.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......@@ -291,7 +291,7 @@ public java.lang.String[] <B>getAudioDecoders</B>()
<DL>
<DD>Returns a list with the names of all the audio decoders bundled with the
ffmpeg distribution in use. An audio stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -329,7 +329,7 @@ public java.lang.String[] <B>getVideoDecoders</B>()
<DL>
<DD>Returns a list with the names of all the video decoders bundled with the
ffmpeg distribution in use. A video stream can be decoded only if a
decoder for its format is available.
decoder for its formatHandle is available.
<P>
<DD><DL>
......@@ -367,7 +367,7 @@ public java.lang.String[] <B>getSupportedEncodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
encoding time by the underlying ffmpeg distribution. A multimedia file
could be encoded and generated only if the specified format is in this
could be encoded and generated only if the specified formatHandle is in this
list.
<P>
<DD><DL>
......@@ -388,7 +388,7 @@ public java.lang.String[] <B>getSupportedDecodingFormats</B>()
<DL>
<DD>Returns a list with the names of all the file formats supported at
decoding time by the underlying ffmpeg distribution. A multimedia file
could be open and decoded only if its format is in this list.
could be open and decoded only if its formatHandle is in this list.
<P>
<DD><DL>
......@@ -407,14 +407,14 @@ public <A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html" title="clas
throws <A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A>,
<A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></PRE>
<DL>
<DD>Returns a set informations about a multimedia file, if its format is
<DD>Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - The source multimedia file.
<DT><B>Returns:</B><DD>A set of informations about the file and its contents.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the format of the source file cannot be recognized and
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></CODE> - If the formatHandle of the source file cannot be recognized and
decoded.
<DD><CODE><A HREF="../../../it/sauronsoftware/jave/EncoderException.html" title="class in it.sauronsoftware.jave">EncoderException</A></CODE> - If a problem occurs calling the underlying ffmpeg executable.</DL>
</DD>
......
......@@ -159,10 +159,10 @@ Attributes controlling the encoding process.
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;format)</CODE>
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/EncodingAttributes.html#setFormat(java.lang.String)">setFormat</A></B>(java.lang.String&nbsp;formatHandle)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the format name for the encoded target multimedia file.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the formatHandle name for the encoded target multimedia file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -232,16 +232,16 @@ public <B>EncodingAttributes</B>()</PRE>
<A NAME="setFormat(java.lang.String)"><!-- --></A><H3>
setFormat</H3>
<PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;format)</PRE>
public void <B>setFormat</B>(java.lang.String&nbsp;formatHandle)</PRE>
<DL>
<DD>Sets the format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>Sets the formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="../../../it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>format</CODE> - The format name for the encoded target multimedia file.</DL>
<DT><B>Parameters:</B><DD><CODE>formatHandle</CODE> - The formatHandle name for the encoded target multimedia file.</DL>
</DD>
</DL>
<HR>
......
......@@ -106,7 +106,7 @@ java.lang.Object
</PRE>
<P>
This expection is thrown if a source file format is not recognized.
This expection is thrown if a source file formatHandle is not recognized.
<P>
<P>
......
......@@ -158,7 +158,7 @@ Instances of this class report informations about a decoded multimedia file.
<TD><CODE><B><A HREF="../../../it/sauronsoftware/jave/MultimediaInfo.html#getFormat()">getFormat</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file format name.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the multimedia file formatHandle name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
......@@ -221,11 +221,11 @@ getFormat</H3>
<PRE>
public java.lang.String <B>getFormat</B>()</PRE>
<DL>
<DD>Returns the multimedia file format name.
<DD>Returns the multimedia file formatHandle name.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>The multimedia file format name.</DL>
<DT><B>Returns:</B><DD>The multimedia file formatHandle name.</DL>
</DD>
</DL>
<HR>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B><A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......@@ -157,7 +157,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/EncoderException.html" title
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
......
......@@ -123,7 +123,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/InputFormatException.html" t
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -102,7 +102,7 @@ Uses of <A HREF="../../../../it/sauronsoftware/jave/MultimediaInfo.html" title="
<TD><CODE><B>Encoder.</B><B><A HREF="../../../../it/sauronsoftware/jave/Encoder.html#getInfo(java.io.File)">getInfo</A></B>(java.io.File&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its format is
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a set informations about a multimedia file, if its formatHandle is
supported for decoding.</TD>
</TR>
</TABLE>
......
......@@ -161,7 +161,7 @@ Package it.sauronsoftware.jave
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="../../../it/sauronsoftware/jave/InputFormatException.html" title="class in it.sauronsoftware.jave">InputFormatException</A></B></TD>
<TD>This expection is thrown if a source file format is not recognized.</TD>
<TD>This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
</TABLE>
&nbsp;
......
......@@ -130,7 +130,7 @@ Classes in <A HREF="../../../it/sauronsoftware/jave/package-summary.html">it.sau
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/InputFormatException.html#it.sauronsoftware.jave"><B>InputFormatException</B></A></B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file format is not recognized.</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This expection is thrown if a source file formatHandle is not recognized.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../it/sauronsoftware/jave/class-use/MultimediaInfo.html#it.sauronsoftware.jave"><B>MultimediaInfo</B></A></B>
......
......@@ -208,12 +208,12 @@ java.lang.Integer <B>volume</B></PRE>
</TABLE>
<H3>
format</H3>
formatHandle</H3>
<PRE>
java.lang.String <B>format</B></PRE>
java.lang.String <B>formatHandle</B></PRE>
<DL>
<DD>The format name for the encoded target multimedia file. Be sure this
format is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<DD>The formatHandle name for the encoded target multimedia file. Be sure this
formatHandle is supported (see <A HREF="it/sauronsoftware/jave/Encoder.html#getSupportedEncodingFormats()"><CODE>Encoder.getSupportedEncodingFormats()</CODE></A>.
<P>
<DL>
</DL>
......
......@@ -64,8 +64,8 @@ table tr td {
It sets the audio encoding attributes. If never called on a new <em>EncodingAttributes</em> instance, or if the given parameter is <em>null</em>, no audio stream will be included in the encoded file. See also &quot;<a href="#3.1">Audio encoding attributes</a>&quot;.</li>
<li><code>public void <strong>setVideoAttributes</strong>(it.sauronsoftware.jave.AudioAttributes videoAttributes)</code><br />
It sets the video encoding attributes. If never called on a new <em>EncodingAttributes</em> instance, or if the given parameter is <em>null</em>, no video stream will be included in the encoded file. See also &quot;<a href="#3.2">Video encoding attributes</a>&quot;.</li>
<li><code>public void <strong>setFormat</strong>(java.lang.String format)</code><br />
It sets the format of the streams container that will be used for the new encoded file. The given parameter represents the format name. An encoding format name is valid and supported only if it appears in the list returned by the <em>getSupportedEncodingFormats()</em> method of the <em>Encoder</em> instance in use.</li>
<li><code>public void <strong>setFormat</strong>(java.lang.String formatHandle)</code><br />
It sets the formatHandle of the streams container that will be used for the new encoded file. The given parameter represents the formatHandle name. An encoding formatHandle name is valid and supported only if it appears in the list returned by the <em>getSupportedEncodingFormats()</em> method of the <em>Encoder</em> instance in use.</li>
<li><code>public void <strong>setOffset</strong>(java.lang.Float offset)</code><br />
It sets an offset for the transcoding operation. The source file will be re-encoded starting at <em>offset</em> seconds since its beginning. In example if you'd like to cut the first five seconds of the source file, you should call <em>setOffset(5)</em> on the <em>EncodingAttributes</em> object passed to the encoder.</li>
<li><code>public void <strong>setDuration</strong>(java.lang.Float duration)</code><br />
......@@ -127,7 +127,7 @@ table tr td {
<li><em>java.lang.IllegalArgumentException</em><br />
The transcoding operation has never started since the encoding attributes passed to the encoder has been recognized as invalid. Usualy this occurs when the EncodingAttributes instance given to the encoder asks the encoding of a container with no audio and no video streams (both <em>AudioAttributes</em> and <em>VideoAttribues</em> attributes are <em>null</em> or not set).</li>
<li><em>it.sauronsoftware.jave.InputFormatException</em><br />
The source file can't be decoded. It occurs when the source file container, the video stream format or the audio stream format are not supported by the decoder. You can check for supported containers and plugged decoders calling the encoder methods <em>getSupportedDecodingFormats()</em>, <em>getAudioDecoders()</em> and <em>getVideoDecoders()</em>.
The source file can't be decoded. It occurs when the source file container, the video stream formatHandle or the audio stream formatHandle are not supported by the decoder. You can check for supported containers and plugged decoders calling the encoder methods <em>getSupportedDecodingFormats()</em>, <em>getAudioDecoders()</em> and <em>getVideoDecoders()</em>.
</li>
<li><em>it.sauronsoftware.jave.EncoderExpection</em><br />
The operation has failed during the trancoding due to an internal error. You should check the exception message, and you can also use an <a href="#4"><em>EncoderProgressListener</em></a> instance to check any message issued by the encoder.</li>
......@@ -154,159 +154,159 @@ table tr td {
<h2>Decoding</h2>
<table>
<tr><th>Formato</th><th>Descrizione</th></tr>
<tr><td>4xm</td><td>4X Technologies format</td></tr>
<tr><td>MTV</td><td>MTV format</td></tr>
<tr><td>RoQ</td><td>Id RoQ format</td></tr>
<tr><td>4xm</td><td>4X Technologies formatHandle</td></tr>
<tr><td>MTV</td><td>MTV formatHandle</td></tr>
<tr><td>RoQ</td><td>Id RoQ formatHandle</td></tr>
<tr><td>aac</td><td>ADTS AAC</td></tr>
<tr><td>ac3</td><td>raw ac3</td></tr>
<tr><td>aiff</td><td>Audio IFF</td></tr>
<tr><td>alaw</td><td>pcm A law format</td></tr>
<tr><td>amr</td><td>3gpp amr file format</td></tr>
<tr><td>apc</td><td>CRYO APC format</td></tr>
<tr><td>alaw</td><td>pcm A law formatHandle</td></tr>
<tr><td>amr</td><td>3gpp amr file formatHandle</td></tr>
<tr><td>apc</td><td>CRYO APC formatHandle</td></tr>
<tr><td>ape</td><td>Monkey's Audio</td></tr>
<tr><td>asf</td><td>asf format</td></tr>
<tr><td>asf</td><td>asf formatHandle</td></tr>
<tr><td>au</td><td>SUN AU Format</td></tr>
<tr><td>avi</td><td>avi format</td></tr>
<tr><td>avi</td><td>avi formatHandle</td></tr>
<tr><td>avs</td><td>AVISynth</td></tr>
<tr><td>bethsoftvid</td><td>Bethesda Softworks 'Daggerfall' VID format</td></tr>
<tr><td>bethsoftvid</td><td>Bethesda Softworks 'Daggerfall' VID formatHandle</td></tr>
<tr><td>c93</td><td>Interplay C93</td></tr>
<tr><td>daud</td><td>D-Cinema audio format</td></tr>
<tr><td>dsicin</td><td>Delphine Software International CIN format</td></tr>
<tr><td>daud</td><td>D-Cinema audio formatHandle</td></tr>
<tr><td>dsicin</td><td>Delphine Software International CIN formatHandle</td></tr>
<tr><td>dts</td><td>raw dts</td></tr>
<tr><td>dv</td><td>DV video format</td></tr>
<tr><td>dv</td><td>DV video formatHandle</td></tr>
<tr><td>dxa</td><td>dxa</td></tr>
<tr><td>ea</td><td>Electronic Arts Multimedia Format</td></tr>
<tr><td>ea_cdata</td><td>Electronic Arts cdata</td></tr>
<tr><td>ffm</td><td>ffm format</td></tr>
<tr><td>film_cpk</td><td>Sega FILM/CPK format</td></tr>
<tr><td>ffm</td><td>ffm formatHandle</td></tr>
<tr><td>film_cpk</td><td>Sega FILM/CPK formatHandle</td></tr>
<tr><td>flac</td><td>raw flac</td></tr>
<tr><td>flic</td><td>FLI/FLC/FLX animation format</td></tr>
<tr><td>flv</td><td>flv format</td></tr>
<tr><td>flic</td><td>FLI/FLC/FLX animation formatHandle</td></tr>
<tr><td>flv</td><td>flv formatHandle</td></tr>
<tr><td>gif</td><td>GIF Animation</td></tr>
<tr><td>gxf</td><td>GXF format</td></tr>
<tr><td>gxf</td><td>GXF formatHandle</td></tr>
<tr><td>h261</td><td>raw h261</td></tr>
<tr><td>h263</td><td>raw h263</td></tr>
<tr><td>h264</td><td>raw H264 video format</td></tr>
<tr><td>idcin</td><td>Id CIN format</td></tr>
<tr><td>h264</td><td>raw H264 video formatHandle</td></tr>
<tr><td>idcin</td><td>Id CIN formatHandle</td></tr>
<tr><td>image2</td><td>image2 sequence</td></tr>
<tr><td>image2pipe</td><td>piped image2 sequence</td></tr>
<tr><td>ingenient</td><td>Ingenient MJPEG</td></tr>
<tr><td>ipmovie</td><td>Interplay MVE format</td></tr>
<tr><td>libnut</td><td>nut format</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video format</td></tr>
<tr><td>ipmovie</td><td>Interplay MVE formatHandle</td></tr>
<tr><td>libnut</td><td>nut formatHandle</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video formatHandle</td></tr>
<tr><td>matroska</td><td>Matroska File Format</td></tr>
<tr><td>mjpeg</td><td>MJPEG video</td></tr>
<tr><td>mm</td><td>American Laser Games MM format</td></tr>
<tr><td>mmf</td><td>mmf format</td></tr>
<tr><td>mov,mp4,m4a,3gp,3g2,mj2</td><td>QuickTime/MPEG4/Motion JPEG 2000 format</td></tr>
<tr><td>mm</td><td>American Laser Games MM formatHandle</td></tr>
<tr><td>mmf</td><td>mmf formatHandle</td></tr>
<tr><td>mov,mp4,m4a,3gp,3g2,mj2</td><td>QuickTime/MPEG4/Motion JPEG 2000 formatHandle</td></tr>
<tr><td>mp3</td><td>MPEG audio layer 3</td></tr>
<tr><td>mpc</td><td>musepack</td></tr>
<tr><td>mpc8</td><td>musepack8</td></tr>
<tr><td>mpeg</td><td>MPEG1 System format</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream format</td></tr>
<tr><td>mpegtsraw</td><td>MPEG2 raw transport stream format</td></tr>
<tr><td>mpeg</td><td>MPEG1 System formatHandle</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream formatHandle</td></tr>
<tr><td>mpegtsraw</td><td>MPEG2 raw transport stream formatHandle</td></tr>
<tr><td>mpegvideo</td><td>MPEG video</td></tr>
<tr><td>mulaw</td><td>pcm mu law format</td></tr>
<tr><td>mxf</td><td>MXF format</td></tr>
<tr><td>nsv</td><td>NullSoft Video format</td></tr>
<tr><td>nut</td><td>nut format</td></tr>
<tr><td>nuv</td><td>NuppelVideo format</td></tr>
<tr><td>ogg</td><td>Ogg format</td></tr>
<tr><td>psxstr</td><td>Sony Playstation STR format</td></tr>
<tr><td>rawvideo</td><td>raw video format</td></tr>
<tr><td>redir</td><td>Redirector format</td></tr>
<tr><td>rm</td><td>rm format</td></tr>
<tr><td>rtsp</td><td>RTSP input format</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian format</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian format</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit format</td></tr>
<tr><td>mulaw</td><td>pcm mu law formatHandle</td></tr>
<tr><td>mxf</td><td>MXF formatHandle</td></tr>
<tr><td>nsv</td><td>NullSoft Video formatHandle</td></tr>
<tr><td>nut</td><td>nut formatHandle</td></tr>
<tr><td>nuv</td><td>NuppelVideo formatHandle</td></tr>
<tr><td>ogg</td><td>Ogg formatHandle</td></tr>
<tr><td>psxstr</td><td>Sony Playstation STR formatHandle</td></tr>
<tr><td>rawvideo</td><td>raw video formatHandle</td></tr>
<tr><td>redir</td><td>Redirector formatHandle</td></tr>
<tr><td>rm</td><td>rm formatHandle</td></tr>
<tr><td>rtsp</td><td>RTSP input formatHandle</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian formatHandle</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian formatHandle</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit formatHandle</td></tr>
<tr><td>sdp</td><td>SDP</td></tr>
<tr><td>shn</td><td>raw shorten</td></tr>
<tr><td>siff</td><td>Beam Software SIFF</td></tr>
<tr><td>smk</td><td>Smacker Video</td></tr>
<tr><td>sol</td><td>Sierra SOL Format</td></tr>
<tr><td>swf</td><td>Flash format</td></tr>
<tr><td>swf</td><td>Flash formatHandle</td></tr>
<tr><td>thp</td><td>THP</td></tr>
<tr><td>tiertexseq</td><td>Tiertex Limited SEQ format</td></tr>
<tr><td>tiertexseq</td><td>Tiertex Limited SEQ formatHandle</td></tr>
<tr><td>tta</td><td>true-audio</td></tr>
<tr><td>txd</td><td>txd format</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian format</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian format</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit format</td></tr>
<tr><td>txd</td><td>txd formatHandle</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian formatHandle</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian formatHandle</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit formatHandle</td></tr>
<tr><td>vc1</td><td>raw vc1</td></tr>
<tr><td>vmd</td><td>Sierra VMD format</td></tr>
<tr><td>voc</td><td>Creative Voice File format</td></tr>
<tr><td>wav</td><td>wav format</td></tr>
<tr><td>wc3movie</td><td>Wing Commander III movie format</td></tr>
<tr><td>wsaud</td><td>Westwood Studios audio format</td></tr>
<tr><td>wsvqa</td><td>Westwood Studios VQA format</td></tr>
<tr><td>vmd</td><td>Sierra VMD formatHandle</td></tr>
<tr><td>voc</td><td>Creative Voice File formatHandle</td></tr>
<tr><td>wav</td><td>wav formatHandle</td></tr>
<tr><td>wc3movie</td><td>Wing Commander III movie formatHandle</td></tr>
<tr><td>wsaud</td><td>Westwood Studios audio formatHandle</td></tr>
<tr><td>wsvqa</td><td>Westwood Studios VQA formatHandle</td></tr>
<tr><td>wv</td><td>WavPack</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe format</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe formatHandle</td></tr>
</table>
<h2>Encoding</h2>
<table>
<tr><th>Formato</th><th>Descrizione</th></tr>
<tr><td>3g2</td><td>3gp2 format</td></tr>
<tr><td>3gp</td><td>3gp format</td></tr>
<tr><td>RoQ</td><td>Id RoQ format</td></tr>
<tr><td>3g2</td><td>3gp2 formatHandle</td></tr>
<tr><td>3gp</td><td>3gp formatHandle</td></tr>
<tr><td>RoQ</td><td>Id RoQ formatHandle</td></tr>
<tr><td>ac3</td><td>raw ac3</td></tr>
<tr><td>adts</td><td>ADTS AAC</td></tr>
<tr><td>aiff</td><td>Audio IFF</td></tr>
<tr><td>alaw</td><td>pcm A law format</td></tr>
<tr><td>amr</td><td>3gpp amr file format</td></tr>
<tr><td>asf</td><td>asf format</td></tr>
<tr><td>asf_stream</td><td>asf format</td></tr>
<tr><td>alaw</td><td>pcm A law formatHandle</td></tr>
<tr><td>amr</td><td>3gpp amr file formatHandle</td></tr>
<tr><td>asf</td><td>asf formatHandle</td></tr>
<tr><td>asf_stream</td><td>asf formatHandle</td></tr>
<tr><td>au</td><td>SUN AU Format</td></tr>
<tr><td>avi</td><td>avi format</td></tr>
<tr><td>crc</td><td>crc testing format</td></tr>
<tr><td>dv</td><td>DV video format</td></tr>
<tr><td>dvd</td><td>MPEG2 PS format (DVD VOB)</td></tr>
<tr><td>ffm</td><td>ffm format</td></tr>
<tr><td>avi</td><td>avi formatHandle</td></tr>
<tr><td>crc</td><td>crc testing formatHandle</td></tr>
<tr><td>dv</td><td>DV video formatHandle</td></tr>
<tr><td>dvd</td><td>MPEG2 PS formatHandle (DVD VOB)</td></tr>
<tr><td>ffm</td><td>ffm formatHandle</td></tr>
<tr><td>flac</td><td>raw flac</td></tr>
<tr><td>flv</td><td>flv format</td></tr>
<tr><td>framecrc</td><td>framecrc testing format</td></tr>
<tr><td>flv</td><td>flv formatHandle</td></tr>
<tr><td>framecrc</td><td>framecrc testing formatHandle</td></tr>
<tr><td>gif</td><td>GIF Animation</td></tr>
<tr><td>gxf</td><td>GXF format</td></tr>
<tr><td>gxf</td><td>GXF formatHandle</td></tr>
<tr><td>h261</td><td>raw h261</td></tr>
<tr><td>h263</td><td>raw h263</td></tr>
<tr><td>h264</td><td>raw H264 video format</td></tr>
<tr><td>h264</td><td>raw H264 video formatHandle</td></tr>
<tr><td>image2</td><td>image2 sequence</td></tr>
<tr><td>image2pipe</td><td>piped image2 sequence</td></tr>
<tr><td>libnut</td><td>nut format</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video format</td></tr>
<tr><td>libnut</td><td>nut formatHandle</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video formatHandle</td></tr>
<tr><td>matroska</td><td>Matroska File Format</td></tr>
<tr><td>mjpeg</td><td>MJPEG video</td></tr>
<tr><td>mmf</td><td>mmf format</td></tr>
<tr><td>mov</td><td>mov format</td></tr>
<tr><td>mmf</td><td>mmf formatHandle</td></tr>
<tr><td>mov</td><td>mov formatHandle</td></tr>
<tr><td>mp2</td><td>MPEG audio layer 2</td></tr>
<tr><td>mp3</td><td>MPEG audio layer 3</td></tr>
<tr><td>mp4</td><td>mp4 format</td></tr>
<tr><td>mpeg</td><td>MPEG1 System format</td></tr>
<tr><td>mp4</td><td>mp4 formatHandle</td></tr>
<tr><td>mpeg</td><td>MPEG1 System formatHandle</td></tr>
<tr><td>mpeg1video</td><td>MPEG video</td></tr>
<tr><td>mpeg2video</td><td>MPEG2 video</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream format</td></tr>
<tr><td>mpjpeg</td><td>Mime multipart JPEG format</td></tr>
<tr><td>mulaw</td><td>pcm mu law format</td></tr>
<tr><td>null</td><td>null video format</td></tr>
<tr><td>nut</td><td>nut format</td></tr>
<tr><td>ogg</td><td>Ogg format</td></tr>
<tr><td>psp</td><td>psp mp4 format</td></tr>
<tr><td>rawvideo</td><td>raw video format</td></tr>
<tr><td>rm</td><td>rm format</td></tr>
<tr><td>rtp</td><td>RTP output format</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian format</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian format</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit format</td></tr>
<tr><td>svcd</td><td>MPEG2 PS format (VOB)</td></tr>
<tr><td>swf</td><td>Flash format</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian format</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian format</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit format</td></tr>
<tr><td>vcd</td><td>MPEG1 System format (VCD)</td></tr>
<tr><td>vob</td><td>MPEG2 PS format (VOB)</td></tr>
<tr><td>voc</td><td>Creative Voice File format</td></tr>
<tr><td>wav</td><td>wav format</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe format</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream formatHandle</td></tr>
<tr><td>mpjpeg</td><td>Mime multipart JPEG formatHandle</td></tr>
<tr><td>mulaw</td><td>pcm mu law formatHandle</td></tr>
<tr><td>null</td><td>null video formatHandle</td></tr>
<tr><td>nut</td><td>nut formatHandle</td></tr>
<tr><td>ogg</td><td>Ogg formatHandle</td></tr>
<tr><td>psp</td><td>psp mp4 formatHandle</td></tr>
<tr><td>rawvideo</td><td>raw video formatHandle</td></tr>
<tr><td>rm</td><td>rm formatHandle</td></tr>
<tr><td>rtp</td><td>RTP output formatHandle</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian formatHandle</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian formatHandle</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit formatHandle</td></tr>
<tr><td>svcd</td><td>MPEG2 PS formatHandle (VOB)</td></tr>
<tr><td>swf</td><td>Flash formatHandle</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian formatHandle</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian formatHandle</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit formatHandle</td></tr>
<tr><td>vcd</td><td>MPEG1 System formatHandle (VCD)</td></tr>
<tr><td>vob</td><td>MPEG2 PS formatHandle (VOB)</td></tr>
<tr><td>voc</td><td>Creative Voice File formatHandle</td></tr>
<tr><td>wav</td><td>wav formatHandle</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe formatHandle</td></tr>
</table>
<a name="9"></a>
<h1>Built-in decoders and encoders</h1>
......
......@@ -62,7 +62,7 @@ table tr td {
Permette di impostare gli attributi specifici per la ricodifica del flusso audio. Se il metodo non viene richiamato su una nuova istanza di <em>EncodingAttributes</em> e, di conseguenza, nessun attributo di ricodifica audio viene specificato, allora l'encoder non effettuer&agrave; codifica audio. Il file di destinazione, di conseguenza, non conterr&agrave; alcuna traccia audio, anche se quello di origine ne ha una. Vedi paragrafo &quot;<a href="#3.1">Attributi di codifica audio</a>&quot;. </li>
<li><code>public void <strong>setVideoAttributes</strong>(it.sauronsoftware.jave.AudioAttributes videoAttributes)</code><br />
Permette di impostare gli attributi specifici per la ricodifica del flusso video. Se il metodo non viene richiamato su una nuova istanza di <em>EncodingAttributes</em> e, di conseguenza, nessun attributo di ricodifica video viene specificato, allora l'encoder non effettuer&agrave; codifica video. Il file di destinazione, di conseguenza, non conterr&agrave; alcuna traccia video, anche se quello di origine ne ha una. Vedi paragrafo &quot;<a href="#3.2">Attributi di codifica video</a>&quot;.</li>
<li><code>public void <strong>setFormat</strong>(java.lang.String format)</code><br />
<li><code>public void <strong>setFormat</strong>(java.lang.String formatHandle)</code><br />
Questo metodo serve per specificare il formato del contenitore dei flussi audio e video. Il formato va espresso mediante una stringa che ne rappresenta il nome. La lista dei nomi dei formati supportati pu&ograve; essere ricavata chiamando il metodo <em>getSupportedEncodingFormats()</em> su un oggetto di tipo <em>Encoder</em>.</li>
<li><code>public void <strong>setOffset</strong>(java.lang.Float offset)</code><br />
Questo metodo pu&ograve; essere richiamato per specificare un offset di ricodifica, cio&egrave; un taglio iniziale del flusso multimediale sorgente. Il valore del taglio &egrave; espresso in secondi, con la possibilit&agrave; di utilizzare valori decimali. Ad esempio se si vuole iniziare la ricodifica un flusso multimediale tagliandone i primi cinque secondi &egrave; sufficiente fornire all'encoder un'oggetto <em>EncodingAttributes</em> sul quale sia stato precedentemente richiamato il metodo <em>setOffset(5)</em>.</li>
......@@ -150,159 +150,159 @@ Permette di impostare gli attributi specifici per la ricodifica del flusso video
<h2>In lettura</h2>
<table>
<tr><th>Formato</th><th>Descrizione</th></tr>
<tr><td>4xm</td><td>4X Technologies format</td></tr>
<tr><td>MTV</td><td>MTV format</td></tr>
<tr><td>RoQ</td><td>Id RoQ format</td></tr>
<tr><td>4xm</td><td>4X Technologies formatHandle</td></tr>
<tr><td>MTV</td><td>MTV formatHandle</td></tr>
<tr><td>RoQ</td><td>Id RoQ formatHandle</td></tr>
<tr><td>aac</td><td>ADTS AAC</td></tr>
<tr><td>ac3</td><td>raw ac3</td></tr>
<tr><td>aiff</td><td>Audio IFF</td></tr>
<tr><td>alaw</td><td>pcm A law format</td></tr>
<tr><td>amr</td><td>3gpp amr file format</td></tr>
<tr><td>apc</td><td>CRYO APC format</td></tr>
<tr><td>alaw</td><td>pcm A law formatHandle</td></tr>
<tr><td>amr</td><td>3gpp amr file formatHandle</td></tr>
<tr><td>apc</td><td>CRYO APC formatHandle</td></tr>
<tr><td>ape</td><td>Monkey's Audio</td></tr>
<tr><td>asf</td><td>asf format</td></tr>
<tr><td>asf</td><td>asf formatHandle</td></tr>
<tr><td>au</td><td>SUN AU Format</td></tr>
<tr><td>avi</td><td>avi format</td></tr>
<tr><td>avi</td><td>avi formatHandle</td></tr>
<tr><td>avs</td><td>AVISynth</td></tr>
<tr><td>bethsoftvid</td><td>Bethesda Softworks 'Daggerfall' VID format</td></tr>
<tr><td>bethsoftvid</td><td>Bethesda Softworks 'Daggerfall' VID formatHandle</td></tr>
<tr><td>c93</td><td>Interplay C93</td></tr>
<tr><td>daud</td><td>D-Cinema audio format</td></tr>
<tr><td>dsicin</td><td>Delphine Software International CIN format</td></tr>
<tr><td>daud</td><td>D-Cinema audio formatHandle</td></tr>
<tr><td>dsicin</td><td>Delphine Software International CIN formatHandle</td></tr>
<tr><td>dts</td><td>raw dts</td></tr>
<tr><td>dv</td><td>DV video format</td></tr>
<tr><td>dv</td><td>DV video formatHandle</td></tr>
<tr><td>dxa</td><td>dxa</td></tr>
<tr><td>ea</td><td>Electronic Arts Multimedia Format</td></tr>
<tr><td>ea_cdata</td><td>Electronic Arts cdata</td></tr>
<tr><td>ffm</td><td>ffm format</td></tr>
<tr><td>film_cpk</td><td>Sega FILM/CPK format</td></tr>
<tr><td>ffm</td><td>ffm formatHandle</td></tr>
<tr><td>film_cpk</td><td>Sega FILM/CPK formatHandle</td></tr>
<tr><td>flac</td><td>raw flac</td></tr>
<tr><td>flic</td><td>FLI/FLC/FLX animation format</td></tr>
<tr><td>flv</td><td>flv format</td></tr>
<tr><td>flic</td><td>FLI/FLC/FLX animation formatHandle</td></tr>
<tr><td>flv</td><td>flv formatHandle</td></tr>
<tr><td>gif</td><td>GIF Animation</td></tr>
<tr><td>gxf</td><td>GXF format</td></tr>
<tr><td>gxf</td><td>GXF formatHandle</td></tr>
<tr><td>h261</td><td>raw h261</td></tr>
<tr><td>h263</td><td>raw h263</td></tr>
<tr><td>h264</td><td>raw H264 video format</td></tr>
<tr><td>idcin</td><td>Id CIN format</td></tr>
<tr><td>h264</td><td>raw H264 video formatHandle</td></tr>
<tr><td>idcin</td><td>Id CIN formatHandle</td></tr>
<tr><td>image2</td><td>image2 sequence</td></tr>
<tr><td>image2pipe</td><td>piped image2 sequence</td></tr>
<tr><td>ingenient</td><td>Ingenient MJPEG</td></tr>
<tr><td>ipmovie</td><td>Interplay MVE format</td></tr>
<tr><td>libnut</td><td>nut format</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video format</td></tr>
<tr><td>ipmovie</td><td>Interplay MVE formatHandle</td></tr>
<tr><td>libnut</td><td>nut formatHandle</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video formatHandle</td></tr>
<tr><td>matroska</td><td>Matroska File Format</td></tr>
<tr><td>mjpeg</td><td>MJPEG video</td></tr>
<tr><td>mm</td><td>American Laser Games MM format</td></tr>
<tr><td>mmf</td><td>mmf format</td></tr>
<tr><td>mov,mp4,m4a,3gp,3g2,mj2</td><td>QuickTime/MPEG4/Motion JPEG 2000 format</td></tr>
<tr><td>mm</td><td>American Laser Games MM formatHandle</td></tr>
<tr><td>mmf</td><td>mmf formatHandle</td></tr>
<tr><td>mov,mp4,m4a,3gp,3g2,mj2</td><td>QuickTime/MPEG4/Motion JPEG 2000 formatHandle</td></tr>
<tr><td>mp3</td><td>MPEG audio layer 3</td></tr>
<tr><td>mpc</td><td>musepack</td></tr>
<tr><td>mpc8</td><td>musepack8</td></tr>
<tr><td>mpeg</td><td>MPEG1 System format</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream format</td></tr>
<tr><td>mpegtsraw</td><td>MPEG2 raw transport stream format</td></tr>
<tr><td>mpeg</td><td>MPEG1 System formatHandle</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream formatHandle</td></tr>
<tr><td>mpegtsraw</td><td>MPEG2 raw transport stream formatHandle</td></tr>
<tr><td>mpegvideo</td><td>MPEG video</td></tr>
<tr><td>mulaw</td><td>pcm mu law format</td></tr>
<tr><td>mxf</td><td>MXF format</td></tr>
<tr><td>nsv</td><td>NullSoft Video format</td></tr>
<tr><td>nut</td><td>nut format</td></tr>
<tr><td>nuv</td><td>NuppelVideo format</td></tr>
<tr><td>ogg</td><td>Ogg format</td></tr>
<tr><td>psxstr</td><td>Sony Playstation STR format</td></tr>
<tr><td>rawvideo</td><td>raw video format</td></tr>
<tr><td>redir</td><td>Redirector format</td></tr>
<tr><td>rm</td><td>rm format</td></tr>
<tr><td>rtsp</td><td>RTSP input format</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian format</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian format</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit format</td></tr>
<tr><td>mulaw</td><td>pcm mu law formatHandle</td></tr>
<tr><td>mxf</td><td>MXF formatHandle</td></tr>
<tr><td>nsv</td><td>NullSoft Video formatHandle</td></tr>
<tr><td>nut</td><td>nut formatHandle</td></tr>
<tr><td>nuv</td><td>NuppelVideo formatHandle</td></tr>
<tr><td>ogg</td><td>Ogg formatHandle</td></tr>
<tr><td>psxstr</td><td>Sony Playstation STR formatHandle</td></tr>
<tr><td>rawvideo</td><td>raw video formatHandle</td></tr>
<tr><td>redir</td><td>Redirector formatHandle</td></tr>
<tr><td>rm</td><td>rm formatHandle</td></tr>
<tr><td>rtsp</td><td>RTSP input formatHandle</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian formatHandle</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian formatHandle</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit formatHandle</td></tr>
<tr><td>sdp</td><td>SDP</td></tr>
<tr><td>shn</td><td>raw shorten</td></tr>
<tr><td>siff</td><td>Beam Software SIFF</td></tr>
<tr><td>smk</td><td>Smacker Video</td></tr>
<tr><td>sol</td><td>Sierra SOL Format</td></tr>
<tr><td>swf</td><td>Flash format</td></tr>
<tr><td>swf</td><td>Flash formatHandle</td></tr>
<tr><td>thp</td><td>THP</td></tr>
<tr><td>tiertexseq</td><td>Tiertex Limited SEQ format</td></tr>
<tr><td>tiertexseq</td><td>Tiertex Limited SEQ formatHandle</td></tr>
<tr><td>tta</td><td>true-audio</td></tr>
<tr><td>txd</td><td>txd format</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian format</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian format</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit format</td></tr>
<tr><td>txd</td><td>txd formatHandle</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian formatHandle</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian formatHandle</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit formatHandle</td></tr>
<tr><td>vc1</td><td>raw vc1</td></tr>
<tr><td>vmd</td><td>Sierra VMD format</td></tr>
<tr><td>voc</td><td>Creative Voice File format</td></tr>
<tr><td>wav</td><td>wav format</td></tr>
<tr><td>wc3movie</td><td>Wing Commander III movie format</td></tr>
<tr><td>wsaud</td><td>Westwood Studios audio format</td></tr>
<tr><td>wsvqa</td><td>Westwood Studios VQA format</td></tr>
<tr><td>vmd</td><td>Sierra VMD formatHandle</td></tr>
<tr><td>voc</td><td>Creative Voice File formatHandle</td></tr>
<tr><td>wav</td><td>wav formatHandle</td></tr>
<tr><td>wc3movie</td><td>Wing Commander III movie formatHandle</td></tr>
<tr><td>wsaud</td><td>Westwood Studios audio formatHandle</td></tr>
<tr><td>wsvqa</td><td>Westwood Studios VQA formatHandle</td></tr>
<tr><td>wv</td><td>WavPack</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe format</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe formatHandle</td></tr>
</table>
<h2>In scrittura</h2>
<table>
<tr><th>Formato</th><th>Descrizione</th></tr>
<tr><td>3g2</td><td>3gp2 format</td></tr>
<tr><td>3gp</td><td>3gp format</td></tr>
<tr><td>RoQ</td><td>Id RoQ format</td></tr>
<tr><td>3g2</td><td>3gp2 formatHandle</td></tr>
<tr><td>3gp</td><td>3gp formatHandle</td></tr>
<tr><td>RoQ</td><td>Id RoQ formatHandle</td></tr>
<tr><td>ac3</td><td>raw ac3</td></tr>
<tr><td>adts</td><td>ADTS AAC</td></tr>
<tr><td>aiff</td><td>Audio IFF</td></tr>
<tr><td>alaw</td><td>pcm A law format</td></tr>
<tr><td>amr</td><td>3gpp amr file format</td></tr>
<tr><td>asf</td><td>asf format</td></tr>
<tr><td>asf_stream</td><td>asf format</td></tr>
<tr><td>alaw</td><td>pcm A law formatHandle</td></tr>
<tr><td>amr</td><td>3gpp amr file formatHandle</td></tr>
<tr><td>asf</td><td>asf formatHandle</td></tr>
<tr><td>asf_stream</td><td>asf formatHandle</td></tr>
<tr><td>au</td><td>SUN AU Format</td></tr>
<tr><td>avi</td><td>avi format</td></tr>
<tr><td>crc</td><td>crc testing format</td></tr>
<tr><td>dv</td><td>DV video format</td></tr>
<tr><td>dvd</td><td>MPEG2 PS format (DVD VOB)</td></tr>
<tr><td>ffm</td><td>ffm format</td></tr>
<tr><td>avi</td><td>avi formatHandle</td></tr>
<tr><td>crc</td><td>crc testing formatHandle</td></tr>
<tr><td>dv</td><td>DV video formatHandle</td></tr>
<tr><td>dvd</td><td>MPEG2 PS formatHandle (DVD VOB)</td></tr>
<tr><td>ffm</td><td>ffm formatHandle</td></tr>
<tr><td>flac</td><td>raw flac</td></tr>
<tr><td>flv</td><td>flv format</td></tr>
<tr><td>framecrc</td><td>framecrc testing format</td></tr>
<tr><td>flv</td><td>flv formatHandle</td></tr>
<tr><td>framecrc</td><td>framecrc testing formatHandle</td></tr>
<tr><td>gif</td><td>GIF Animation</td></tr>
<tr><td>gxf</td><td>GXF format</td></tr>
<tr><td>gxf</td><td>GXF formatHandle</td></tr>
<tr><td>h261</td><td>raw h261</td></tr>
<tr><td>h263</td><td>raw h263</td></tr>
<tr><td>h264</td><td>raw H264 video format</td></tr>
<tr><td>h264</td><td>raw H264 video formatHandle</td></tr>
<tr><td>image2</td><td>image2 sequence</td></tr>
<tr><td>image2pipe</td><td>piped image2 sequence</td></tr>
<tr><td>libnut</td><td>nut format</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video format</td></tr>
<tr><td>libnut</td><td>nut formatHandle</td></tr>
<tr><td>m4v</td><td>raw MPEG4 video formatHandle</td></tr>
<tr><td>matroska</td><td>Matroska File Format</td></tr>
<tr><td>mjpeg</td><td>MJPEG video</td></tr>
<tr><td>mmf</td><td>mmf format</td></tr>
<tr><td>mov</td><td>mov format</td></tr>
<tr><td>mmf</td><td>mmf formatHandle</td></tr>
<tr><td>mov</td><td>mov formatHandle</td></tr>
<tr><td>mp2</td><td>MPEG audio layer 2</td></tr>
<tr><td>mp3</td><td>MPEG audio layer 3</td></tr>
<tr><td>mp4</td><td>mp4 format</td></tr>
<tr><td>mpeg</td><td>MPEG1 System format</td></tr>
<tr><td>mp4</td><td>mp4 formatHandle</td></tr>
<tr><td>mpeg</td><td>MPEG1 System formatHandle</td></tr>
<tr><td>mpeg1video</td><td>MPEG video</td></tr>
<tr><td>mpeg2video</td><td>MPEG2 video</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream format</td></tr>
<tr><td>mpjpeg</td><td>Mime multipart JPEG format</td></tr>
<tr><td>mulaw</td><td>pcm mu law format</td></tr>
<tr><td>null</td><td>null video format</td></tr>
<tr><td>nut</td><td>nut format</td></tr>
<tr><td>ogg</td><td>Ogg format</td></tr>
<tr><td>psp</td><td>psp mp4 format</td></tr>
<tr><td>rawvideo</td><td>raw video format</td></tr>
<tr><td>rm</td><td>rm format</td></tr>
<tr><td>rtp</td><td>RTP output format</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian format</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian format</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit format</td></tr>
<tr><td>svcd</td><td>MPEG2 PS format (VOB)</td></tr>
<tr><td>swf</td><td>Flash format</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian format</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian format</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit format</td></tr>
<tr><td>vcd</td><td>MPEG1 System format (VCD)</td></tr>
<tr><td>vob</td><td>MPEG2 PS format (VOB)</td></tr>
<tr><td>voc</td><td>Creative Voice File format</td></tr>
<tr><td>wav</td><td>wav format</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe format</td></tr>
<tr><td>mpegts</td><td>MPEG2 transport stream formatHandle</td></tr>
<tr><td>mpjpeg</td><td>Mime multipart JPEG formatHandle</td></tr>
<tr><td>mulaw</td><td>pcm mu law formatHandle</td></tr>
<tr><td>null</td><td>null video formatHandle</td></tr>
<tr><td>nut</td><td>nut formatHandle</td></tr>
<tr><td>ogg</td><td>Ogg formatHandle</td></tr>
<tr><td>psp</td><td>psp mp4 formatHandle</td></tr>
<tr><td>rawvideo</td><td>raw video formatHandle</td></tr>
<tr><td>rm</td><td>rm formatHandle</td></tr>
<tr><td>rtp</td><td>RTP output formatHandle</td></tr>
<tr><td>s16be</td><td>pcm signed 16 bit big endian formatHandle</td></tr>
<tr><td>s16le</td><td>pcm signed 16 bit little endian formatHandle</td></tr>
<tr><td>s8</td><td>pcm signed 8 bit formatHandle</td></tr>
<tr><td>svcd</td><td>MPEG2 PS formatHandle (VOB)</td></tr>
<tr><td>swf</td><td>Flash formatHandle</td></tr>
<tr><td>u16be</td><td>pcm unsigned 16 bit big endian formatHandle</td></tr>
<tr><td>u16le</td><td>pcm unsigned 16 bit little endian formatHandle</td></tr>
<tr><td>u8</td><td>pcm unsigned 8 bit formatHandle</td></tr>
<tr><td>vcd</td><td>MPEG1 System formatHandle (VCD)</td></tr>
<tr><td>vob</td><td>MPEG2 PS formatHandle (VOB)</td></tr>
<tr><td>voc</td><td>Creative Voice File formatHandle</td></tr>
<tr><td>wav</td><td>wav formatHandle</td></tr>
<tr><td>yuv4mpegpipe</td><td>YUV4MPEG pipe formatHandle</td></tr>
</table>
<a name="9"></a>
<h1>Codec e decoder compresi</h1>
......
......@@ -2,9 +2,18 @@ package com.yanzuoguang.util;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.StringHelper;
import com.yanzuoguang.util.printer.ConvertPlan;
import com.yanzuoguang.util.printer.PrinterFormatHandle;
import com.yanzuoguang.util.printer.format.FormatCenter;
import com.yanzuoguang.util.printer.vo.PrinterPagerData;
import com.yanzuoguang.util.printer.vo.PrinterPagerItemData;
import com.yanzuoguang.util.vo.MapRow;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
......@@ -52,7 +61,102 @@ public class PrinterHelper {
}
/**
* 将数据格式化为新得数据
* 将来源模板与数据转换为目标模板和数据
*
* @param pager 来源模板
* @param datas 来源数据
* @return
*/
public static ConvertPlan convert(String pager, double left, double top, Object... datas) {
return convert(pager, left, top, Arrays.asList(datas));
}
/**
* 将来源模板与数据转换为目标模板和数据
*
* @param pager 来源模板
* @param datas 来源数据
* @return
*/
public static ConvertPlan convert(String pager, double left, double top, List<Object> datas) {
ConvertPlan from = new ConvertPlan();
from.setPager(pager);
from.setDatas(datas);
return convert(from, left, top);
}
/**
* 将来源模板转换为目标模板
*
* @param from 来源计划
* @param left 左边距离
* @param top 右边距离
* @return
*/
public static ConvertPlan<MapRow> convert(ConvertPlan from, double left, double top) {
// 设置生成结果
ConvertPlan<MapRow> to = new ConvertPlan();
// 判断是否为空
if (StringHelper.isEmpty(from.getPager()) || from.getDatas() == null || from.getDatas().size() < 1) {
return to;
}
// 解析模板格式
PrinterPagerData pager;
try {
pager = JsonHelper.deserialize(from.getPager(), PrinterPagerData.class);
} catch (Exception ex) {
throw new CodeException("不能识别模板", ex);
}
// 设置偏移量
pager.setMarginTop(pager.getMarginTop() + top);
pager.setMarginLeft(pager.getMarginLeft() + left);
// 初始化目标数据
int length = from.getDatas().size();
for (int i = 0; i < length; i++) {
to.getDatas().add(new MapRow());
}
// 遍历模板,对每个模板格式化字符串进行处理
for (PrinterPagerItemData item : pager.getItems()) {
// 判断是否需要格式化
if (StringHelper.isEmpty(item.getFormat())) {
continue;
}
// 生成目标格式化字符串
String format = getFormat(item.getFormat(), item.getName(), new PrinterFormatHandle() {
@Override
public void addPos(StringBuilder sb, String fieldFull, String field, String command) {
// 对现有的字段进行加密
sb.append("{");
String fieldTo = field;
if (!StringHelper.isEmpty(command)) {
fieldTo = StringHelper.md5(fieldFull);
}
sb.append(fieldTo);
sb.append("}");
// 写入加密后的数目
for (int i = 0; i < length; i++) {
Object rowFrom = from.getDatas().get(i);
String fromValue = ObjectHelper.getString(rowFrom, field);
String toValue = fromValue;
if (!StringHelper.isEmpty(command)) {
toValue = FormatCenter.getFormatValue(command, fromValue);
}
MapRow rowTo = to.getDatas().get(i);
rowTo.put(fieldTo, toValue);
}
}
});
item.setFormat(format);
}
// 设置生成模板
to.setPager(JsonHelper.serialize(pager));
return to;
}
/**
* 将数据格式化为新得数据,用于转换单行数据
*
* @param resultTo 结果数据
* @param resultFrom 结果来源
......@@ -64,21 +168,22 @@ public class PrinterHelper {
String format, String defaultField) {
return getFormat(format, defaultField, new PrinterFormatHandle() {
@Override
public void addPos(StringBuilder sb, String fieldFull, String field, String fieldFormat) {
public void addPos(StringBuilder sb, String fieldFull, String field, String command) {
sb.append("{");
Object fieldValue = ObjectHelper.get(resultFrom, field);
if (!StringHelper.isEmpty(fieldFormat)) {
field = StringHelper.md5(fieldFull);
String fieldTo = field;
if (!StringHelper.isEmpty(command)) {
fieldTo = StringHelper.md5(fieldFull);
}
sb.append(field);
resultTo.put(field, fieldValue);
sb.append(fieldTo);
resultTo.put(fieldTo, fieldValue);
sb.append("}");
}
});
}
/**
* 获取结果字符串,调用本方法前请先调用getFormatTo函数
* 获取结果字符串,用于转换单行数据,调用本方法前请先调用getFormatTo函数
*
* @param resultFrom 来源字符
* @param format 格式化字符串
......@@ -87,7 +192,7 @@ public class PrinterHelper {
public static String getResult(Object resultFrom, String format) {
return getFormat(format, StringHelper.EMPTY, new PrinterFormatHandle() {
@Override
public void addPos(StringBuilder sb, String fieldFull, String field, String fieldFormat) {
public void addPos(StringBuilder sb, String fieldFull, String field, String command) {
Object fieldValue = ObjectHelper.get(resultFrom, field);
sb.append(fieldValue);
}
......
package com.yanzuoguang.util.printer;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
/**
* 转换计划
*/
public class ConvertPlan<T extends Object> {
/**
* 来源模板
*/
@ApiModelProperty(notes = "来源模板", position = 10)
private String pager;
/**
* 来源数据
*/
@ApiModelProperty(notes = "来源数据", position = 10)
private List<T> datas = new ArrayList<>();
public String getPager() {
return pager;
}
public void setPager(String pager) {
this.pager = pager;
}
public List<T> getDatas() {
return datas;
}
public void setDatas(List<T> datas) {
this.datas = datas;
}
}
......@@ -8,7 +8,7 @@ public interface PrinterFormatHandle {
* @param sb 返回得结果模板
* @param fieldFull 全格式
* @param field 字段
* @param fieldFormat 字段格式化
* @param command 字段格式化
*/
void addPos(StringBuilder sb, String fieldFull, String field, String fieldFormat);
void addPos(StringBuilder sb, String fieldFull, String field, String command);
}
package com.yanzuoguang.util.printer.format;
import com.yanzuoguang.util.exception.CodeException;
import com.yanzuoguang.util.helper.StringHelper;
import java.util.HashMap;
import java.util.Map;
/**
* 格式化处理中心
*
* @author 颜佐光
*/
public class FormatCenter {
private static FormatCenter formatCenter = new FormatCenter();
private Map<String, FormatHandle> cache = new HashMap<>();
private boolean init = false;
private FormatCenter() {
}
/**
* 添加默认支持的格式化组件
*/
private void initDefault() {
if (init) {
return;
}
synchronized (this) {
addHandle("*", new FormatHandleDefault());
this.init = true;
}
}
/**
* 添加处理函数
*
* @param name
* @param formatHandle
*/
private void addHandle(String name, FormatHandle formatHandle) {
cache.put(name, formatHandle);
}
/**
* 格式化字符串
*
* @param command 格式化的命令
* @param formatValue 需要格式化的值
* @return
*/
private String format(String command, String formatValue) {
this.initDefault();
if (StringHelper.isEmpty(command)) {
throw new CodeException("你需要格式化的字符串格式为空");
}
String[] commands = command.split(":");
String name = commands[0];
String format = StringHelper.EMPTY;
if (commands.length > 1) {
format = command.substring(name.length() + 1);
}
FormatHandle formatHandle = cache.get(name);
if (formatHandle == null) {
throw new CodeException("需要格式化的字符串不支持");
}
return formatHandle.getFormat(name, format, formatValue);
}
/**
* 添加处理函数
*
* @param command 需要格式化的命令字符串
* @param formatValue 格式化的值
* @return
*/
public static String getFormatValue(String command, String formatValue) {
return formatCenter.format(command, formatValue);
}
/**
* 添加处理函数
*
* @param name 支持的名称
* @param formatHandle 支持的处理方式
* @return
*/
public static void register(String name, FormatHandle formatHandle) {
formatCenter.addHandle(name, formatHandle);
}
}
package com.yanzuoguang.util.printer.format;
public interface FormatHandle {
/**
* 格式化字符串
*
* @param formatName 格式化名称
* @param format 格式
* @param formatValue 需要格式化的值
* @return
*/
String getFormat(String formatName, String format, String formatValue);
}
package com.yanzuoguang.util.printer.format;
import com.yanzuoguang.util.helper.StringHelper;
/**
* 默认格式化字符串
*
* @author 颜佐光
*/
public class FormatHandleDefault implements FormatHandle {
public static final int START_DEFAULT = 3;
public static final int END_DEFAULT = 3;
public static final int SIZE_DEFAULT = 5;
/**
* 格式化字符串
*
* @param formatName 格式化名称
* @param format 格式
* @param formatValue 需要格式化的值
* @return
*/
@Override
public String getFormat(String formatName, String format, String formatValue) {
// 设置默认值
format = StringHelper.getFirst(format, StringHelper.EMPTY);
formatValue = StringHelper.getFirst(formatValue, StringHelper.EMPTY);
// 设置格式化字符串
String[] formats = format.split(",");
int start = StringHelper.toInt(formats[0], START_DEFAULT);
int end = END_DEFAULT;
int maxSize = SIZE_DEFAULT;
if (formats.length > 1) {
end = StringHelper.toInt(formats[1], END_DEFAULT);
}
if (formats.length > 2) {
maxSize = StringHelper.toInt(formats[2], SIZE_DEFAULT);
}
int size = formatValue.length() - start - end;
// 设置最大
size = Math.min(size, maxSize);
if (size < 1) {
return formatValue;
}
StringBuilder sb = new StringBuilder();
sb.append(formatValue.substring(0, start));
for (int i = 0; i < size; i++) {
sb.append("*");
}
sb.append(formatValue.substring(formatValue.length() - end));
return sb.toString();
}
}
......@@ -3,6 +3,7 @@ package helper;
import com.yanzuoguang.util.PrinterHelper;
import com.yanzuoguang.util.helper.FileHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.printer.ConvertPlan;
import com.yanzuoguang.util.printer.vo.PrinterPagerData;
import org.junit.Test;
......@@ -37,6 +38,27 @@ public class TestPrinterHelper {
FileHelper.writeFile(new File(getTargetFile()), toJson, "utf-8");
}
@Test
public void testPrinterConvert() {
Map<String, Object> from = new HashMap<>();
from.put("OrderId", "11111");
from.put("createDate", "2019-12-21 12:35");
from.put("codeNo", "123456789");
from.put("channelName", "自助机");
from.put("buyNum", "购买数量");
from.put("productName", "长江索道单程票");
from.put("PlayerType", "游客类型");
from.put("salePriceTotal", "25");
String fromJson = FileHelper.readFile(new File(getFile()), "utf-8");
ConvertPlan convert = PrinterHelper.convert(fromJson, 0, 0, from);
FileHelper.writeFile(new File(getTargetFile()), convert.getPager(), "utf-8");
String toJson = JsonHelper.serialize(convert.getDatas(), true);
FileHelper.writeFile(new File(getTargetDataFile()), toJson, "utf-8");
}
private String getFile() {
// 注意,路径应为文件在工程中的相对路径
File f = new File("src/test/java/helper/from.json");
......@@ -53,4 +75,11 @@ public class TestPrinterHelper {
File f = new File("target/to.json");
return f.getAbsolutePath();
}
private String getTargetDataFile() {
// 注意,路径应为文件在工程中的相对路径
File f = new File("target/toData.json");
return f.getAbsolutePath();
}
}
{"PageWidth":73,"PageHeight":50,"MarginTop":125,"MarginRight":0,"MarginBottom":0,"MarginLeft":0,"PrintAngle":0,"Items":[{"Name":"OrderId","Type":1,"IsVisible":true,"Top":4.266013763896241,"Left":25.329221810481734,"Width":39.926945473795655,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"订单编号:{0}","FormatValue":"订单编号:"},{"Name":"createDate","Type":1,"IsVisible":true,"Top":14.942985706723134,"Left":25.34970884065643,"Width":46.9081524616199,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"出票时间:{0}","FormatValue":"出票时间:2019-10-16 16:11:01"},{"Name":"codeNo","Type":2,"IsVisible":true,"Top":4.51799894123875,"Left":5.020275277924827,"Width":18.073398623610373,"Height":18.073398623610373,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"","FormatValue":"01234567890123"},{"Name":"codeNo","Type":1,"IsVisible":true,"Top":9.331815775542616,"Left":25.329221810481734,"Width":40.72922181048174,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"电子券号:{0}","FormatValue":"电子券号:01234567890123"},{"Name":"channelName","Type":1,"IsVisible":true,"Top":29.861302276336687,"Left":5.065802011646373,"Width":43.971678136580195,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"渠道来源:{0}","FormatValue":"渠道来源:窗口"},{"Name":"buyNum","Type":1,"IsVisible":true,"Top":34.676283748014825,"Left":5.067840127051349,"Width":33.0574377977766,"Height":5.558496559025939,"Font":"微软雅黑,12pt,style=Underline","TextAlign":1,"Format":"可用人数:{0}","FormatValue":"可用人数:1"},{"Name":"Common","Type":0,"IsVisible":true,"Top":40.497617787188986,"Left":5.012122816304924,"Width":65.82530439385918,"Height":8.99947061937533,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"索道门票限当日22:00前使用,巴士门票限当日19:00前使用,一经售出不可退换(北站售)","FormatValue":"索道门票限当日22:00前使用,巴士门票限当日19:00前使用,一经售出不可退换(北站售)"},{"Name":"productName","Type":1,"IsVisible":true,"Top":24.795976707252514,"Left":5.065802011646373,"Width":46.883271572260455,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"客票类别:{0}","FormatValue":"客票类别:途比达门票(自动修改)"},{"Name":"PlayerType","Type":1,"IsVisible":true,"Top":19.730121757543674,"Left":25.329221810481734,"Width":26.35322922181048,"Height":4.235044997353096,"Font":"微软雅黑,9pt,style=Underline","TextAlign":1,"Format":"游客类型:{0}","FormatValue":"游客类型:"},{"Name":"salePriceTotal","Type":1,"IsVisible":true,"Top":34.66225516146109,"Left":39.194547379565904,"Width":29.2649550026469,"Height":5.558496559025939,"Font":"微软雅黑,12pt,style=Underline","TextAlign":1,"Format":"票价:{0}","FormatValue":"票价:20"}]}
\ No newline at end of file
{
"PageWidth": 73,
"PageHeight": 50,
"MarginTop": 125,
"MarginRight": 0,
"MarginBottom": 0,
"MarginLeft": 0,
"PrintAngle": 0,
"Items": [
{
"Name": "OrderId",
"Type": 1,
"IsVisible": true,
"Top": 4.266013763896241,
"Left": 25.329221810481734,
"Width": 39.926945473795655,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "订单编号:{0}",
"FormatValue": "订单编号:"
},
{
"Name": "createDate",
"Type": 1,
"IsVisible": true,
"Top": 14.942985706723134,
"Left": 25.34970884065643,
"Width": 46.9081524616199,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "出票时间:{0}",
"FormatValue": "出票时间:2019-10-16 16:11:01"
},
{
"Name": "codeNo",
"Type": 2,
"IsVisible": true,
"Top": 4.51799894123875,
"Left": 5.020275277924827,
"Width": 18.073398623610373,
"Height": 18.073398623610373,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "",
"FormatValue": "01234567890123"
},
{
"Name": "codeNo",
"Type": 1,
"IsVisible": true,
"Top": 9.331815775542616,
"Left": 25.329221810481734,
"Width": 40.72922181048174,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "电子券号:{0}",
"FormatValue": "电子券号:01234567890123"
},
{
"Name": "channelName",
"Type": 1,
"IsVisible": true,
"Top": 29.861302276336687,
"Left": 5.065802011646373,
"Width": 43.971678136580195,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "渠道来源:{0}",
"FormatValue": "渠道来源:窗口"
},
{
"Name": "buyNum",
"Type": 1,
"IsVisible": true,
"Top": 34.676283748014825,
"Left": 5.067840127051349,
"Width": 33.0574377977766,
"Height": 5.558496559025939,
"Font": "微软雅黑,12pt,style=Underline",
"TextAlign": 1,
"Format": "可用人数:{0}",
"FormatValue": "可用人数:1"
},
{
"Name": "Common",
"Type": 0,
"IsVisible": true,
"Top": 40.497617787188986,
"Left": 5.012122816304924,
"Width": 65.82530439385918,
"Height": 8.99947061937533,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "索道门票限当日22:00前使用,巴士门票限当日19:00前使用,一经售出不可退换(北站售)",
"FormatValue": "索道门票限当日22:00前使用,巴士门票限当日19:00前使用,一经售出不可退换(北站售)"
},
{
"Name": "productName",
"Type": 1,
"IsVisible": true,
"Top": 24.795976707252514,
"Left": 5.065802011646373,
"Width": 46.883271572260455,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "客票类别:{0:*:2,2,1}",
"FormatValue": "客票类别:途比达门票(自动修改)"
},
{
"Name": "PlayerType",
"Type": 1,
"IsVisible": true,
"Top": 19.730121757543674,
"Left": 25.329221810481734,
"Width": 26.35322922181048,
"Height": 4.235044997353096,
"Font": "微软雅黑,9pt,style=Underline",
"TextAlign": 1,
"Format": "游客类型:{0}",
"FormatValue": "游客类型:"
},
{
"Name": "salePriceTotal",
"Type": 1,
"IsVisible": true,
"Top": 34.66225516146109,
"Left": 39.194547379565904,
"Width": 29.2649550026469,
"Height": 5.558496559025939,
"Font": "微软雅黑,12pt,style=Underline",
"TextAlign": 1,
"Format": "票价:{0}",
"FormatValue": "票价:20"
}
]
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment