01: /*
02: *
03: * Copyright (c) 2000 Silvere Martin-Michiellot All Rights Reserved.
04: *
05: * Silvere Martin-Michiellot grants you ("Licensee") a non-exclusive,
06: * royalty free, license to use, modify and redistribute this
07: * software in source and binary code form,
08: * provided that i) this copyright notice and license appear on all copies of
09: * the software; and ii) Licensee does not utilize the software in a manner
10: * which is disparaging to Silvere Martin-Michiellot.
11: *
12: * This software is provided "AS IS," without a warranty of any kind. ALL
13: * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
14: * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
15: * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. Silvere Martin-Michiellot
16: * AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES
17: * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
18: * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL
19: * Silvere Martin-Michiellot OR ITS LICENSORS BE LIABLE
20: * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
21: * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
22: * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
23: * OR INABILITY TO USE SOFTWARE, EVEN IF Silvere Martin-Michiellot HAS BEEN
24: * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
25: *
26: * This software is not designed or intended for use in on-line control of
27: * aircraft, air traffic, aircraft navigation or aircraft communications; or in
28: * the design, construction, operation or maintenance of any nuclear
29: * facility. Licensee represents and warrants that it will not use or
30: * redistribute the Software for such purposes.
31: *
32: *
33: */
34:
35: package com.db.media.diagnostics;
36:
37: // This code is repackaged after the code from the JMF samples
38: // Site http://java.sun.com/
39: // Email
40:
41: import com.sun.media.JMFSecurityManager;
42:
43: /**
44: * Check for version JMF 1.0.
45: */
46: public class QueryJMF10 implements QueryJMF {
47:
48: static {
49:
50: try {
51: Class
52: .forName("com.sun.media.renderer.video.VideoRenderer$CC");
53: } catch (Throwable throwable) {
54: throw new RuntimeException("Not JMF 1.0.2");
55: }
56:
57: }
58:
59: public QueryJMF10() {
60: }
61:
62: public String getVersion() {
63:
64: return "1.0.2";
65:
66: }
67:
68: public String getDetails() {
69:
70: String string = "";
71: try {
72: Class.forName("com.sun.media.blitter.xlib.Blitter");
73: string = new StringBuffer(String.valueOf(string)).append(
74: "Solaris Build\n").toString();
75: } catch (Throwable throwable1) {
76: }
77: try {
78: Class.forName("com.sun.media.blitter.directx.Blitter");
79: string = new StringBuffer(String.valueOf(string)).append(
80: "Win32 Build\n").toString();
81: } catch (Throwable throwable2) {
82: }
83: try {
84: JMFSecurityManager.loadLibrary("jmindeo");
85: string = new StringBuffer(String.valueOf(string)).append(
86: QueryJMF.NATIVE).toString();
87: } catch (UnsatisfiedLinkError e) {
88: string = new StringBuffer(String.valueOf(string)).append(
89: QueryJMF.NONATIVE).toString();
90: }
91:
92: return string;
93:
94: }
95:
96: }
|