Source Code : List all capture devices currently known to the JMF

Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com. Click Here or search from google with Libraries Name you get jar file related it

List all capture devices currently known to the JMF

List all capture devices currently known to the JMF
/*

Java Media APIs: Cross-Platform Imaging, Media and Visualization
Alejandro Terrazas
Sams, Published November 2002, 
ISBN 0672320940
*/

import javax.media.*;
import java.util.*;

/*******************************************************************************
 * Simple application to list all capture devices currently known to the JMF.
 * The CaptureDeviceManager is queried as to known devices and its output
 * printed to the screen.
 * 
 * @author Michael (Spike) Barlow
 ******************************************************************************/
public class ListCaptureDevices {

  public static void main(String[] args) {

    /////////////////////////////////////////////////////////////
    // Query CaptureDeviceManager about ANY capture devices (null
    // format)
    Vector info = CaptureDeviceManager.getDeviceList(null);
    if (info == null)
      System.out.println("No Capture devices known to JMF");
    else {
      System.out.println("The following " + info.size()
          + " capture devices are known to the JMF");
      for (int i = 0; i < info.size(); i++)
        System.out
            .println("	" + (CaptureDeviceInfo) info.elementAt(i));
    }
  }
}

           
       

Thank with us