modules/media/src/main/java/com/sun/media/jfxmediaimpl/platform/osx/OSXPlatform.java

Print this page

       

*** 1,7 **** /* ! * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 32,41 **** --- 32,42 ---- import com.sun.media.jfxmedia.logging.Logger; import com.sun.media.jfxmediaimpl.HostUtils; import com.sun.media.jfxmediaimpl.platform.Platform; import java.security.AccessController; import java.security.PrivilegedAction; + import java.util.Arrays; /** * Mac OS X Platform implementation. This class implements both the QTKit based * platform and the AVFoundation based platforms. *
*** 55,64 **** --- 56,74 ---- "video/x-m4v", "application/vnd.apple.mpegurl", "audio/mpegurl" }; + /** + * All supported protocols. + */ + private static final String[] PROTOCOLS = { + "file", + "http", + "https" + }; + private static final class OSXPlatformInitializer { private static final OSXPlatform globalInstance; static { // Platform is only available if we can load it's native lib // Do this early so we can report the correct content types
*** 119,131 **** } } @Override public String[] getSupportedContentTypes() { ! String[] contentTypesCopy = new String[CONTENT_TYPES.length]; ! System.arraycopy(CONTENT_TYPES, 0, contentTypesCopy, 0, CONTENT_TYPES.length); ! return contentTypesCopy; } @Override public Media createMedia(Locator source) { return new OSXMedia(source); --- 129,144 ---- } } @Override public String[] getSupportedContentTypes() { ! return Arrays.copyOf(CONTENT_TYPES, CONTENT_TYPES.length); ! } ! ! @Override ! public String[] getSupportedProtocols() { ! return Arrays.copyOf(PROTOCOLS, PROTOCOLS.length); } @Override public Media createMedia(Locator source) { return new OSXMedia(source);