当前位置: 首页>>代码示例>>Java>>正文


Java CaptureDeviceManager类代码示例

本文整理汇总了Java中javax.media.CaptureDeviceManager的典型用法代码示例。如果您正苦于以下问题:Java CaptureDeviceManager类的具体用法?Java CaptureDeviceManager怎么用?Java CaptureDeviceManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


CaptureDeviceManager类属于javax.media包,在下文中一共展示了CaptureDeviceManager类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: JmfCaptureDeviceList

import javax.media.CaptureDeviceManager; //导入依赖的package包/类
public JmfCaptureDeviceList() throws NyARRuntimeException
{ 
	this._devices = (Vector<CaptureDeviceInfo>)(CaptureDeviceManager.getDeviceList(null).clone());
	// ビデオソースのデバイスだけ残す
	try {

		for (int i = 0; i < this._devices.size();) {
			CaptureDeviceInfo cdi =this._devices.elementAt(i);
			// VideoFormatもってるかな?
			if (!isCaptureDevice(cdi)) {
				this._devices.remove(i);
				continue;
			}
			i++;
		}
	} catch (Exception e) {
		throw new NyARRuntimeException(e);
	}
	return;
}
 
开发者ID:nyatla,项目名称:NyARToolkit,代码行数:21,代码来源:JmfCaptureDeviceList.java

示例2: listDevices

import javax.media.CaptureDeviceManager; //导入依赖的package包/类
void listDevices() {
	Vector deviceInfos = CaptureDeviceManager.getDeviceList(null);
	if (deviceInfos.isEmpty()) {
		System.out.println("No capture devices found.");
	} else {
		for (Object o : deviceInfos) {
			CaptureDeviceInfo info = (CaptureDeviceInfo) o;
			System.out.println(info.getName() + " :");
			for (Format format : info.getFormats()) {
				System.out.println(String.format("\t%s", format.toString()));
			}
		}
	}
}
 
开发者ID:voxoid0,项目名称:java-motion-tracking,代码行数:15,代码来源:BlobTest.java

示例3: printDeviceList

import javax.media.CaptureDeviceManager; //导入依赖的package包/类
public static void printDeviceList() {
 System.out.println("List of capturing devices: ");
 Vector devices = CaptureDeviceManager.getDeviceList(null);
 Enumeration list = devices.elements();
 while (list.hasMoreElements()) {
  CaptureDeviceInfo deviceInfo =(CaptureDeviceInfo) list.nextElement();
  String name = deviceInfo.getName();
  
  Format[] fmts = deviceInfo.getFormats();
  System.out.println("NAME: " +name);
  for (int i = 0; i < fmts.length; i++) {
   System.out.println("\t"+fmts[i]);
  }
 }
}
 
开发者ID:LSIR,项目名称:gsn,代码行数:16,代码来源:WebCamWrapper.java

示例4: logAudioDevices

import javax.media.CaptureDeviceManager; //导入依赖的package包/类
/**
* Logs the audio devices
*/
  public void logAudioDevices() {
      @SuppressWarnings("unchecked")
      final Vector<CaptureDeviceInfo> vectorDevices = CaptureDeviceManager.getDeviceList(null);

      for (CaptureDeviceInfo infoCaptureDevice : vectorDevices) {
          System.err.println(convertSysString(infoCaptureDevice.getName()));
          for (Format format : infoCaptureDevice.getFormats()) {
              System.err.println("   " + format);
          }
      }
  }
 
开发者ID:visit,项目名称:spark-svn-mirror,代码行数:15,代码来源:MediaPreferencePanel.java


注:本文中的javax.media.CaptureDeviceManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。