Issue #526. Disable video support for java 1.6 under Macosx.

cusax-fix
Damian Minkov 18 years ago
parent ce788136c2
commit 2629d4fe33

@ -84,7 +84,7 @@ private void initialize()
if (FMJConditionals.USE_JMF_INTERNAL_REGISTRY)
{
// This uses JMF internals:
// see if the registry has already been "tagged" by us, skip auto-detection if
// see if the registry has already been "tagged" by us, skip auto-detection if
// it has.
// This was probably done because JMF auto-detection is very slow, especially
// for video devices. FMJ does this quickly, so there is no need for this
@ -101,7 +101,7 @@ private void initialize()
Registry.set(PROP_ALLOW_SAVE_FILE_FROM_APPLETS, new Boolean(true));
Registry.set(PROP_REGISTRY_AUTHOR, PROP_REGISTRY_AUTHOR_VALUE);
try
{
Registry.commit();
@ -126,7 +126,7 @@ private void initialize()
private void detectCaptureDevices()
{
logger.info("Looking for Audio capturer");
//First check if DirectSound capture is available
try
{
@ -146,7 +146,7 @@ private void detectCaptureDevices()
{
logger.debug("No JMF javasound detected: " + exc.getMessage());
}
// check if we have FMJJavaSoundAuto capture is available
try
{
@ -157,7 +157,7 @@ private void detectCaptureDevices()
logger.debug("No FMJ javasound detected: " + exc.getMessage());
}
// video is enabled by default
// video is enabled by default
// if video is disabled skip device detection
if(MediaActivator.
getConfigurationService().getBoolean(
@ -226,12 +226,13 @@ private void detectCaptureDevices()
logger.debug("No V4l video detected: " + exc.getMessage());
}
*/
//FMJ
try
{
new FMJCivilVideoAuto();
if(isFMJVideoAvailable())
new FMJCivilVideoAuto();
}
catch (Throwable exc)
{
@ -239,6 +240,24 @@ private void detectCaptureDevices()
}
}
/**
* Currently fmj video under macosx using java version 1.6 is not supported.
* As macosx video support is using libQTJNative.jnilib which supports
* only java 1.5 and is deprecated.
* @return is fmj video supported under current OS and environment.
*/
private boolean isFMJVideoAvailable()
{
String osName = System.getProperty("os.name");
if (osName.startsWith("Mac") &&
System.getProperty("java.version").startsWith("1.6"))
{
return false;
}
return true;
}
/**
* Will try to detect direct audio devices.
*/
@ -394,7 +413,7 @@ else if(!isLinux32())
{
Vector<String> renderers =
PlugInManager.getPlugInList(null, null, PlugInManager.RENDERER);
if (renderers.contains("com.sun.media.renderer.video.LightWeightRenderer") ||
renderers.contains("com.sun.media.renderer.video.AWTRenderer"))
{

Loading…
Cancel
Save