Package com.lti.civil

Examples of com.lti.civil.CaptureSystem


  public void addCaptureDevices()
  {
    try
    {
      final CaptureSystemFactory factory = DefaultCaptureSystemFactorySingleton.instance();
      final CaptureSystem system = factory.createCaptureSystem();
      system.init();
      final List list = system.getCaptureDeviceInfoList();
      for (int i = 0; i < list.size(); ++i)
      {
        final com.lti.civil.CaptureDeviceInfo civilInfo = (com.lti.civil.CaptureDeviceInfo) list.get(i);
       
        {
View Full Code Here


      PlugInUtility.registerPlugIn("net.sf.fmj.media.renderer.video.SimpleAWTRenderer");
       
   
   
    CaptureSystemFactory factory = DefaultCaptureSystemFactorySingleton.instance();
    CaptureSystem system = factory.createCaptureSystem();
    system.init();
    List list = system.getCaptureDeviceInfoList();
    for (int i = 0; i < list.size(); ++i)
    {
      com.lti.civil.CaptureDeviceInfo civilInfo = (com.lti.civil.CaptureDeviceInfo) list.get(i);
     
      {
       
        //String name, MediaLocator locator, Format[] formats
        CaptureDeviceInfo jmfInfo = new CaptureDeviceInfo(civilInfo.getDescription(), new MediaLocator("civil:" + civilInfo.getDeviceID()), new Format[] {new RGBFormat()});
        CaptureDeviceManager.addDevice(jmfInfo);
      }
     
    }


    final java.util.Vector vectorDevices = CaptureDeviceManager.getDeviceList(null);
    if (vectorDevices == null)
    {
      System.out.println("CaptureDeviceManager.getDeviceList returned null");
      return;
    }
    if (vectorDevices.size() == 0)
    {
      System.out.println("CaptureDeviceManager.getDeviceList returned empty list");
      return;
    }

   
    for ( int i = 0;  i < vectorDevices.size();  i++ )
    {
      CaptureDeviceInfo infoCaptureDevice = (CaptureDeviceInfo) vectorDevices.elementAt ( i );
      System.out.println("CaptureDeviceInfo: ");
      System.out.println(infoCaptureDevice.getName());
      System.out.println(infoCaptureDevice.getLocator());
      System.out.println(infoCaptureDevice.getFormats()[0]);
     
      Player player;
      try
      {
       
        player = Manager.createRealizedPlayer(infoCaptureDevice.getLocator());
      } catch (Exception e)
      {  throw new CaptureException(e);
      }
          player.start();
     
    }
     
    system.dispose();
  }
View Full Code Here

TOP

Related Classes of com.lti.civil.CaptureSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.