< prev index next >

modules/javafx.media/src/main/java/com/sun/media/jfxmediaimpl/platform/gstreamer/GSTPlatform.java

Print this page




  44      * The MIME types of all supported media.
  45      */
  46     private static final String[] CONTENT_TYPES = {
  47         "audio/x-aiff",
  48         "audio/mp3",
  49         "audio/mpeg",
  50         "audio/x-wav",
  51         "video/mp4",
  52         "audio/x-m4a",
  53         "video/x-m4v",
  54         "application/vnd.apple.mpegurl",
  55         "audio/mpegurl"
  56     };
  57 
  58     /**
  59      * All supported protocols.
  60      */
  61     private static final String[] PROTOCOLS = {
  62         "file",
  63         "http",
  64         "https"

  65     };
  66 
  67     private static GSTPlatform globalInstance = null;
  68 
  69     @Override
  70     public boolean loadPlatform() {
  71         // Initialize GStreamer JNI and supporting native classes.
  72         MediaError ret;
  73         try {
  74             ret = MediaError.getFromCode(gstInitPlatform());
  75         } catch (UnsatisfiedLinkError ule) {
  76             ret = MediaError.ERROR_MANAGER_ENGINEINIT_FAIL;
  77         }
  78         // Post an error if native initialization fails.
  79         if (ret != MediaError.ERROR_NONE) {
  80             MediaUtils.nativeError(GSTPlatform.class, ret);
  81         }
  82         return true;
  83     }
  84 




  44      * The MIME types of all supported media.
  45      */
  46     private static final String[] CONTENT_TYPES = {
  47         "audio/x-aiff",
  48         "audio/mp3",
  49         "audio/mpeg",
  50         "audio/x-wav",
  51         "video/mp4",
  52         "audio/x-m4a",
  53         "video/x-m4v",
  54         "application/vnd.apple.mpegurl",
  55         "audio/mpegurl"
  56     };
  57 
  58     /**
  59      * All supported protocols.
  60      */
  61     private static final String[] PROTOCOLS = {
  62         "file",
  63         "http",
  64         "https",
  65         "jrt"
  66     };
  67 
  68     private static GSTPlatform globalInstance = null;
  69 
  70     @Override
  71     public boolean loadPlatform() {
  72         // Initialize GStreamer JNI and supporting native classes.
  73         MediaError ret;
  74         try {
  75             ret = MediaError.getFromCode(gstInitPlatform());
  76         } catch (UnsatisfiedLinkError ule) {
  77             ret = MediaError.ERROR_MANAGER_ENGINEINIT_FAIL;
  78         }
  79         // Post an error if native initialization fails.
  80         if (ret != MediaError.ERROR_NONE) {
  81             MediaUtils.nativeError(GSTPlatform.class, ret);
  82         }
  83         return true;
  84     }
  85 


< prev index next >