⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 manager.html

📁 JMF原版英文说明文档
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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 Sat May 20 18:57:46 PDT 2000 --><TITLE>: Class  Manager</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 ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="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="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT ID="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="../../javax/media/InternalErrorEvent.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/media/MediaEvent.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>  &nbsp;&nbsp;<A HREF="Manager.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media</FONT><BR>Class  Manager</H2><PRE>java.lang.Object  |  +--<B>javax.media.Manager</B></PRE><HR><DL><DT>public final class <B>Manager</B><DT>extends java.lang.Object</DL><P><code>Manager</code> is the access point for obtaining system dependent resources such as <code>Players</code>, <code>DataSources</code>, <code>Processors</code>, <code>DataSinks</code>, the system <code>TimeBase</code>, the cloneable and merging utility <code>DataSources</code>. <p> A <code>DataSource</code> is an object used to  deliver time-based multimedia data that is specific to a delivery protocol. <p> A <code>Player</code> is an object used to control and render multimedia data that is specific to the content type of the data. <p> A <code>Processor</code> is an object similar to a Player which is used to process data and output the processed data. <p> A <code>DataSink</code> is an object that takes a <code>DataSource</code> as input and renders the output to a specified destination. <p> A <code>DataSource</code> provides a <code>Player</code>, <code>Processor</code> or <code>DataSink</code> with media data; a <CODE>Player</CODE>, <code>Processor</code> or <code>DataSink</code>  must have a <CODE>DataSource</CODE>. <code>Manager</code> provides access to a protocol and media independent mechanism for constructing <code>DataSources</code>, <code>Players</code>,  <code>Processors</code> and <code>DataSinks</code>.  <h2>Creating Players and DataSources</h2> <code>Manager</code> will create<code>Players</code> from a <code>URL</code>, a <CODE>MediaLocator</CODE> or a <code>DataSource</code>. Creating a <code>Player</code> requires the following: <ul> <li> Obtain the connected <code>DataSource</code> for the specified protocol <li> Obtain the <code>Player</code> for the content-type specified by the <code>DataSource</code> <li> Attach the <code>DataSource</code> to the <code>Player</code> using the <code>setSource</code> method. </ul> <h3>Finding DataSources by Protocol</h3> A <code>MediaLocator</code> defines a protocol for obtaining content. <code>DataSources</code> are identified by the protocol that they support. <code>Manager</code> uses the protocol name to find <code>DataSource</code> classes. <p>  To find a <code>DataSource</code> using a <code>MediaLocator</code>, <code>Manager</code> constructs a list of class names from the protocol package-prefix list and the protocol name obtained from the <code>MediaLocator</code>. For each class name in the constructed list a new <code>DataSource</code> is instantiated, the <code>MediaLocator</code> is attached, and the <code>DataSource</code> is connected. If no errors have occurred, the procces is considered finished and the connected <code>DataSource</code> is used by <code>Manager</code> in any following operations. If there was an error then the next class name in the list is tried. The exact details of the search algorithm is described in the method documentation below. <h3>Finding Players by Content Type</h3> A <code>Player</code> is a <code>MediaHandler</code>. A <code>MediaHandler</code> is a an object that reads data from a <code>DataSource</code>. There are three types of supported <code>MediaHandler</code>: <code>MediaProxy</code>, <code>Player</code> and <code>Processor</code>. <p> <code>MediaHandlers</code> are identified by the content type that they support. A <code>DataSource</code> identifies the content type of the data it produces with the <code>getContentType</code> method. <code>Manager</code> uses the content type name to find instances of <code>MediaHandler</code>. <p> To find a <code>MediaHandler</code> using a content type name, <code>Manager</code> constructs a list of class names from the content package-prefix list and the content type name. For each class name in the constructed list a new <code>MediaHandler</code> is instantiated, and the <code>DataSource</code> is attached to the <code>MediaHandler</code> using <coded>MediaHandler.setSource</code>. <p> If the <code>MediaHandler</code> is a <code>Player</code> and the <code>setSource</code> was successful the process is finished and the <code>Player</code> is returned. If the <code>setSource</code> failed, another name in the list is tried. <p> If the <code>MediaHandler</code> is a <code>MediaProxy</code> then a new <code>DataSource</code> is obtained from the <code>MediaProxy</code>, a new list is created for the content type the <code>DataSource</code> supports and the whole thing is tried again. <p>  If a valid <code>Player</code> is not found then the whole procedure is repeated with "unknown" substituted for the content-type name. The "unknown" content type is supported by generic <code>Players</code> that are capable of handling a large variety of media types, often in a platform dependent way.<p> The detailed creation algorithm is specified in the methods below. <h3>Creating a Realized Player</h3>  Versions of <code>createRealizedPlayer</code> calls are provided as an  acceleration to create a Player.  The returned player is in the <I>Realized</I> state.  In addition to <code>NoPlayerException</code> and <code>IOException</code>, <code>CannotRealizeException</code> can be thrown if the <code>Manager</code> cannot realize the  <code>Player</code>. <p> <h2>Creating Processors</h2>  <code>Processors</code> are created in the same way as <code>Players</code> as outlined above.  <code>Manager</code> also provides an additional way  to create a Processor via the <code>createRealizedProcessor</code> call.  A  <code>ProcessorModel</code> is used to fully identify the input and output requirements of a <code>Processor</code>.  The <code>createRealizedProcessor</code> call takes a  <code>ProcessorModel</code> as input and create a <code>Processor</code>  that adheres to the given <code>ProcessorModel</code>.  The returned Processor is in the <I>Realized</I> state.  The method is a blocking call.<p> If the <code>Manager</code> fails to find a <code>Processor</code> that fits the <code>ProcessorModel</code>, a  <code>NoProcessorException</code> is thrown.  If there is a problem creating and realizing a <code>Processor</code>, it will throw an  <code>IOException</code> or <code>CannotRealizeException</code> depending  on the circumstances. <h2>Creating DataSinks</h2> <code>DataSinks</code> are created from an input <code>DataSource</code> <code>MediaLocator</code>.  The <code>MediaLocator</code> identifies the protocol and content of the <code>DataSink</code> to be used.  The search for the particular <code>DataSink</code> class to be created is similar to the process of creating a <code>DataSource</code>.  The detail search and creation algorithm is described in the method documentation below. <h2>Player and Processor Threads</h2> <code>Players</code> and <code>Processors</code> process media data  asynchronously from the main program flow. This implies that a <code>Player</code> or <code>Processor</code> must  often manage one or more threads. The threads managed by the <code>Player</code> or <code>Processor</code> are not in the thread group of the application that calls <code>createPlayer</code> or <code>createProcessor</code>. <h2>System Time Base</h2> All <code>Players</code> need a <code>TimeBase</code>. Many   use a system-wide <code>TimeBase</code>, often based on a time-of-day clock. <code>Manager</code> provides access to the system <code>TimeBase</code> through <code>getSystemTimeBase</code>. <h2>Cloning and Merging DataSources</h2> <code>DataSources</code> can be cloned or merged.  If a <code>DataSource</code> is cloned, more than one  <code>MediaHandler</code> can use it as input.  Merging more than one <code>DataSources</code> will generate one <code>DataSource</code> which contains all the <code>SourceStreams</code> of the constituent <code>DataSources</code><p>   The <code>Manager</code> provides two methods: <code>createCloneableDataSource</code> and <code>createMergingDataSource</code> for such purpose. <p> <h2>Manager Hints</h2>

⌨️ 快捷键说明

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