recordmovie.html

来自「这个是java的quicktime for java 的详细使用文档」· HTML 代码 · 共 501 行 · 第 1/2 页

HTML
501
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Mon Jul 15 11:49:44 PDT 2002 --><TITLE>: Class  RecordMovie</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/RecordMovie.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../quicktime/app/QTFactory.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="RecordMovie.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">quicktime.app</FONT><BR>Class  RecordMovie</H2><PRE>java.lang.Object  |  +--<B>quicktime.app.RecordMovie</B></PRE><HR><DL><DT>public class <B>RecordMovie</B><DT>extends java.lang.Object</DL><P>This class is used to record a movie from a source QDGraphics. It provides a profiling mode so that the an estimate of the compression time for each frame captured. The use of this class can enable a movie to be recorded where the record rate is unrelated to the capture rate. That is, a recorded rate of 10 frames a second can be specified and each frame that is captured will have a duration of 1/10 of a second regardless of how long the compression process takes or how often the frameReady method is called. <P> Typically this class is used as a utility service by some other class that wants to provide recording capabilities. When a RecordMovie object is set in the target class, the target class notifies the RecordMovie object that it now has a source QDGraphics. Whenever appropriate, the target class then notifies the RecordMovie object that a frame is ready to be captured from the QDGraphics object and the RecordMovie object either captures that frame or profiles the compression based on its current mode of operation. When the frameReady method has been called the specified number of frames when recording it returns false to indicate that it is no longer interested and the target class can discard the RecordMovie object and ceases notification of frame readiness. In its turn the RecordMovie disavows any knowledge of the QDGraphics object it was compressing until the next time it receives notification that it has been added to a source. <P> Once a movie has completed recording the RecordMovie object will spawn a thread and call the RecordMovieCallback's finish method with the movie that has just been recorded. The recorded movie will have a video track added with all of the data captured and the application can at this point do whatever is appropriate with the movie - save it, play it back, etc. Each record operation will add a new video track with the specified compression and visual  media characteristics.  <P> An example usage of the RecordMovie class: <pre> 	RecordMovie rm = new RecordMovie (myMovie, myRecordCallback); 	rm.setCompressionSettings (...); 	myRecordThis.setRecordMovie (rm); </pre> An example definition of a Class that uses the RecordMovie object to capture its QDGraphics: <pre> 	class RecordThis {		QDGraphics g;		RecordMovie rm; 		public void setRecordMovie (RecordMovie rm) throws QTException {			rm.addedToSource (g);			this.rm = rm;		}			// some call in this object that is responsible for drawing		void blitImage () {			//do blit to g			//....			if (rm != null && rm.frameReady() == false) //capture current state of g				rm = null;                              //no longer interested drop reference to rm		}	} </pre><P><DL><DT><B>See Also: </B><DD><CODE>quicktime.app.display.Compositor</CODE></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../quicktime/app/RecordMovie.html#RecordMovie()">RecordMovie</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a default RecordMovie object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../quicktime/app/RecordMovie.html#RecordMovie(quicktime.std.movies.Movie, quicktime.app.RecordMovieCallback)">RecordMovie</A></B>(<A HREF="../../quicktime/std/movies/Movie.html">Movie</A>&nbsp;theMovie,            <A HREF="../../quicktime/app/RecordMovieCallback.html">RecordMovieCallback</A>&nbsp;cBack)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record the output of each composited image to a frame.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../quicktime/app/RecordMovie.html#RecordMovie(quicktime.std.movies.Movie, quicktime.app.RecordMovieCallback, quicktime.qd.QDRect)">RecordMovie</A></B>(<A HREF="../../quicktime/std/movies/Movie.html">Movie</A>&nbsp;theMovie,            <A HREF="../../quicktime/app/RecordMovieCallback.html">RecordMovieCallback</A>&nbsp;cBack,            <A HREF="../../quicktime/qd/QDRect.html">QDRect</A>&nbsp;rectBounds)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Record the output of each composited image to a frame.</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><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="../../quicktime/app/RecordMovie.html#abortRecording()">abortRecording</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aborts recording before it has completed.</TD></TR><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="../../quicktime/app/RecordMovie.html#addedToSource(quicktime.qd.QDGraphics)">addedToSource</A></B>(<A HREF="../../quicktime/qd/QDGraphics.html">QDGraphics</A>&nbsp;g)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method is called by the target object that control the drawing and capturing of the image  drawn in the QDGraphics.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../quicktime/app/RecordMovie.html#frameReady()">frameReady</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The source of the record operation calls this method whether the RecordMovie object is preflighting or recording whenever it is appropriate for the RecordMovie object to capture the current state of the QDGraphics.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../quicktime/app/RecordMovie.html#isPreflighting()">isPreflighting</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the RecordMovie object is preflighting a compression operation.</TD></TR><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="../../quicktime/app/RecordMovie.html#recordMode(int)">recordMode</A></B>(int&nbsp;numRecordFrames)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Places a RecordMovie object in record mode.</TD></TR><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="../../quicktime/app/RecordMovie.html#setCompressionSettings(int, int, int, int, int, quicktime.std.image.CodecComponent)">setCompressionSettings</A></B>(int&nbsp;scale,                       int&nbsp;spatialQuality,                       int&nbsp;temporalQuality,                       int&nbsp;keyFrameRate,                       int&nbsp;codecType,                       <A HREF="../../quicktime/std/image/CodecComponent.html">CodecComponent</A>&nbsp;codec)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Establishes the type of compression that will be applied to the source QDGraphics when the recording or preflighting is done.</TD></TR><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="../../quicktime/app/RecordMovie.html#setMovie(quicktime.std.movies.Movie, quicktime.app.RecordMovieCallback)">setMovie</A></B>(<A HREF="../../quicktime/std/movies/Movie.html">Movie</A>&nbsp;theMovie,         <A HREF="../../quicktime/app/RecordMovieCallback.html">RecordMovieCallback</A>&nbsp;cBack)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the movie that a video track will be added to in any consequent record operation and the callback object that will be called when the movie is finished recording.</TD></TR><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="../../quicktime/app/RecordMovie.html#setPreflighting(boolean)">setPreflighting</A></B>(boolean&nbsp;flag)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This call will do a preflight of the record and you will be able to asses the impact of compressing a single pass of the QDGraphics target.</TD></TR>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?