Пример #1
0
 public final boolean isGLXVersionGreaterEqualOneThree(AbstractGraphicsDevice device) {
   if (null != device) {
     SharedResource sr = (SharedResource) sharedResourceRunner.getOrCreateShared(device);
     if (null != sr) {
       return sr.isGLXVersionGreaterEqualOneThree();
     }
     if (device instanceof X11GraphicsDevice) {
       final VersionNumber glXServerVersion =
           GLXUtil.getGLXServerVersionNumber((X11GraphicsDevice) device);
       return glXServerVersion.compareTo(versionOneThree) >= 0;
     }
   }
   return false;
 }
Пример #2
0
 SharedResource(
     X11GraphicsDevice dev,
     X11GraphicsScreen scrn,
     GLDrawableImpl draw,
     GLContextImpl ctx,
     VersionNumber glXServerVer,
     String glXServerVendor,
     boolean glXServerMultisampleAvail) {
   device = dev;
   screen = scrn;
   drawable = draw;
   context = ctx;
   glXServerVersion = glXServerVer;
   glXServerVersionOneOneCapable = glXServerVersion.compareTo(versionOneOne) >= 0;
   glXServerVersionOneThreeCapable = glXServerVersion.compareTo(versionOneThree) >= 0;
   glXServerVendorName = glXServerVendor;
   isGLXServerVendorATI = GLXUtil.isVendorATI(glXServerVendorName);
   isGLXServerVendorNVIDIA = GLXUtil.isVendorNVIDIA(glXServerVendorName);
   glXMultisampleAvailable = glXServerMultisampleAvail;
 }
Пример #3
0
 static {
   final boolean libAVGood = FFMPEGDynamicLibraryBundleInfo.initSingleton();
   final boolean libAVVersionGood;
   if (FFMPEGDynamicLibraryBundleInfo.libsLoaded()) {
     natives = FFMPEGDynamicLibraryBundleInfo.getNatives();
     if (null != natives) {
       avCodecMajorVersionCC = natives.getAvCodecMajorVersionCC0();
       avFormatMajorVersionCC = natives.getAvFormatMajorVersionCC0();
       avUtilMajorVersionCC = natives.getAvUtilMajorVersionCC0();
       avResampleMajorVersionCC = natives.getAvResampleMajorVersionCC0();
       swResampleMajorVersionCC = natives.getSwResampleMajorVersionCC0();
     } else {
       avUtilMajorVersionCC = 0;
       avFormatMajorVersionCC = 0;
       avCodecMajorVersionCC = 0;
       avResampleMajorVersionCC = 0;
       swResampleMajorVersionCC = 0;
     }
     final VersionNumber avCodecVersion = FFMPEGDynamicLibraryBundleInfo.avCodecVersion;
     final VersionNumber avFormatVersion = FFMPEGDynamicLibraryBundleInfo.avFormatVersion;
     final VersionNumber avUtilVersion = FFMPEGDynamicLibraryBundleInfo.avUtilVersion;
     final VersionNumber avResampleVersion = FFMPEGDynamicLibraryBundleInfo.avResampleVersion;
     final boolean avResampleLoaded = FFMPEGDynamicLibraryBundleInfo.avResampleLoaded();
     final VersionNumber swResampleVersion = FFMPEGDynamicLibraryBundleInfo.swResampleVersion;
     final boolean swResampleLoaded = FFMPEGDynamicLibraryBundleInfo.swResampleLoaded();
     if (DEBUG) {
       System.err.println(
           "LIB_AV Codec   : " + avCodecVersion + " [cc " + avCodecMajorVersionCC + "]");
       System.err.println(
           "LIB_AV Format  : " + avFormatVersion + " [cc " + avFormatMajorVersionCC + "]");
       System.err.println(
           "LIB_AV Util    : " + avUtilVersion + " [cc " + avUtilMajorVersionCC + "]");
       System.err.println(
           "LIB_AV Resample: "
               + avResampleVersion
               + " [cc "
               + avResampleMajorVersionCC
               + ", loaded "
               + avResampleLoaded
               + "]");
       System.err.println(
           "LIB_SW Resample: "
               + swResampleVersion
               + " [cc "
               + swResampleMajorVersionCC
               + ", loaded "
               + swResampleLoaded
               + "]");
       System.err.println(
           "LIB_AV Device  : [loaded " + FFMPEGDynamicLibraryBundleInfo.avDeviceLoaded() + "]");
       System.err.println(
           "LIB_AV Class   : " + (null != natives ? natives.getClass().getSimpleName() : "n/a"));
     }
     final int avCodecMajor = avCodecVersion.getMajor();
     final int avFormatMajor = avFormatVersion.getMajor();
     final int avUtilMajor = avUtilVersion.getMajor();
     libAVVersionGood =
         avCodecMajorVersionCC == avCodecMajor
             && avFormatMajorVersionCC == avFormatMajor
             && (avUtilMajorVersionCC == avUtilMajor
                 || 55 == avCodecMajorVersionCC
                     && 53 == avUtilMajorVersionCC
                     && 52 == avUtilMajor /* ffmpeg 2.x */)
             && (!avResampleLoaded
                 || avResampleMajorVersionCC < 0
                 || avResampleMajorVersionCC == avResampleVersion.getMajor())
             && (!swResampleLoaded
                 || swResampleMajorVersionCC < 0
                 || swResampleMajorVersionCC == swResampleVersion.getMajor());
     if (!libAVVersionGood) {
       System.err.println("LIB_AV Not Matching Compile-Time / Runtime Major-Version");
     }
   } else {
     natives = null;
     avUtilMajorVersionCC = 0;
     avFormatMajorVersionCC = 0;
     avCodecMajorVersionCC = 0;
     avResampleMajorVersionCC = 0;
     swResampleMajorVersionCC = 0;
     libAVVersionGood = false;
   }
   available = libAVGood && libAVVersionGood && null != natives;
 }