blob: d2788a2bffc8572bbd266b56f63118b16a3afe17 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.neomedia.device;
import java.lang.reflect.*;
/**
* FMJ auto-detect of CIVIL video capture devices.
*
* @author Ken Larson
*/
public class FMJCivilVideoAuto
{
/**
* Creates an instance of FMJCivilVideoAuto and auto-detects CIVIL video
* capture devices.
*
* @throws java.lang.Exception if FMJ is not present in the classpath or if
* detection fails for some other reason.
*/
public FMJCivilVideoAuto() throws Exception
{
// Done using reflection to avoid compile-time dependency on FMJ:
//new net.sf.fmj.media.cdp.civil.CaptureDevicePlugger().addCaptureDevices();
final Class<?> clazz
= Class.forName("net.sf.fmj.media.cdp.civil.CaptureDevicePlugger");
final Method addCaptureDevices = clazz.getMethod("addCaptureDevices");
final Object captureDevicePlugger = clazz.newInstance();
addCaptureDevices.invoke(captureDevicePlugger);
}
}
|